Alex Raichev schrieb: Hi,
> Am i doing something wrong, or does the example below demonstrate a > bug in Sage's n() function? > sage: a= gamma(1/3) > sage: a.n() > 2.67893853470775 > sage: f= a*x > sage: c=f.coefficients(); c > [[gamma(1/3), 1]] > sage: c[0][0].n() > --------------------------------------------------------------------------- > TypeError Traceback (most recent call > last) > > /Users/raichev/<ipython console> in <module>() > > /Applications/sage/local/lib/python2.6/site-packages/sage/symbolic/ > expression.so in sage.symbolic.expression.Expression.n (sage/symbolic/ > expression.cpp:15928)() > > TypeError: cannot evaluate symbolic expresssion numerically > sage: I think this is an error in the communication between Maxima and Sage: sage: assume(x>0) sage: g = integrate(t^(x-1)*exp(-t),(t,0,infinity)) sage: g(3).n() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/felix/<ipython console> in <module>() /home/felix/Temp/sage-4.3/local/lib/python2.6/site-packages/sage/symbolic/expression.so in sage.symbolic.expression.Expression.n (sage/symbolic/expression.cpp:16166)() TypeError: cannot evaluate symbolic expresssion numerically sage: g(3) - gamma(3) gamma(3) - 2 sage: simplify(g(3) - gamma(3)) 0 Seems that SAGE treats the internal Gamma Function and Maximas Gamma Function in different ways. However I do unfortunatelly not understand enough of the interals, to see where the error arise from. Felix -- 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