Mercurial > hg > octave-kai > gnulib-hg
diff tests/test-math.c @ 16763:a56cad559c24
math: Provide FP_ILOGB0 and FP_ILOGBNAN.
* lib/math.in.h (FP_ILOGB0, FP_ILOGBNAN): Define fallback.
* tests/test-math.c: Check that FP_ILOGB0, FP_ILOGBNAN are defined.
(main): Check their values.
* doc/posix-headers/math.texi: Mention the FP_ILOGB0, FP_ILOGBNAN
problem.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 03 Apr 2012 17:04:46 +0200 (2012-04-03) |
parents | af909bf507e4 |
children | e542fd46ad6f |
line wrap: on
line diff
--- a/tests/test-math.c +++ b/tests/test-math.c @@ -40,6 +40,18 @@ choke me #endif +#ifndef FP_ILOGB0 +# error FP_ILOGB0 should be defined +choke me +#endif + +#ifndef FP_ILOGBNAN +# error FP_ILOGBNAN should be defined +choke me +#endif + +#include <limits.h> + #include "macros.h" #if 0 @@ -82,5 +94,11 @@ ASSERT (numeric_equall (HUGE_VALL, HUGE_VALL + HUGE_VALL)); + /* Check the value of FP_ILOGB0. */ + ASSERT (FP_ILOGB0 == INT_MIN || FP_ILOGB0 == - INT_MAX); + + /* Check the value of FP_ILOGBNAN. */ + ASSERT (FP_ILOGBNAN == INT_MIN || FP_ILOGBNAN == INT_MAX); + return 0; }