Hi all,

I didn't know how to make the title any clearer, I'm sorry. The
problem is as follows (on Sage v 4.6). Running the following piece of
code (BetaLP1 is some class):

f=BetaLP1.getkthMomentAt(1,1)
print 'f:',f
print f(0)

yields the following error:

f: x |--> e^(9/200*x^2 + 4/3*sqrt(pi)*gamma(-x + 1)/gamma(-x - 1/2) +
4/3*sqrt(pi)*gamma(x + 1)/gamma(x - 1/2) + 4/3)
Traceback (most recent call last):        return [(el[1],el[0]) for el
in lst]
  File "", line 1, in <module>

  File "/tmp/tmpJG9qg9/___code___.py", line 16, in <module>
    print f(_sage_const_0 )
  File "expression.pyx", line 3473, in
sage.symbolic.expression.Expression.__call__ (sage/symbolic/
expression.cpp:15647)
  File "/usr/local/Sage/sage-4.6-linux-32bit-ubuntu_10.04_lts-i686-
Linux/local/lib/python2.6/site-packages/sage/symbolic/callable.py",
line 451, in _call_element_
    return SR(_the_element.substitute(**d))
  File "expression.pyx", line 3324, in
sage.symbolic.expression.Expression.substitute (sage/symbolic/
expression.cpp:15026)
  File "pynac.pyx", line 1047, in
sage.symbolic.pynac.py_doublefactorial (sage/symbolic/pynac.cpp:9456)
ValueError: argument must be >= -1

But if I then copy formula for f from the above output and paste it in
a new cell:

f(x)=e^(9/200*x^2 + 4/3*sqrt(pi)*gamma(-x + 1)/gamma(-x - 1/2) +
4/3*sqrt(pi)*gamma(x + 1)/gamma(x - 1/2) + 4/3)
print f(0)

it yields 1. So in that first cell something happens which I don't
understand. How can both f's evaluate different, while their
respective formulas are the same? Is there some difference between the
two that I can't see from their respective formulas?

Many thanks in advance, Kees

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to