summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-11-10 09:35:46 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-11-10 09:35:46 +0000
commit0d1344ef88835faf34647bb702148767b8e23e76 (patch)
tree1b3331f1359873f725fd31dd01415f05e7274ee0
parent32501b397070ed37298668341e93b96c55197bad (diff)
downloadnumpy-0d1344ef88835faf34647bb702148767b8e23e76.tar.gz
DOC: add npy_nextafter/npy_spacing in doc ref.
-rw-r--r--doc/source/reference/c-api.coremath.rst22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/source/reference/c-api.coremath.rst b/doc/source/reference/c-api.coremath.rst
index e86214b49..12d6f522d 100644
--- a/doc/source/reference/c-api.coremath.rst
+++ b/doc/source/reference/c-api.coremath.rst
@@ -127,6 +127,28 @@ precision are also available by adding the F and L suffixes respectively.
The Euler constant (:math:`\lim_{n\rightarrow \infty}{\sum_{k=1}^n{\frac{1}{k}} - \ln n}`)
+Low-level floating point manipulation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Those can be useful for precise floating point comparison.
+
+.. cfunction:: double npy_nextafter(double x, double y)
+
+ This is a function equivalent to C99 nextafter: return next representable
+ floating point value from x in the direction of y. Single and extended
+ precisions are available with suffix f and l.
+
+ .. versionadded:: 1.4.0
+
+.. cfunction:: double npy_spacing(double x)
+
+ This is a function equivalent to Fortran intrinsic. Return distance between
+ x and next representable floating point value from x, e.g. spacing(1) ==
+ eps. spacing of nan and +/- inf return nan. Single and extended precisions
+ are available with suffix f and l.
+
+ .. versionadded:: 1.4.0
+
Complex functions
~~~~~~~~~~~~~~~~~