Mercurial > octave
changeset 23632:3426a596eabd
Use log2, log2f from C++ std library.
These functions are guaranteed to be part of C++11 standard library.
* configure.ac: Remove AC_CHECK_FUNCS for log2, log2f.
* lo-mappers.cc: Delegate to std::log2 or std::log2f for log2.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 16 Jun 2017 21:19:37 -0700 |
parents | 0954bf188bed |
children | 271d34c20678 |
files | configure.ac liboctave/numeric/lo-mappers.cc |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Fri Jun 16 21:10:16 2017 -0400 +++ b/configure.ac Fri Jun 16 21:19:37 2017 -0700 @@ -2455,7 +2455,7 @@ ## Check for nonstandard, but common math functions, that we need. dnl Use multiple AC_CHECKs to avoid line continuations '\' in list -AC_CHECK_FUNCS([erf erff erfc erfcf exp2f log2 log2f]) +AC_CHECK_FUNCS([erf erff erfc erfcf exp2f]) ## Check for math defines such as M_LN2 in math.h AC_CACHE_CHECK([for MATH DEFINES in math.h],
--- a/liboctave/numeric/lo-mappers.cc Fri Jun 16 21:10:16 2017 -0400 +++ b/liboctave/numeric/lo-mappers.cc Fri Jun 16 21:19:37 2017 -0700 @@ -222,7 +222,7 @@ } double log2 (double x) { return std::log2 (x); } - float log2 (float x) { return std::log2 (x); } + float log2 (float x) { return std::log2f (x); } Complex log2 (const Complex& x)