Mar-23-2020, 05:58 AM
There is sys.float_info in Python:
Technical stuff aside, this is somehow contra-intuitive (being larger than zero but not impacting value comparison).
>>> import sys >>> sys.float_info sys.float_info(max=1.7976931348623157e+308, max_exp=1024, max_10_exp=308, min=2.2250738585072014e-308, min_exp=-1021, min_10_exp=-307, dig=15, mant_dig=53, epsilon=2.220446049250313e-16, radix=2, rounds=1) >>> sys.float_info.min 2.2250738585072014e-308Python seems to recognise this value to be larger than zero:
>>> 0 < sys.float_info.min TrueHowever, if I add this greater than zero value to integer it's not making value greater:
>>> 1 < (1 + sys.float_info.min) False >>> 1 == (1 + sys.float_info.min) TrueAny explanation why is that (some precision and/or normalised thingy)?
Technical stuff aside, this is somehow contra-intuitive (being larger than zero but not impacting value comparison).