mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Feature #1534
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:
parent
9f6d4ceb43
commit
dfdfaab1c5
7 changed files with 120 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue