Mercurial > hg > octave-lyh > gnulib-hg
changeset 15840:61fe30185561
math: Sort function declarations of math.in.h.
* lib/math.in.h (frexp, logb): Move declarations.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Thu, 06 Oct 2011 10:56:19 +0200 |
parents | bb3ef01b637c |
children | d26d12e238e1 |
files | ChangeLog lib/math.in.h |
diffstat | 2 files changed, 47 insertions(+), 39 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-10-06 Bruno Haible <bruno@clisp.org> + + math: Sort function declarations of math.in.h. + * lib/math.in.h (frexp, logb): Move declarations. + 2011-10-05 Bruno Haible <bruno@clisp.org> Tests for module 'modff'.
--- a/lib/math.in.h +++ b/lib/math.in.h @@ -108,45 +108,6 @@ #endif -/* Write x as - x = mantissa * 2^exp - where - If x finite and nonzero: 0.5 <= |mantissa| < 1.0. - If x is zero: mantissa = x, exp = 0. - If x is infinite or NaN: mantissa = x, exp unspecified. - Store exp in *EXPPTR and return mantissa. */ -#if @GNULIB_FREXP@ -# if @REPLACE_FREXP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define frexp rpl_frexp -# endif -_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); -# else -_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); -# endif -_GL_CXXALIASWARN (frexp); -#elif defined GNULIB_POSIXCHECK -# undef frexp -/* Assume frexp is always declared. */ -_GL_WARN_ON_USE (frexp, "frexp is unportable - " - "use gnulib module frexp for portability"); -#endif - - -#if @GNULIB_LOGB@ -# if !@HAVE_DECL_LOGB@ -_GL_EXTERN_C double logb (double x); -# endif -#elif defined GNULIB_POSIXCHECK -# undef logb -# if HAVE_RAW_DECL_LOGB -_GL_WARN_ON_USE (logb, "logb is unportable - " - "use gnulib module logb for portability"); -# endif -#endif - - #if @GNULIB_ACOSL@ # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@ _GL_FUNCDECL_SYS (acosl, long double, (long double x)); @@ -381,6 +342,31 @@ If x is zero: mantissa = x, exp = 0. If x is infinite or NaN: mantissa = x, exp unspecified. Store exp in *EXPPTR and return mantissa. */ +#if @GNULIB_FREXP@ +# if @REPLACE_FREXP@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define frexp rpl_frexp +# endif +_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr)); +# else +_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr)); +# endif +_GL_CXXALIASWARN (frexp); +#elif defined GNULIB_POSIXCHECK +# undef frexp +/* Assume frexp is always declared. */ +_GL_WARN_ON_USE (frexp, "frexp is unportable - " + "use gnulib module frexp for portability"); +#endif + +/* Write x as + x = mantissa * 2^exp + where + If x finite and nonzero: 0.5 <= |mantissa| < 1.0. + If x is zero: mantissa = x, exp = 0. + If x is infinite or NaN: mantissa = x, exp unspecified. + Store exp in *EXPPTR and return mantissa. */ #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef frexpl @@ -438,6 +424,19 @@ #endif +#if @GNULIB_LOGB@ +# if !@HAVE_DECL_LOGB@ +_GL_EXTERN_C double logb (double x); +# endif +#elif defined GNULIB_POSIXCHECK +# undef logb +# if HAVE_RAW_DECL_LOGB +_GL_WARN_ON_USE (logb, "logb is unportable - " + "use gnulib module logb for portability"); +# endif +#endif + + #if @GNULIB_LOGL@ # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@ _GL_FUNCDECL_SYS (logl, long double, (long double x)); @@ -652,6 +651,10 @@ #endif +/* Definitions of function-like macros come here, after the function + declarations. */ + + #if @GNULIB_ISFINITE@ # if @REPLACE_ISFINITE@ _GL_EXTERN_C int gl_isfinitef (float x);