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 9:16 PM by jdhardy


wrote Feb 22, 2013 at 2:10 AM

wrote Jul 29, 2013 at 7:45 AM

wrote Jul 29, 2013 at 4:03 PM

wrote Aug 2, 2013 at 5:02 AM

jdhardy wrote Aug 2, 2013 at 6:36 AM

Fixed in 1d60b98.

wrote Dec 6, 2014 at 9:16 PM