What does sys.float_info.epsilon return?
On my system I get:
>>> sys.float_info.epsilon 2.220446049250313e-16 >>> sys.float_info.epsilon / 2 1.1102230246251565e-16 >>> 0 < sys.float_info.epsilon / 2 < sys.float_info.epsilon True How is this possible?
EDIT:
You are all right, I thought epsilon does what min does. So I actually meant sys.float_info.min.
EDIT2
Everybody and especially John Kugelman, thanks for your answers!
Some playing around I did to clarify things to myself:
>>> float.hex(sys.float_info.epsilon) '0x1.0000000000000p-52' >>> float.hex(sys.float_info.min) '0x1.0000000000000p-1022' >>> float.hex(1 + a) '0x1.0000000000001p+0' >>> float.fromhex('0x0.0000000000001p+0') == sys.float_info.epsilon True >>> float.hex(sys.float_info.epsilon * sys.float_info.min) '0x0.0000000000001p-1022' So epsilon * min gives the number with the smallest positive significand (or mantissa) and the smallest exponent.