This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author billymac00
Recipients billymac00
Date 2010-12-05.08:43:15
SpamBayes Score 1.4968838e-06
Marked as misclassified No
Message-id <1291538596.71.0.765304275074.issue10629@psf.upfronthosting.co.za>
In-reply-to
Content
from this link [http://en.wikipedia.org/wiki/PARI/GP#Usage_examples], I wanted to contrast arbitrary precision with the other pgm I use, Pari/GP.  I tried the xample there which was:
123456! + 0.
Now, behavior seems the same without the "+0." for both.  However, while Pari returns the answer shown on link quickly, Python after a delay returned an error, related to float conversion.  Here is the progression from a smaller number to the problem:
>>> math.factorial(12) +0.
479001600.0
>>> math.factorial(123) +0.
1.214630436702533e+205
>>> math.factorial(1234) +0.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: long int too large to convert to float
>>>
History
Date User Action Args
2010-12-05 08:43:16billymac00setrecipients: + billymac00
2010-12-05 08:43:16billymac00setmessageid: <1291538596.71.0.765304275074.issue10629@psf.upfronthosting.co.za>
2010-12-05 08:43:15billymac00linkissue10629 messages
2010-12-05 08:43:15billymac00create