logb: Provide missing declaration for Cygwin.
[pspp] / lib / math.in.h
1 /* A GNU-like <math.h>.
2
3    Copyright (C) 2002-2003, 2007-2010 Free Software Foundation, Inc.
4
5    This program is free software: you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 3 of the License, or
8    (at your option) any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
17
18 #ifndef _GL_MATH_H
19
20 #if __GNUC__ >= 3
21 @PRAGMA_SYSTEM_HEADER@
22 #endif
23
24 /* The include_next requires a split double-inclusion guard.  */
25 #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
26
27 #ifndef _GL_MATH_H
28 #define _GL_MATH_H
29
30
31 /* The definition of _GL_ARG_NONNULL is copied here.  */
32
33 /* The definition of _GL_WARN_ON_USE is copied here.  */
34
35 /* Helper macros to define a portability warning for the
36    classification macro FUNC called with VALUE.  POSIX declares the
37    classification macros with an argument of real-floating (that is,
38    one of float, double, or long double).  */
39 #define _GL_WARN_REAL_FLOATING_DECL(func) \
40 static inline int                                                   \
41 rpl_ ## func ## f (float f)                                         \
42 {                                                                   \
43   return func (f);                                                  \
44 }                                                                   \
45 static inline int                                                   \
46 rpl_ ## func ## d (double d)                                        \
47 {                                                                   \
48   return func (d);                                                  \
49 }                                                                   \
50 static inline int                                                   \
51 rpl_ ## func ## l (long double l)                                   \
52 {                                                                   \
53   return func (l);                                                  \
54 }                                                                   \
55 _GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - "       \
56                  "use gnulib module " #func " for portability");    \
57 _GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - "       \
58                  "use gnulib module " #func " for portability");    \
59 _GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - "       \
60                  "use gnulib module " #func " for portability")
61 #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
62   (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value)     \
63    : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value)  \
64    : rpl_ ## func ## l (value))
65
66
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70
71
72 /* POSIX allows platforms that don't support NAN.  But all major
73    machines in the past 15 years have supported something close to
74    IEEE NaN, so we define this unconditionally.  We also must define
75    it on platforms like Solaris 10, where NAN is present but defined
76    as a function pointer rather than a floating point constant.  */
77 #if !defined NAN || @REPLACE_NAN@
78 # undef NAN
79   /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0.  */
80 # ifdef __DECC
81 static float
82 _NaN ()
83 {
84   static float zero = 0.0f;
85   return zero / zero;
86 }
87 #  define NAN (_NaN())
88 # else
89 #  define NAN (0.0f / 0.0f)
90 # endif
91 #endif
92
93 /* Solaris 10 defines HUGE_VAL, but as a function pointer rather
94    than a floating point constant.  */
95 #if @REPLACE_HUGE_VAL@
96 # undef HUGE_VAL
97 # define HUGE_VAL (1.0 / 0.0)
98 #endif
99
100
101 /* Write x as
102      x = mantissa * 2^exp
103    where
104      If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
105      If x is zero: mantissa = x, exp = 0.
106      If x is infinite or NaN: mantissa = x, exp unspecified.
107    Store exp in *EXPPTR and return mantissa.  */
108 #if @GNULIB_FREXP@
109 # if @REPLACE_FREXP@
110 #  define frexp rpl_frexp
111 extern double frexp (double x, int *expptr) _GL_ARG_NONNULL ((2));
112 # endif
113 #elif defined GNULIB_POSIXCHECK
114 # undef frexp
115 /* Assume frexp is always declared.  */
116 _GL_WARN_ON_USE (frexp, "frexp is unportable - "
117                  "use gnulib module frexp for portability");
118 #endif
119
120
121 #if @GNULIB_LOGB@
122 # if !@HAVE_DECL_LOGB@
123 extern double logb (double x);
124 # endif
125 #elif defined GNULIB_POSIXCHECK
126 # undef logb
127 # if HAVE_RAW_DECL_LOGB
128 _GL_WARN_ON_USE (logb, "logb is unportable - "
129                  "use gnulib module logb for portability");
130 # endif
131 #endif
132
133
134 #if @GNULIB_ACOSL@
135 # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
136 extern long double acosl (long double x);
137 # endif
138 #elif defined GNULIB_POSIXCHECK
139 # undef acosl
140 # if HAVE_RAW_DECL_ACOSL
141 _GL_WARN_ON_USE (acosl, "acosl is unportable - "
142                  "use gnulib module mathl for portability");
143 # endif
144 #endif
145
146
147 #if @GNULIB_ASINL@
148 # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
149 extern long double asinl (long double x);
150 # endif
151 #elif defined GNULIB_POSIXCHECK
152 # undef asinl
153 # if HAVE_RAW_DECL_ASINL
154 _GL_WARN_ON_USE (asinl, "asinl is unportable - "
155                  "use gnulib module mathl for portability");
156 # endif
157 #endif
158
159
160 #if @GNULIB_ATANL@
161 # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
162 extern long double atanl (long double x);
163 # endif
164 #elif defined GNULIB_POSIXCHECK
165 # undef atanl
166 # if HAVE_RAW_DECL_ATANL
167 _GL_WARN_ON_USE (atanl, "atanl is unportable - "
168                  "use gnulib module mathl for portability");
169 # endif
170 #endif
171
172
173 #if @GNULIB_CEILF@
174 # if @REPLACE_CEILF@
175 #  define ceilf rpl_ceilf
176 extern float ceilf (float x);
177 # endif
178 #elif defined GNULIB_POSIXCHECK
179 # undef ceilf
180 # if HAVE_RAW_DECL_CEILF
181 _GL_WARN_ON_USE (ceilf, "ceilf is unportable - "
182                  "use gnulib module ceilf for portability");
183 # endif
184 #endif
185
186 #if @GNULIB_CEILL@
187 # if @REPLACE_CEILL@
188 #  define ceill rpl_ceill
189 extern long double ceill (long double x);
190 # endif
191 #elif defined GNULIB_POSIXCHECK
192 # undef ceill
193 # if HAVE_RAW_DECL_CEILL
194 _GL_WARN_ON_USE (ceill, "ceill is unportable - "
195                  "use gnulib module ceill for portability");
196 # endif
197 #endif
198
199
200 #if @GNULIB_COSL@
201 # if !@HAVE_COSL@
202 #  undef cosl
203 #  define cosl rpl_cosl
204 # endif
205 # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
206 extern long double cosl (long double x);
207 # endif
208 #elif defined GNULIB_POSIXCHECK
209 # undef cosl
210 # if HAVE_RAW_DECL_COSL
211 _GL_WARN_ON_USE (cosl, "cosl is unportable - "
212                  "use gnulib module mathl for portability");
213 # endif
214 #endif
215
216
217 #if @GNULIB_EXPL@
218 # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
219 extern long double expl (long double x);
220 # endif
221 #elif defined GNULIB_POSIXCHECK
222 # undef expl
223 # if HAVE_RAW_DECL_EXPL
224 _GL_WARN_ON_USE (expl, "expl is unportable - "
225                  "use gnulib module mathl for portability");
226 # endif
227 #endif
228
229
230 #if @GNULIB_FLOORF@
231 # if @REPLACE_FLOORF@
232 #  define floorf rpl_floorf
233 extern float floorf (float x);
234 # endif
235 #elif defined GNULIB_POSIXCHECK
236 # undef floorf
237 # if HAVE_RAW_DECL_FLOORF
238 _GL_WARN_ON_USE (floorf, "floorf is unportable - "
239                  "use gnulib module floorf for portability");
240 # endif
241 #endif
242
243 #if @GNULIB_FLOORL@
244 # if @REPLACE_FLOORL@
245 #  define floorl rpl_floorl
246 extern long double floorl (long double x);
247 # endif
248 #elif defined GNULIB_POSIXCHECK
249 # undef floorl
250 # if HAVE_RAW_DECL_FLOORL
251 _GL_WARN_ON_USE (floorl, "floorl is unportable - "
252                  "use gnulib module floorl for portability");
253 # endif
254 #endif
255
256
257 /* Write x as
258      x = mantissa * 2^exp
259    where
260      If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
261      If x is zero: mantissa = x, exp = 0.
262      If x is infinite or NaN: mantissa = x, exp unspecified.
263    Store exp in *EXPPTR and return mantissa.  */
264 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
265 # define frexpl rpl_frexpl
266 #endif
267 #if (@GNULIB_FREXPL@ && @REPLACE_FREXPL@) || !@HAVE_DECL_FREXPL@
268 extern long double frexpl (long double x, int *expptr) _GL_ARG_NONNULL ((2));
269 #endif
270 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
271 # undef frexpl
272 # if HAVE_RAW_DECL_FREXPL
273 _GL_WARN_ON_USE (frexpl, "frexpl is unportable - "
274                  "use gnulib module frexpl for portability");
275 # endif
276 #endif
277
278
279 /* Return x * 2^exp.  */
280 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
281 # define ldexpl rpl_ldexpl
282 #endif
283 #if (@GNULIB_LDEXPL@ && @REPLACE_LDEXPL@) || !@HAVE_DECL_LDEXPL@
284 extern long double ldexpl (long double x, int exp);
285 #endif
286 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
287 # undef ldexpl
288 # if HAVE_RAW_DECL_LDEXPL
289 _GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - "
290                  "use gnulib module ldexpl for portability");
291 # endif
292 #endif
293
294
295 #if @GNULIB_LOGL@
296 # if !@HAVE_LOGL@
297 #  undef logl
298 #  define logl rpl_logl
299 # endif
300 # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
301 extern long double logl (long double x);
302 # endif
303 #elif defined GNULIB_POSIXCHECK
304 # undef logl
305 # if HAVE_RAW_DECL_LOGL
306 _GL_WARN_ON_USE (logl, "logl is unportable - "
307                  "use gnulib module mathl for portability");
308 # endif
309 #endif
310
311
312 #if @GNULIB_ROUNDF@
313 # if @REPLACE_ROUNDF@
314 #  undef roundf
315 #  define roundf rpl_roundf
316 extern float roundf (float x);
317 # endif
318 #elif defined GNULIB_POSIXCHECK
319 # undef roundf
320 # if HAVE_RAW_DECL_ROUNDF
321 _GL_WARN_ON_USE (roundf, "roundf is unportable - "
322                  "use gnulib module roundf for portability");
323 # endif
324 #endif
325
326 #if @GNULIB_ROUND@
327 # if @REPLACE_ROUND@
328 #  undef round
329 #  define round rpl_round
330 extern double round (double x);
331 # endif
332 #elif defined GNULIB_POSIXCHECK
333 # undef round
334 # if HAVE_RAW_DECL_ROUND
335 _GL_WARN_ON_USE (round, "round is unportable - "
336                  "use gnulib module round for portability");
337 # endif
338 #endif
339
340 #if @GNULIB_ROUNDL@
341 # if @REPLACE_ROUNDL@
342 #  undef roundl
343 #  define roundl rpl_roundl
344 extern long double roundl (long double x);
345 # endif
346 #elif defined GNULIB_POSIXCHECK
347 # undef roundl
348 # if HAVE_RAW_DECL_ROUNDL
349 _GL_WARN_ON_USE (roundl, "roundl is unportable - "
350                  "use gnulib module roundl for portability");
351 # endif
352 #endif
353
354
355 #if @GNULIB_SINL@
356 # if !@HAVE_SINL@
357 #  undef sinl
358 #  define sinl rpl_sinl
359 # endif
360 # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
361 extern long double sinl (long double x);
362 # endif
363 #elif defined GNULIB_POSIXCHECK
364 # undef sinl
365 # if HAVE_RAW_DECL_SINL
366 _GL_WARN_ON_USE (sinl, "sinl is unportable - "
367                  "use gnulib module mathl for portability");
368 # endif
369 #endif
370
371
372 #if @GNULIB_SQRTL@
373 # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
374 extern long double sqrtl (long double x);
375 # endif
376 #elif defined GNULIB_POSIXCHECK
377 # undef sqrtl
378 # if HAVE_RAW_DECL_SQRTL
379 _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - "
380                  "use gnulib module mathl for portability");
381 # endif
382 #endif
383
384
385 #if @GNULIB_TANL@
386 # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
387 extern long double tanl (long double x);
388 # endif
389 #elif defined GNULIB_POSIXCHECK
390 # undef tanl
391 # if HAVE_RAW_DECL_TANL
392 _GL_WARN_ON_USE (tanl, "tanl is unportable - "
393                  "use gnulib module mathl for portability");
394 # endif
395 #endif
396
397
398 #if @GNULIB_TRUNCF@
399 # if !@HAVE_DECL_TRUNCF@
400 #  define truncf rpl_truncf
401 extern float truncf (float x);
402 # endif
403 #elif defined GNULIB_POSIXCHECK
404 # undef truncf
405 # if HAVE_RAW_DECL_TRUNCF
406 _GL_WARN_ON_USE (truncf, "truncf is unportable - "
407                  "use gnulib module truncf for portability");
408 # endif
409 #endif
410
411 #if @GNULIB_TRUNC@
412 # if !@HAVE_DECL_TRUNC@
413 #  define trunc rpl_trunc
414 extern double trunc (double x);
415 # endif
416 #elif defined GNULIB_POSIXCHECK
417 # undef trunc
418 # if HAVE_RAW_DECL_TRUNC
419 _GL_WARN_ON_USE (trunc, "trunc is unportable - "
420                  "use gnulib module trunc for portability");
421 # endif
422 #endif
423
424 #if @GNULIB_TRUNCL@
425 # if @REPLACE_TRUNCL@
426 #  undef truncl
427 #  define truncl rpl_truncl
428 extern long double truncl (long double x);
429 # endif
430 #elif defined GNULIB_POSIXCHECK
431 # undef truncl
432 # if HAVE_RAW_DECL_TRUNCL
433 _GL_WARN_ON_USE (truncl, "truncl is unportable - "
434                  "use gnulib module truncl for portability");
435 # endif
436 #endif
437
438
439 #if @GNULIB_ISFINITE@
440 # if @REPLACE_ISFINITE@
441 extern int gl_isfinitef (float x);
442 extern int gl_isfinited (double x);
443 extern int gl_isfinitel (long double x);
444 #  undef isfinite
445 #  define isfinite(x) \
446    (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
447     sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
448     gl_isfinitef (x))
449 # endif
450 #elif defined GNULIB_POSIXCHECK
451 # if defined isfinite
452 _GL_WARN_REAL_FLOATING_DECL (isfinite);
453 #  undef isfinite
454 #  define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
455 # endif
456 #endif
457
458
459 #if @GNULIB_ISINF@
460 # if @REPLACE_ISINF@
461 extern int gl_isinff (float x);
462 extern int gl_isinfd (double x);
463 extern int gl_isinfl (long double x);
464 #  undef isinf
465 #  define isinf(x) \
466    (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
467     sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
468     gl_isinff (x))
469 # endif
470 #elif defined GNULIB_POSIXCHECK
471 # if defined isinf
472 _GL_WARN_REAL_FLOATING_DECL (isinf);
473 #  undef isinf
474 #  define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
475 # endif
476 #endif
477
478
479 #if @GNULIB_ISNANF@
480 /* Test for NaN for 'float' numbers.  */
481 # if @HAVE_ISNANF@
482 /* The original <math.h> included above provides a declaration of isnan macro
483    or (older) isnanf function.  */
484 #  if __GNUC__ >= 4
485     /* GCC 4.0 and newer provides three built-ins for isnan.  */
486 #   undef isnanf
487 #   define isnanf(x) __builtin_isnanf ((float)(x))
488 #  elif defined isnan
489 #   undef isnanf
490 #   define isnanf(x) isnan ((float)(x))
491 #  endif
492 # else
493 /* Test whether X is a NaN.  */
494 #  undef isnanf
495 #  define isnanf rpl_isnanf
496 extern int isnanf (float x);
497 # endif
498 #endif
499
500 #if @GNULIB_ISNAND@
501 /* Test for NaN for 'double' numbers.
502    This function is a gnulib extension, unlike isnan() which applied only
503    to 'double' numbers earlier but now is a type-generic macro.  */
504 # if @HAVE_ISNAND@
505 /* The original <math.h> included above provides a declaration of isnan macro.  */
506 #  if __GNUC__ >= 4
507     /* GCC 4.0 and newer provides three built-ins for isnan.  */
508 #   undef isnand
509 #   define isnand(x) __builtin_isnan ((double)(x))
510 #  else
511 #   undef isnand
512 #   define isnand(x) isnan ((double)(x))
513 #  endif
514 # else
515 /* Test whether X is a NaN.  */
516 #  undef isnand
517 #  define isnand rpl_isnand
518 extern int isnand (double x);
519 # endif
520 #endif
521
522 #if @GNULIB_ISNANL@
523 /* Test for NaN for 'long double' numbers.  */
524 # if @HAVE_ISNANL@
525 /* The original <math.h> included above provides a declaration of isnan macro or (older) isnanl function.  */
526 #  if __GNUC__ >= 4
527     /* GCC 4.0 and newer provides three built-ins for isnan.  */
528 #   undef isnanl
529 #   define isnanl(x) __builtin_isnanl ((long double)(x))
530 #  elif defined isnan
531 #   undef isnanl
532 #   define isnanl(x) isnan ((long double)(x))
533 #  endif
534 # else
535 /* Test whether X is a NaN.  */
536 #  undef isnanl
537 #  define isnanl rpl_isnanl
538 extern int isnanl (long double x);
539 # endif
540 #endif
541
542 /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL!  */
543 #if @GNULIB_ISNAN@
544 # if @REPLACE_ISNAN@
545 /* We can't just use the isnanf macro (e.g.) as exposed by
546    isnanf.h (e.g.) here, because those may end up being macros
547    that recursively expand back to isnan.  So use the gnulib
548    replacements for them directly. */
549 #  if @HAVE_ISNANF@ && __GNUC__ >= 4
550 #   define gl_isnan_f(x) __builtin_isnan ((float)(x))
551 #  else
552 extern int rpl_isnanf (float x);
553 #   define gl_isnan_f(x) rpl_isnanf (x)
554 #  endif
555 #  if @HAVE_ISNAND@ && __GNUC__ >= 4
556 #   define gl_isnan_d(x) __builtin_isnan ((double)(x))
557 #  else
558 extern int rpl_isnand (double x);
559 #   define gl_isnan_d(x) rpl_isnand (x)
560 #  endif
561 #  if @HAVE_ISNANL@ && __GNUC__ >= 4
562 #   define gl_isnan_l(x) __builtin_isnan ((long double)(x))
563 #  else
564 extern int rpl_isnanl (long double x);
565 #   define gl_isnan_l(x) rpl_isnanl (x)
566 #  endif
567 #  undef isnan
568 #  define isnan(x) \
569    (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
570     sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
571     gl_isnan_f (x))
572 # endif
573 #elif defined GNULIB_POSIXCHECK
574 # if defined isnan
575 _GL_WARN_REAL_FLOATING_DECL (isnan);
576 #  undef isnan
577 #  define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
578 # endif
579 #endif
580
581
582 #if @GNULIB_SIGNBIT@
583 # if @REPLACE_SIGNBIT_USING_GCC@
584 #  undef signbit
585    /* GCC 4.0 and newer provides three built-ins for signbit.  */
586 #  define signbit(x) \
587    (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
588     sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
589     __builtin_signbitf (x))
590 # endif
591 # if @REPLACE_SIGNBIT@
592 #  undef signbit
593 extern int gl_signbitf (float arg);
594 extern int gl_signbitd (double arg);
595 extern int gl_signbitl (long double arg);
596 #  if __GNUC__ >= 2 && !__STRICT_ANSI__
597 #   if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
598 #    define gl_signbitf_OPTIMIZED_MACRO
599 #    define gl_signbitf(arg) \
600        ({ union { float _value;                                         \
601                   unsigned int _word[(sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \
602                 } _m;                                                   \
603           _m._value = (arg);                                            \
604           (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1;          \
605         })
606 #   endif
607 #   if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
608 #    define gl_signbitd_OPTIMIZED_MACRO
609 #    define gl_signbitd(arg) \
610        ({ union { double _value;                                                \
611                   unsigned int _word[(sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \
612                 } _m;                                                   \
613           _m._value = (arg);                                            \
614           (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1;          \
615         })
616 #   endif
617 #   if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
618 #    define gl_signbitl_OPTIMIZED_MACRO
619 #    define gl_signbitl(arg) \
620        ({ union { long double _value;                                   \
621                   unsigned int _word[(sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \
622                 } _m;                                                   \
623           _m._value = (arg);                                            \
624           (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1;                \
625         })
626 #   endif
627 #  endif
628 #  define signbit(x) \
629    (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
630     sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
631     gl_signbitf (x))
632 # endif
633 #elif defined GNULIB_POSIXCHECK
634 # if defined signbit
635 _GL_WARN_REAL_FLOATING_DECL (signbit);
636 #  undef signbit
637 #  define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
638 # endif
639 #endif
640
641
642 #ifdef __cplusplus
643 }
644 #endif
645
646 #endif /* _GL_MATH_H */
647 #endif /* _GL_MATH_H */