Message123414
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
>>> |
|
Date |
User |
Action |
Args |
2010-12-05 08:43:16 | billymac00 | set | recipients:
+ billymac00 |
2010-12-05 08:43:16 | billymac00 | set | messageid: <1291538596.71.0.765304275074.issue10629@psf.upfronthosting.co.za> |
2010-12-05 08:43:15 | billymac00 | link | issue10629 messages |
2010-12-05 08:43:15 | billymac00 | create | |
|