I’m working on adding sys.float_info to Jython. It has several attributes from float.h.
I’m trying to find the Java equivalent for DBL_MIN_10_EXP, DBL_MANT_DIG, FLT_RADIX and FLT_ROUNDS.
Any ideas?
I think I have the rest of the attributes, some from java.lang.Double and the rest from looking at Num class in the ssj library.
I don’t recall those constants being part of any standard class (java.lang.Double and java.lang.Float being the most likely places). Seems like you would be safe in just defining them on your own since Java floats and doubles follow the IEEE 754 standard by spec. http://en.wikipedia.org/wiki/IEEE_754
Not sure about FLT_ROUNDS though… might be 1 (nearest), but you could use -1 (unknown) to be on the safe-side.