axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Patches


From: Waldek Hebisch
Subject: Re: [Axiom-developer] Patches
Date: Mon, 4 Jun 2007 16:00:48 +0200 (CEST)

Martin Rubey wrote:
> Waldek Hebisch <address@hidden> writes:
> 
> > > here are some patches for bug #355.
> 
> > > By the way, I just found the documented version of the patch to STTAYLOR,
> > > it is on MathAction, #312, powern.patch. I include a version that applies
> > > smoothly to wh-sandbox here, too.
> 
> > I have a little problem with documentation parts.  In combfunc.spad.pamphlet
> > part you write:
> > 
> > +      ++ Gamma(a,x) returns the incomplete Gamma function applied to a and 
> > x.
> > +      ++ Concerning differentiation, it is regarded as a function in the 
> > second
> > +      ++ argument only.
> > 
> > This behaviour is clearly a bug.
> 
> Hm, I thought this at first, too.  But the behaviour is consistent for Gamma,
> Bessel and Polygamma.  It is not difficult to change this behaviour to leaving
> the derivative unevaluated, but I'm not sure whether that would really be
> better.  If you are absolutely sure, please let me know as soon as possible.

Yes, currently we produce mathematically incorrect result.  In principle
user may get wrong results even if input does not contain explicit
derivative.  Once we get better support for special functions this may
be very serious problem.

I supect that original author did not know how to leave one partial
derivative unevaluated, while giving value of the second one (ATM this
is not clear for me either).  If you know how to to this please go
on.

> How about polygamma?  should D(polygamma(x, x), x) throw an error?  I guess 
> so.
> But if we follow you, Bessel* should leave the derivative with respect to the
> first argument - i.e., leave it unevaluated.
>

polygamma(a, x) has sensible definition also for non-integral a, so
just leaving D(polygamma(x, x), x) unevaluated is reasonable.  Since in
other places we support only integral a error is reasonable too.  For
Bessel* leaving derivative with respect to the first argument unevaluated
is preffered to error -- we can still do some calculations with
unevaluated derivatives.
 
> > In sttaylor.spad.pamphlet part you put explanations after corresponding 
> > code.
> > I find this confusing, I think that putting explanations before code is much
> > clearer.
> 
> I don't, but I realise that noweb behaves so that your style is preferred. -
> OK.  Do you want me to change this for these two patches already?
> 

Yes, pleas do.


-- 
                              Waldek Hebisch
address@hidden 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]