diff options
| author | mattip <matti.picus@gmail.com> | 2022-08-14 22:38:55 +0300 |
|---|---|---|
| committer | mattip <matti.picus@gmail.com> | 2022-08-21 18:26:10 +0300 |
| commit | 37b2cf17cbf50122283f9737e4419a79fb32d6fb (patch) | |
| tree | 87fa6f8b3f6a4bf261e3809f1f5abf788f1be347 /numpy | |
| parent | c304f6f2e9f8d319fe5aaa65d03292b5a8879068 (diff) | |
| download | numpy-37b2cf17cbf50122283f9737e4419a79fb32d6fb.tar.gz | |
frexp is now mandatory
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/src/npymath/npy_math_internal.h.src | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/numpy/core/src/npymath/npy_math_internal.h.src b/numpy/core/src/npymath/npy_math_internal.h.src index 6a0b487c7..055967951 100644 --- a/numpy/core/src/npymath/npy_math_internal.h.src +++ b/numpy/core/src/npymath/npy_math_internal.h.src @@ -98,7 +98,7 @@ NPY_INPLACE double npy_log2(double x) { #ifdef HAVE_LOG2 return log2(x); -#elif defined(HAVE_FREXP) +#else if (!npy_isfinite(x) || x <= 0.) { /* special value result */ return npy_log(x); @@ -123,9 +123,6 @@ NPY_INPLACE double npy_log2(double x) return log(m) / log(2.0) + e; } } -#else - /* does not provide int(log(2**i)) == i */ - return NPY_LOG2E * npy_log(x); #endif } |
