Re: [sage-devel] Re: Failure to calculate ln(factorial(171))

2010-03-08 Thread Robert Bradshaw
On Mar 7, 2010, at 7:15 AM, mhampton wrote: One clue is that factorial(171) is too big to fit as a long int in python. This is somehow handled better by the pre-parsing I guess. This is exactly what's happening. The command line and .sage files are preparsed, so one has sage: preparse("ln

Re: [sage-devel] Re: Failure to calculate ln(factorial(171))

2010-03-07 Thread David Roe
Try wrapping 171 with Integer and int, and 1.0 with float and RR in various combinations. My guess is that Python's treating 1.0 as a float. David On Sun, Mar 7, 2010 at 10:15 AM, mhampton wrote: > One clue is that factorial(171) is too big to fit as a long int in > python. This is somehow han

[sage-devel] Re: Failure to calculate ln(factorial(171))

2010-03-07 Thread mhampton
One clue is that factorial(171) is too big to fit as a long int in python. This is somehow handled better by the pre-parsing I guess. -Marshall On Mar 7, 6:25 am, Jan Groenewald wrote: > Hi > > On Sun, Mar 07, 2010 at 04:14:41AM -0800, jyr wrote: > > sage: print ln(factorial(171)*1.0) > > 711.7