[IronPython] IronPython and Big Numbers

Dino Viehland dinov at exchange.microsoft.com
Fri Mar 9 23:00:24 CET 2007

Oh, you're right, apparently I've forgotten what powers do :).

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bill Kinnersley
Sent: Friday, March 09, 2007 1:44 PM
To: Discussion of IronPython
Subject: Re: [IronPython] IronPython and Big Numbers

----- 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!

users mailing list
users at lists.ironpython.com

More information about the Ironpython-users mailing list