This project has moved. For the latest updates, please go here.


sys.float_info field values are inconsistent with those of CPython


In IronPython 2.6.1 (running in Silverlight on OS X 10.6), I'm seeing the following values for sys.float_info.min and sys.float_info.epsilon:
>>> sys.float_info.epsilon
>>> sys.float_info.min
In CPython (any version >= 2.6), the relevant values are:
>>> sys.float_info.epsilon
>>> sys.float_info.min
The CPython documentation describes epsilon as the difference between 1.0 and the next largest double (i.e., it's C's DBL_EPSILON). I guess that this bug occurs because IronPython is using .NET's Double.Epsilon here, which is something entirely different. And similarly, C's DBL_MIN (which is what sys.float_info.min is based on) has a very different definition to Double.MinValue.
The other sys.float_info values correspond between the two versions, as far as I can tell.
Closed Dec 6, 2014 at 8:16 PM by jdhardy


wrote Feb 22, 2013 at 1:10 AM

wrote Jul 29, 2013 at 6:45 AM

wrote Jul 29, 2013 at 3:03 PM

wrote Aug 2, 2013 at 4:02 AM

jdhardy wrote Aug 2, 2013 at 5:36 AM

Fixed in 1d60b98.

wrote Dec 6, 2014 at 8:16 PM