Added PyFloat_GetMax(), PyFloat_GetMin() and PyFloat_GetInfo() to the float API.
Added a dictionary sys.float_info with information about the internal floating point type to the sys module.
This commit is contained in:
Christian Heimes 2007-12-01 11:20:10 +00:00
parent 9f6d4ceb43
commit dfdfaab1c5
7 changed files with 120 additions and 0 deletions

View file

@ -557,6 +557,23 @@ Floating Point Objects
without error checking.
.. cfunction:: PyObject* PyFloat_GetInfo(void)
Return a :ctype:`PyDictObject` object which contains information about the
precision, minimum and maximum values of a float. It's a thin wrapper
around the header file :file:`float.h`.
.. cfunction:: double PyFloat_GetMax(void)
Return the maximum representable finite float *DBL_MAX* as C :ctype:`double`.
.. cfunction:: double PyFloat_GetMin(void)
Return the minimum normalized positive float *DBL_MIN* as C :ctype:`double`.
.. _complexobjects:
Complex Number Objects