-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sys.maxfloat patch #45875
Comments
Currently Python has no information about the maximum and minimum value >>> pprint.pprint(sys.maxfloat)
{'dig': 15,
'epsilon': 2.2204460492503131e-16,
'mant_dig': 53,
'max': 1.7976931348623157e+308,
'max_10_exp': 308,
'max_exp': 1024,
'min': 2.2250738585072014e-308,
'min_10_exp': -307,
'min_exp': -1021,
'radix': 2,
'rounds': 1} The patch compiles on Linux and Windows. |
I'd suggest giving it a different name, maybe float_info. sys.maxfloat |
Applied in r59254. I've moved the code to floatobject.c/h and added PyFloat_GetMax() and |
A (probably stupid) question: what's supposed to happen on platforms that |
I've checked all major platforms before committing the patch. They all |
No, I don't know of any platforms that don't define these constants. |
And it looks as though DBL_MAX_10_EXP *is* part of ANSI C anyway... I |
Thanks for checking it out for me! Do you have a reliable online source |
The site that persuaded me about DBL_MAX_10_EXP was http://www.schweikhardt.net/identifiers.html Googling 'C89 draft' also turns up some potentially useful stuff. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: