Mar-23-2020, 05:58 AM
(This post was last modified: Mar-23-2020, 05:58 AM by perfringo. Edited 1 time in total.)

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).

I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.