diff options
author | Matti Picus <matti.picus@gmail.com> | 2022-11-28 18:06:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-28 17:06:11 +0100 |
commit | c687f2d16f8ba965828fee3a001844b4952474f5 (patch) | |
tree | b7360d2119fc8543edb2d8f51ae7ec85086a3673 /doc/source/reference/c-api | |
parent | bba74740e5236735f6ec5013d8d778145b758e89 (diff) | |
download | numpy-c687f2d16f8ba965828fee3a001844b4952474f5.tar.gz |
MAINT: npymath cleanups for isnan, isinf, isinfinite, signbit, nextafter (#22684)
* make isnan, isinf, isfinite, signbit, nextafter aliases
* fixes from review
Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
Diffstat (limited to 'doc/source/reference/c-api')
-rw-r--r-- | doc/source/reference/c-api/coremath.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/source/reference/c-api/coremath.rst b/doc/source/reference/c-api/coremath.rst index eb0990edb..2293f0ae8 100644 --- a/doc/source/reference/c-api/coremath.rst +++ b/doc/source/reference/c-api/coremath.rst @@ -55,30 +55,30 @@ Floating point classification .. c:macro:: npy_isnan(x) - This is a macro, and is equivalent to C99 isnan: works for single, double + This is an alias for C99 isnan: works for single, double and extended precision, and return a non 0 value if x is a NaN. .. c:macro:: npy_isfinite(x) - This is a macro, and is equivalent to C99 isfinite: works for single, + This is an alias for C99 isfinite: works for single, double and extended precision, and return a non 0 value if x is neither a NaN nor an infinity. .. c:macro:: npy_isinf(x) - This is a macro, and is equivalent to C99 isinf: works for single, double + This is an alias for C99 isinf: works for single, double and extended precision, and return a non 0 value if x is infinite (positive and negative). .. c:macro:: npy_signbit(x) - This is a macro, and is equivalent to C99 signbit: works for single, double + This is an alias for C99 signbit: works for single, double and extended precision, and return a non 0 value if x has the signbit set (that is the number is negative). .. c:macro:: npy_copysign(x, y) - This is a function equivalent to C99 copysign: return x with the same sign + This is an alias for C99 copysign: return x with the same sign as y. Works for any value, including inf and nan. Single and extended precisions are available with suffix f and l. @@ -141,7 +141,7 @@ Those can be useful for precise floating point comparison. .. c:function:: double npy_nextafter(double x, double y) - This is a function equivalent to C99 nextafter: return next representable + This is an alias 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. |