Can you post the code for BetaLP1.getkthMomentAt(1,1) so we can try it?
Thanks,
Jason
Yes, something does seem weird. When I modify your getkthMomentAt
function to:
def getkthMomentAt(self,k,t):
charFunc=self.getCharacteristicExponent()
i=sqrt(-1)
f=(exp(-t*charFunc(-i*x))).function(x)
for _ in range(k):
f=f.derivative()
return f
then I get the following odd sequence of results:
sage: mygammaexpr=f.operands()[0].operands()[0].operands()[1].operands()[0]
sage: mygammaexpr
gamma(-x - 1/2)
sage: mygammaexpr(x=0)
Traceback (most recent call last):
...
ValueError: argument must be >= -1
sage: mygammaexpr
gamma(-x - 1/2)
sage: gamma(-x-1/2) - mygammaexpr
0
sage: mygammaexpr(x=0)
-2*sqrt(pi)
Definitely weird. Apparently subtracting mygammaexpr from gamma(-x-1/2)
makes mygammaexpr suddenly realize that it's okay to evaluate it at x=0.
Jason
And lest we think the errors are something from Kees's install, those
computations were done on demo.sagenb.org:
http://demo.sagenb.org/home/pub/66/
Jason