Hello all,

I've been trying to use SAGE to find the positive infinity limit of this
function:

f(x) = ln(x^x) / ln(x!)

However, if I try defining it in SAGE like this:

f(x) = ln(x^x) / ln(factorial(x))

I get the following error message:

---------------------------------------------------------------------------
<type 'exceptions.TypeError'>             Traceback (most recent call last)

/Users/erios/<ipython console> in <module>()

/Applications/SAGE/local/lib/python2.5/site-packages/sage/rings/arith.py in
factorial(n, algorithm)
   273     Z = integer_ring.ZZ
   274     if algorithm == 'gmp':
--> 275         return Z(n).factorial()
   276     elif algorithm == 'pari':
   277         return Z(pari('%s!'%Z(n)))

/Users/erios/integer_ring.pyx in
sage.rings.integer_ring.IntegerRing_class.__call__()

<type 'exceptions.TypeError'>: unable to convert x (=x) to an integer

I have tried several variations of the above code, including alternative
ways to define the function, but they all stumble, one way or the other, in
an apparent inability of SAGE to convert a SymbolicVariable into an Integer.
Is there some way to corner SAGE into converting a SymbolicVariable into an
Integer, or to avoid having to – perhaps with a symbolic-calculus-friendly
factorial function?

-- 
Ja ne,
Helio Perroni Filho

Memory Leak
http://xperroni.blogspot.com

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to