[IronPython] eval('123.456E-19')*2.0

Dino Viehland dinov at exchange.microsoft.com
Fri Feb 10 17:50:43 CET 2006


Thanks for the bug report, I'll get it filed and it seems like we should be able to get this one fixed for the next release.

This is just a problem with displaying the actual value to its full precision.  For example:

print '%g' % (eval('123.456E-19')*2)

Prints:

2.46912e-17

so the value is there, it comes back from eval fine, we multiply it fine, we just print it incorrectly.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of HEMMI, Shigeru
Sent: Friday, February 10, 2006 12:02 AM
To: users at lists.ironpython.com
Subject: [IronPython] eval('123.456E-19')*2.0

Hello,
There seems to be a bug.

IronPython 1.0.2223 (Beta) on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> eval('123.456E-19')*2.0
0.0


C:\MagnaFIM\license>python
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> eval('123.456E-19')*2.0
2.46912e-017

Regards,
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list