Mercurial > octave-nkf
diff liboctave/numeric/lo-mappers.cc @ 18881:ff4da3c8ed16 stable
use gnulib log2 modules (bug #42583)
* bootstrap.conf (gnulib_modules): Include log2, log2f, log2-ieee, and
log2f-ieee, in the list.
* lo-mappers.cc (xlog2): Use gnulib:: versions of log2 and log2f.
* CMatrix.cc, dMatrix.cc, fCMatrix.cc, fMatrix.cc: Use xlog2.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 19 Jun 2014 15:49:14 -0400 |
parents | 573f865aa8c8 |
children | 161ebb78ac1b 264ff6bf7475 |
line wrap: on
line diff
--- a/liboctave/numeric/lo-mappers.cc Thu Jun 19 09:41:12 2014 -0700 +++ b/liboctave/numeric/lo-mappers.cc Thu Jun 19 15:49:14 2014 -0400 @@ -92,17 +92,7 @@ double xlog2 (double x) { -#if defined (HAVE_LOG2) - return log2 (x); -#else -#if defined (M_LN2) - static double ln2 = M_LN2; -#else - static double ln2 = log (2); -#endif - - return log (x) / ln2; -#endif + return gnulib::log2 (x); } Complex @@ -317,19 +307,7 @@ float xlog2 (float x) { -#if defined (HAVE_LOG2F) - return log2f (x); -#elif defined (HAVE_LOG2) - return log2 (x); -#else -#if defined (M_LN2) - static float ln2 = M_LN2; -#else - static float ln2 = log2 (2); -#endif - - return log (x) / ln2; -#endif + return gnulib::log2f (x); } FloatComplex