curious problem with large numbers

Michael Spencer mahs at telcopartners.com
Thu Apr 7 23:59:13 EDT 2005


Terry Reedy wrote:
> "Chris Fonnesbeck" <fonnesbeck at gmail.com> wrote in message 
> news:723eb693050407124816431b6a at mail.gmail.com...
> 
>>However, on Windows (have tried on Mac, Linux) I get the following 
>>behaviour:
>>
>>
>>>>>inf = 1e10000
>>>>>inf
>>
>>1.0
>>
>>while I would have expected:
>>
>>1.#INF
> 
> 
> On my Windows machine with 2.2.1, I get exactly what you expected:
> 
>>>>1e10000
> 
> 1.#INF
> 
>>>>inf=1e10000
>>>>inf
> 
> 1.#INF
> 
> If you get wrong behavior on a later version, then a bug has been 
> introduced somewhere, even perhaps in VC 7, used for 2.4.
> 
> Terry J. Reedy
> 
> 
> 
On my Windows machine, both 2.3.3 and 2.4 give the same (expected) result:
  >>> 1e10000
  1.#INF

Michael




More information about the Python-list mailing list