Mercurial > hg > octave-nkf
diff liboctave/numeric/lo-mappers.cc @ 15452:4d960b078272
build: Remove unnecessary AC_CHECK_FUNCS calls.
* configure.ac: Remove unnecessary AC_CHECK_FUNCS calls.
Segregate some AC_CHECK_FUNCS calls to only be tested when building GUI.
Segregate some AC_CHECK_FUNCS calls to only be tested on certain platforms.
* __magick_read__.cc: Shorten comment to less than 80 characters.
* ov-ch-mat.cc: Add workaround for toascii if function is not available.
* lo-mappers.cc: Use log2f and exp2f if they are available. Otherwise,
fall back to double versions log2 and exp2 or other workaround.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 29 Sep 2012 11:57:44 -0700 |
parents | c898dbe14e1d |
children | d63878346099 |
line wrap: on
line diff
--- a/liboctave/numeric/lo-mappers.cc +++ b/liboctave/numeric/lo-mappers.cc @@ -317,7 +317,9 @@ float xlog2 (float x) { -#if defined (HAVE_LOG2) +#if defined (HAVE_LOG2F) + return log2f (x); +#elif defined (HAVE_LOG2) return log2 (x); #else #if defined (M_LN2) @@ -345,7 +347,9 @@ float xexp2 (float x) { -#if defined (HAVE_EXP2) +#if defined (HAVE_EXP2F) + return exp2f (x); +#elif defined (HAVE_EXP2) return exp2 (x); #else #if defined (M_LN2)