[IronPython] IronPython and Big Numbers

John J Lee jjl at pobox.com
Sat Mar 10 20:33:54 CET 2007


On Fri, 9 Mar 2007, Bill Kinnersley wrote:
[...]
>>>>> 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!

...and ** is right-associative, so 10**10**10 is indeed 10**(10**10).

(I had to look that up :-)


John




More information about the Ironpython-users mailing list