[IronPython] IronPython and Big Numbers
Bill Kinnersley
billk at sunflower.com
Fri Mar 9 22:44:16 CET 2007
----- Original Message -----
From: "Dino Viehland" <dinov at exchange.microsoft.com>
To: "Discussion of IronPython" <users at lists.ironpython.com>
Sent: Friday, March 09, 2007 1:21 PM
Subject: Re: [IronPython] IronPython and Big Numbers
> Thanks for reporting this. This is actually slightly different than the
> bug described in the differences doc. There we're actually just
> preventing you from an inevitable OOM and here we're failing to do the
> power which should succeed.
>
> This seems to work as long as the left hand side of the power operation is
> a BigInt:
>
>>>> x = 10 ** 10
>>>> x ** 10
> 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000L
>>>> 10 ** x
> Number too big
>
This is not surprising, Dino. The two results are not supposed to be the
same. 10 ** x will be one followed by ten billion zeroes. So I think
"Number too big" is the right answer in the second case!
More information about the Ironpython-users
mailing list