1 /* A GNU-like <math.h>.
3 Copyright (C) 2002-2003, 2007-2012 Free Software Foundation, Inc.
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.
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.
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/>. */
18 #ifndef _@GUARD_PREFIX@_MATH_H
21 @PRAGMA_SYSTEM_HEADER@
25 /* The include_next requires a split double-inclusion guard. */
26 #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
28 #ifndef _@GUARD_PREFIX@_MATH_H
29 #define _@GUARD_PREFIX@_MATH_H
32 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
34 /* The definition of _GL_ARG_NONNULL is copied here. */
36 /* The definition of _GL_WARN_ON_USE is copied here. */
39 /* Helper macros to define type-generic function FUNC as overloaded functions,
40 rather than as macros like in C. POSIX declares these with an argument of
41 real-floating (that is, one of float, double, or long double). */
42 # define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \
44 _gl_cxx_ ## func ## f (float f) \
49 _gl_cxx_ ## func ## d (double d) \
54 _gl_cxx_ ## func ## l (long double l) \
58 # define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \
62 return _gl_cxx_ ## func ## f (f); \
67 return _gl_cxx_ ## func ## d (d); \
70 func (long double l) \
72 return _gl_cxx_ ## func ## l (l); \
76 /* Helper macros to define a portability warning for the
77 classification macro FUNC called with VALUE. POSIX declares the
78 classification macros with an argument of real-floating (that is,
79 one of float, double, or long double). */
80 #define _GL_WARN_REAL_FLOATING_DECL(func) \
82 rpl_ ## func ## f (float f) \
87 rpl_ ## func ## d (double d) \
92 rpl_ ## func ## l (long double l) \
96 _GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - " \
97 "use gnulib module " #func " for portability"); \
98 _GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - " \
99 "use gnulib module " #func " for portability"); \
100 _GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \
101 "use gnulib module " #func " for portability")
102 #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
103 (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \
104 : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \
105 : rpl_ ## func ## l (value))
109 /* Pull in a function that fixes the 'int' to 'long double' conversion
111 _GL_EXTERN_C
void _Qp_itoq (long double *, int);
112 static void (*_gl_math_fix_itold
) (long double *, int) = _Qp_itoq
;
116 /* POSIX allows platforms that don't support NAN. But all major
117 machines in the past 15 years have supported something close to
118 IEEE NaN, so we define this unconditionally. We also must define
119 it on platforms like Solaris 10, where NAN is present but defined
120 as a function pointer rather than a floating point constant. */
121 #if !defined NAN || @REPLACE_NAN@
122 # if !GNULIB_defined_NAN
124 /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
125 choke on the expression 0.0 / 0.0. */
126 # if defined __DECC || defined _MSC_VER
130 static float zero
= 0.0f
;
133 # define NAN (_NaN())
135 # define NAN (0.0f / 0.0f)
137 # define GNULIB_defined_NAN 1
141 /* Solaris 10 defines HUGE_VAL, but as a function pointer rather
142 than a floating point constant. */
143 #if @REPLACE_HUGE_VAL@
145 # define HUGE_VALF (1.0f / 0.0f)
147 # define HUGE_VAL (1.0 / 0.0)
149 # define HUGE_VALL (1.0L / 0.0L)
152 /* HUGE_VALF is a 'float' Infinity. */
154 # if defined _MSC_VER
155 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
156 # define HUGE_VALF (1e25f * 1e25f)
158 # define HUGE_VALF (1.0f / 0.0f)
162 /* HUGE_VAL is a 'double' Infinity. */
164 # if defined _MSC_VER
165 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
166 # define HUGE_VAL (1e250 * 1e250)
168 # define HUGE_VAL (1.0 / 0.0)
172 /* HUGE_VALL is a 'long double' Infinity. */
174 # if defined _MSC_VER
175 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
176 # define HUGE_VALL (1e250L * 1e250L)
178 # define HUGE_VALL (1.0L / 0.0L)
183 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
184 #if !(defined FP_ILOGB0 && defined FP_ILOGBNAN)
185 # if defined __NetBSD__ || defined __sgi
186 /* NetBSD, IRIX 6.5: match what ilogb() does */
187 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
188 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
190 /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
191 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
192 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
194 /* Solaris 9: match what ilogb() does */
195 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
196 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
198 /* Gnulib defined values. */
199 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
200 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
208 _GL_FUNCDECL_SYS (acosf
, float, (float x
));
210 _GL_CXXALIAS_SYS (acosf
, float, (float x
));
211 _GL_CXXALIASWARN (acosf
);
212 #elif defined GNULIB_POSIXCHECK
214 # if HAVE_RAW_DECL_ACOSF
215 _GL_WARN_ON_USE (acosf
, "acosf is unportable - "
216 "use gnulib module acosf for portability");
221 # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
223 _GL_FUNCDECL_SYS (acosl
, long double, (long double x
));
225 _GL_CXXALIAS_SYS (acosl
, long double, (long double x
));
226 _GL_CXXALIASWARN (acosl
);
227 #elif defined GNULIB_POSIXCHECK
229 # if HAVE_RAW_DECL_ACOSL
230 _GL_WARN_ON_USE (acosl
, "acosl is unportable - "
231 "use gnulib module acosl for portability");
239 _GL_FUNCDECL_SYS (asinf
, float, (float x
));
241 _GL_CXXALIAS_SYS (asinf
, float, (float x
));
242 _GL_CXXALIASWARN (asinf
);
243 #elif defined GNULIB_POSIXCHECK
245 # if HAVE_RAW_DECL_ASINF
246 _GL_WARN_ON_USE (asinf
, "asinf is unportable - "
247 "use gnulib module asinf for portability");
252 # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
254 _GL_FUNCDECL_SYS (asinl
, long double, (long double x
));
256 _GL_CXXALIAS_SYS (asinl
, long double, (long double x
));
257 _GL_CXXALIASWARN (asinl
);
258 #elif defined GNULIB_POSIXCHECK
260 # if HAVE_RAW_DECL_ASINL
261 _GL_WARN_ON_USE (asinl
, "asinl is unportable - "
262 "use gnulib module asinl for portability");
270 _GL_FUNCDECL_SYS (atanf
, float, (float x
));
272 _GL_CXXALIAS_SYS (atanf
, float, (float x
));
273 _GL_CXXALIASWARN (atanf
);
274 #elif defined GNULIB_POSIXCHECK
276 # if HAVE_RAW_DECL_ATANF
277 _GL_WARN_ON_USE (atanf
, "atanf is unportable - "
278 "use gnulib module atanf for portability");
283 # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
285 _GL_FUNCDECL_SYS (atanl
, long double, (long double x
));
287 _GL_CXXALIAS_SYS (atanl
, long double, (long double x
));
288 _GL_CXXALIASWARN (atanl
);
289 #elif defined GNULIB_POSIXCHECK
291 # if HAVE_RAW_DECL_ATANL
292 _GL_WARN_ON_USE (atanl
, "atanl is unportable - "
293 "use gnulib module atanl for portability");
301 _GL_FUNCDECL_SYS (atan2f
, float, (float y
, float x
));
303 _GL_CXXALIAS_SYS (atan2f
, float, (float y
, float x
));
304 _GL_CXXALIASWARN (atan2f
);
305 #elif defined GNULIB_POSIXCHECK
307 # if HAVE_RAW_DECL_ATAN2F
308 _GL_WARN_ON_USE (atan2f
, "atan2f is unportable - "
309 "use gnulib module atan2f for portability");
316 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
318 # define cbrtf rpl_cbrtf
320 _GL_FUNCDECL_RPL (cbrtf
, float, (float x
));
321 _GL_CXXALIAS_RPL (cbrtf
, float, (float x
));
323 # if !@HAVE_DECL_CBRTF@
324 _GL_FUNCDECL_SYS (cbrtf
, float, (float x
));
326 _GL_CXXALIAS_SYS (cbrtf
, float, (float x
));
328 _GL_CXXALIASWARN (cbrtf
);
329 #elif defined GNULIB_POSIXCHECK
331 # if HAVE_RAW_DECL_CBRTF
332 _GL_WARN_ON_USE (cbrtf
, "cbrtf is unportable - "
333 "use gnulib module cbrtf for portability");
339 _GL_FUNCDECL_SYS (cbrt
, double, (double x
));
341 _GL_CXXALIAS_SYS (cbrt
, double, (double x
));
342 _GL_CXXALIASWARN (cbrt
);
343 #elif defined GNULIB_POSIXCHECK
345 # if HAVE_RAW_DECL_CBRT
346 _GL_WARN_ON_USE (cbrt
, "cbrt is unportable - "
347 "use gnulib module cbrt for portability");
353 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
355 # define cbrtl rpl_cbrtl
357 _GL_FUNCDECL_RPL (cbrtl
, long double, (long double x
));
358 _GL_CXXALIAS_RPL (cbrtl
, long double, (long double x
));
360 # if !@HAVE_DECL_CBRTL@
361 _GL_FUNCDECL_SYS (cbrtl
, long double, (long double x
));
363 _GL_CXXALIAS_SYS (cbrtl
, long double, (long double x
));
365 _GL_CXXALIASWARN (cbrtl
);
366 #elif defined GNULIB_POSIXCHECK
368 # if HAVE_RAW_DECL_CBRTL
369 _GL_WARN_ON_USE (cbrtl
, "cbrtl is unportable - "
370 "use gnulib module cbrtl for portability");
377 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
379 # define ceilf rpl_ceilf
381 _GL_FUNCDECL_RPL (ceilf
, float, (float x
));
382 _GL_CXXALIAS_RPL (ceilf
, float, (float x
));
384 # if !@HAVE_DECL_CEILF@
386 _GL_FUNCDECL_SYS (ceilf
, float, (float x
));
388 _GL_CXXALIAS_SYS (ceilf
, float, (float x
));
390 _GL_CXXALIASWARN (ceilf
);
391 #elif defined GNULIB_POSIXCHECK
393 # if HAVE_RAW_DECL_CEILF
394 _GL_WARN_ON_USE (ceilf
, "ceilf is unportable - "
395 "use gnulib module ceilf for portability");
401 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
402 # define ceil rpl_ceil
404 _GL_FUNCDECL_RPL (ceil
, double, (double x
));
405 _GL_CXXALIAS_RPL (ceil
, double, (double x
));
407 _GL_CXXALIAS_SYS (ceil
, double, (double x
));
409 _GL_CXXALIASWARN (ceil
);
414 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
416 # define ceill rpl_ceill
418 _GL_FUNCDECL_RPL (ceill
, long double, (long double x
));
419 _GL_CXXALIAS_RPL (ceill
, long double, (long double x
));
421 # if !@HAVE_DECL_CEILL@
423 _GL_FUNCDECL_SYS (ceill
, long double, (long double x
));
425 _GL_CXXALIAS_SYS (ceill
, long double, (long double x
));
427 _GL_CXXALIASWARN (ceill
);
428 #elif defined GNULIB_POSIXCHECK
430 # if HAVE_RAW_DECL_CEILL
431 _GL_WARN_ON_USE (ceill
, "ceill is unportable - "
432 "use gnulib module ceill for portability");
437 #if @GNULIB_COPYSIGNF@
438 # if !@HAVE_DECL_COPYSIGNF@
439 _GL_FUNCDECL_SYS (copysignf
, float, (float x
, float y
));
441 _GL_CXXALIAS_SYS (copysignf
, float, (float x
, float y
));
442 _GL_CXXALIASWARN (copysignf
);
443 #elif defined GNULIB_POSIXCHECK
445 # if HAVE_RAW_DECL_COPYSIGNF
446 _GL_WARN_ON_USE (copysignf
, "copysignf is unportable - "
447 "use gnulib module copysignf for portability");
451 #if @GNULIB_COPYSIGN@
452 # if !@HAVE_COPYSIGN@
453 _GL_FUNCDECL_SYS (copysign
, double, (double x
, double y
));
455 _GL_CXXALIAS_SYS (copysign
, double, (double x
, double y
));
456 _GL_CXXALIASWARN (copysign
);
457 #elif defined GNULIB_POSIXCHECK
459 # if HAVE_RAW_DECL_COPYSIGN
460 _GL_WARN_ON_USE (copysign
, "copysign is unportable - "
461 "use gnulib module copysign for portability");
465 #if @GNULIB_COPYSIGNL@
466 # if !@HAVE_COPYSIGNL@
467 _GL_FUNCDECL_SYS (copysignl
, long double, (long double x
, long double y
));
469 _GL_CXXALIAS_SYS (copysignl
, long double, (long double x
, long double y
));
470 _GL_CXXALIASWARN (copysignl
);
471 #elif defined GNULIB_POSIXCHECK
473 # if HAVE_RAW_DECL_COPYSIGNL
474 _GL_WARN_ON_USE (copysign
, "copysignl is unportable - "
475 "use gnulib module copysignl for portability");
483 _GL_FUNCDECL_SYS (cosf
, float, (float x
));
485 _GL_CXXALIAS_SYS (cosf
, float, (float x
));
486 _GL_CXXALIASWARN (cosf
);
487 #elif defined GNULIB_POSIXCHECK
489 # if HAVE_RAW_DECL_COSF
490 _GL_WARN_ON_USE (cosf
, "cosf is unportable - "
491 "use gnulib module cosf for portability");
496 # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
498 _GL_FUNCDECL_SYS (cosl
, long double, (long double x
));
500 _GL_CXXALIAS_SYS (cosl
, long double, (long double x
));
501 _GL_CXXALIASWARN (cosl
);
502 #elif defined GNULIB_POSIXCHECK
504 # if HAVE_RAW_DECL_COSL
505 _GL_WARN_ON_USE (cosl
, "cosl is unportable - "
506 "use gnulib module cosl for portability");
514 _GL_FUNCDECL_SYS (coshf
, float, (float x
));
516 _GL_CXXALIAS_SYS (coshf
, float, (float x
));
517 _GL_CXXALIASWARN (coshf
);
518 #elif defined GNULIB_POSIXCHECK
520 # if HAVE_RAW_DECL_COSHF
521 _GL_WARN_ON_USE (coshf
, "coshf is unportable - "
522 "use gnulib module coshf for portability");
530 _GL_FUNCDECL_SYS (expf
, float, (float x
));
532 _GL_CXXALIAS_SYS (expf
, float, (float x
));
533 _GL_CXXALIASWARN (expf
);
534 #elif defined GNULIB_POSIXCHECK
536 # if HAVE_RAW_DECL_EXPF
537 _GL_WARN_ON_USE (expf
, "expf is unportable - "
538 "use gnulib module expf for portability");
543 # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
545 _GL_FUNCDECL_SYS (expl
, long double, (long double x
));
547 _GL_CXXALIAS_SYS (expl
, long double, (long double x
));
548 _GL_CXXALIASWARN (expl
);
549 #elif defined GNULIB_POSIXCHECK
551 # if HAVE_RAW_DECL_EXPL
552 _GL_WARN_ON_USE (expl
, "expl is unportable - "
553 "use gnulib module expl for portability");
559 # if !@HAVE_DECL_EXP2F@
560 _GL_FUNCDECL_SYS (exp2f
, float, (float x
));
562 _GL_CXXALIAS_SYS (exp2f
, float, (float x
));
563 _GL_CXXALIASWARN (exp2f
);
564 #elif defined GNULIB_POSIXCHECK
566 # if HAVE_RAW_DECL_EXP2F
567 _GL_WARN_ON_USE (exp2f
, "exp2f is unportable - "
568 "use gnulib module exp2f for portability");
574 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
576 # define exp2 rpl_exp2
578 _GL_FUNCDECL_RPL (exp2
, double, (double x
));
579 _GL_CXXALIAS_RPL (exp2
, double, (double x
));
581 # if !@HAVE_DECL_EXP2@
582 _GL_FUNCDECL_SYS (exp2
, double, (double x
));
584 _GL_CXXALIAS_SYS (exp2
, double, (double x
));
586 _GL_CXXALIASWARN (exp2
);
587 #elif defined GNULIB_POSIXCHECK
589 # if HAVE_RAW_DECL_EXP2
590 _GL_WARN_ON_USE (exp2
, "exp2 is unportable - "
591 "use gnulib module exp2 for portability");
597 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
599 # define exp2l rpl_exp2l
601 _GL_FUNCDECL_RPL (exp2l
, long double, (long double x
));
602 _GL_CXXALIAS_RPL (exp2l
, long double, (long double x
));
604 # if !@HAVE_DECL_EXP2L@
606 _GL_FUNCDECL_SYS (exp2l
, long double, (long double x
));
608 _GL_CXXALIAS_SYS (exp2l
, long double, (long double x
));
610 _GL_CXXALIASWARN (exp2l
);
611 #elif defined GNULIB_POSIXCHECK
613 # if HAVE_RAW_DECL_EXP2L
614 _GL_WARN_ON_USE (exp2l
, "exp2l is unportable - "
615 "use gnulib module exp2l for portability");
621 # if @REPLACE_EXPM1F@
622 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
624 # define expm1f rpl_expm1f
626 _GL_FUNCDECL_RPL (expm1f
, float, (float x
));
627 _GL_CXXALIAS_RPL (expm1f
, float, (float x
));
630 _GL_FUNCDECL_SYS (expm1f
, float, (float x
));
632 _GL_CXXALIAS_SYS (expm1f
, float, (float x
));
634 _GL_CXXALIASWARN (expm1f
);
635 #elif defined GNULIB_POSIXCHECK
637 # if HAVE_RAW_DECL_EXPM1F
638 _GL_WARN_ON_USE (expm1f
, "expm1f is unportable - "
639 "use gnulib module expm1f for portability");
645 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
647 # define expm1 rpl_expm1
649 _GL_FUNCDECL_RPL (expm1
, double, (double x
));
650 _GL_CXXALIAS_RPL (expm1
, double, (double x
));
653 _GL_FUNCDECL_SYS (expm1
, double, (double x
));
655 _GL_CXXALIAS_SYS (expm1
, double, (double x
));
657 _GL_CXXALIASWARN (expm1
);
658 #elif defined GNULIB_POSIXCHECK
660 # if HAVE_RAW_DECL_EXPM1
661 _GL_WARN_ON_USE (expm1
, "expm1 is unportable - "
662 "use gnulib module expm1 for portability");
667 # if !@HAVE_DECL_EXPM1L@
669 _GL_FUNCDECL_SYS (expm1l
, long double, (long double x
));
671 _GL_CXXALIAS_SYS (expm1l
, long double, (long double x
));
672 _GL_CXXALIASWARN (expm1l
);
673 #elif defined GNULIB_POSIXCHECK
675 # if HAVE_RAW_DECL_EXPM1L
676 _GL_WARN_ON_USE (expm1l
, "expm1l is unportable - "
677 "use gnulib module expm1l for portability");
685 _GL_FUNCDECL_SYS (fabsf
, float, (float x
));
687 _GL_CXXALIAS_SYS (fabsf
, float, (float x
));
688 _GL_CXXALIASWARN (fabsf
);
689 #elif defined GNULIB_POSIXCHECK
691 # if HAVE_RAW_DECL_FABSF
692 _GL_WARN_ON_USE (fabsf
, "fabsf is unportable - "
693 "use gnulib module fabsf for portability");
699 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
701 # define fabsl rpl_fabsl
703 _GL_FUNCDECL_RPL (fabsl
, long double, (long double x
));
704 _GL_CXXALIAS_RPL (fabsl
, long double, (long double x
));
708 _GL_FUNCDECL_SYS (fabsl
, long double, (long double x
));
710 _GL_CXXALIAS_SYS (fabsl
, long double, (long double x
));
712 _GL_CXXALIASWARN (fabsl
);
713 #elif defined GNULIB_POSIXCHECK
715 # if HAVE_RAW_DECL_FABSL
716 _GL_WARN_ON_USE (fabsl
, "fabsl is unportable - "
717 "use gnulib module fabsl for portability");
723 # if @REPLACE_FLOORF@
724 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
726 # define floorf rpl_floorf
728 _GL_FUNCDECL_RPL (floorf
, float, (float x
));
729 _GL_CXXALIAS_RPL (floorf
, float, (float x
));
731 # if !@HAVE_DECL_FLOORF@
733 _GL_FUNCDECL_SYS (floorf
, float, (float x
));
735 _GL_CXXALIAS_SYS (floorf
, float, (float x
));
737 _GL_CXXALIASWARN (floorf
);
738 #elif defined GNULIB_POSIXCHECK
740 # if HAVE_RAW_DECL_FLOORF
741 _GL_WARN_ON_USE (floorf
, "floorf is unportable - "
742 "use gnulib module floorf for portability");
748 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
749 # define floor rpl_floor
751 _GL_FUNCDECL_RPL (floor
, double, (double x
));
752 _GL_CXXALIAS_RPL (floor
, double, (double x
));
754 _GL_CXXALIAS_SYS (floor
, double, (double x
));
756 _GL_CXXALIASWARN (floor
);
760 # if @REPLACE_FLOORL@
761 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
763 # define floorl rpl_floorl
765 _GL_FUNCDECL_RPL (floorl
, long double, (long double x
));
766 _GL_CXXALIAS_RPL (floorl
, long double, (long double x
));
768 # if !@HAVE_DECL_FLOORL@
770 _GL_FUNCDECL_SYS (floorl
, long double, (long double x
));
772 _GL_CXXALIAS_SYS (floorl
, long double, (long double x
));
774 _GL_CXXALIASWARN (floorl
);
775 #elif defined GNULIB_POSIXCHECK
777 # if HAVE_RAW_DECL_FLOORL
778 _GL_WARN_ON_USE (floorl
, "floorl is unportable - "
779 "use gnulib module floorl for portability");
786 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
788 # define fmaf rpl_fmaf
790 _GL_FUNCDECL_RPL (fmaf
, float, (float x
, float y
, float z
));
791 _GL_CXXALIAS_RPL (fmaf
, float, (float x
, float y
, float z
));
794 _GL_FUNCDECL_SYS (fmaf
, float, (float x
, float y
, float z
));
796 _GL_CXXALIAS_SYS (fmaf
, float, (float x
, float y
, float z
));
798 _GL_CXXALIASWARN (fmaf
);
799 #elif defined GNULIB_POSIXCHECK
801 # if HAVE_RAW_DECL_FMAF
802 _GL_WARN_ON_USE (fmaf
, "fmaf is unportable - "
803 "use gnulib module fmaf for portability");
809 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
813 _GL_FUNCDECL_RPL (fma
, double, (double x
, double y
, double z
));
814 _GL_CXXALIAS_RPL (fma
, double, (double x
, double y
, double z
));
817 _GL_FUNCDECL_SYS (fma
, double, (double x
, double y
, double z
));
819 _GL_CXXALIAS_SYS (fma
, double, (double x
, double y
, double z
));
821 _GL_CXXALIASWARN (fma
);
822 #elif defined GNULIB_POSIXCHECK
824 # if HAVE_RAW_DECL_FMA
825 _GL_WARN_ON_USE (fma
, "fma is unportable - "
826 "use gnulib module fma for portability");
832 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
834 # define fmal rpl_fmal
836 _GL_FUNCDECL_RPL (fmal
, long double,
837 (long double x
, long double y
, long double z
));
838 _GL_CXXALIAS_RPL (fmal
, long double,
839 (long double x
, long double y
, long double z
));
843 _GL_FUNCDECL_SYS (fmal
, long double,
844 (long double x
, long double y
, long double z
));
846 _GL_CXXALIAS_SYS (fmal
, long double,
847 (long double x
, long double y
, long double z
));
849 _GL_CXXALIASWARN (fmal
);
850 #elif defined GNULIB_POSIXCHECK
852 # if HAVE_RAW_DECL_FMAL
853 _GL_WARN_ON_USE (fmal
, "fmal is unportable - "
854 "use gnulib module fmal for portability");
861 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
863 # define fmodf rpl_fmodf
865 _GL_FUNCDECL_RPL (fmodf
, float, (float x
, float y
));
866 _GL_CXXALIAS_RPL (fmodf
, float, (float x
, float y
));
870 _GL_FUNCDECL_SYS (fmodf
, float, (float x
, float y
));
872 _GL_CXXALIAS_SYS (fmodf
, float, (float x
, float y
));
874 _GL_CXXALIASWARN (fmodf
);
875 #elif defined GNULIB_POSIXCHECK
877 # if HAVE_RAW_DECL_FMODF
878 _GL_WARN_ON_USE (fmodf
, "fmodf is unportable - "
879 "use gnulib module fmodf for portability");
885 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
887 # define fmod rpl_fmod
889 _GL_FUNCDECL_RPL (fmod
, double, (double x
, double y
));
890 _GL_CXXALIAS_RPL (fmod
, double, (double x
, double y
));
892 _GL_CXXALIAS_SYS (fmod
, double, (double x
, double y
));
894 _GL_CXXALIASWARN (fmod
);
895 #elif defined GNULIB_POSIXCHECK
897 # if HAVE_RAW_DECL_FMOD
898 _GL_WARN_ON_USE (fmod
, "fmod has portability problems - "
899 "use gnulib module fmod for portability");
905 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
907 # define fmodl rpl_fmodl
909 _GL_FUNCDECL_RPL (fmodl
, long double, (long double x
, long double y
));
910 _GL_CXXALIAS_RPL (fmodl
, long double, (long double x
, long double y
));
914 _GL_FUNCDECL_SYS (fmodl
, long double, (long double x
, long double y
));
916 _GL_CXXALIAS_SYS (fmodl
, long double, (long double x
, long double y
));
918 _GL_CXXALIASWARN (fmodl
);
919 #elif defined GNULIB_POSIXCHECK
921 # if HAVE_RAW_DECL_FMODL
922 _GL_WARN_ON_USE (fmodl
, "fmodl is unportable - "
923 "use gnulib module fmodl for portability");
931 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
932 If x is zero: mantissa = x, exp = 0.
933 If x is infinite or NaN: mantissa = x, exp unspecified.
934 Store exp in *EXPPTR and return mantissa. */
936 # if @REPLACE_FREXPF@
937 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
939 # define frexpf rpl_frexpf
941 _GL_FUNCDECL_RPL (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
942 _GL_CXXALIAS_RPL (frexpf
, float, (float x
, int *expptr
));
946 _GL_FUNCDECL_SYS (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
948 _GL_CXXALIAS_SYS (frexpf
, float, (float x
, int *expptr
));
950 _GL_CXXALIASWARN (frexpf
);
951 #elif defined GNULIB_POSIXCHECK
953 # if HAVE_RAW_DECL_FREXPF
954 _GL_WARN_ON_USE (frexpf
, "frexpf is unportable - "
955 "use gnulib module frexpf for portability");
962 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
963 If x is zero: mantissa = x, exp = 0.
964 If x is infinite or NaN: mantissa = x, exp unspecified.
965 Store exp in *EXPPTR and return mantissa. */
968 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
969 # define frexp rpl_frexp
971 _GL_FUNCDECL_RPL (frexp
, double, (double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
972 _GL_CXXALIAS_RPL (frexp
, double, (double x
, int *expptr
));
974 _GL_CXXALIAS_SYS (frexp
, double, (double x
, int *expptr
));
976 _GL_CXXALIASWARN (frexp
);
977 #elif defined GNULIB_POSIXCHECK
979 /* Assume frexp is always declared. */
980 _GL_WARN_ON_USE (frexp
, "frexp is unportable - "
981 "use gnulib module frexp for portability");
987 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
988 If x is zero: mantissa = x, exp = 0.
989 If x is infinite or NaN: mantissa = x, exp unspecified.
990 Store exp in *EXPPTR and return mantissa. */
991 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
992 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
994 # define frexpl rpl_frexpl
996 _GL_FUNCDECL_RPL (frexpl
, long double,
997 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
998 _GL_CXXALIAS_RPL (frexpl
, long double, (long double x
, int *expptr
));
1000 # if !@HAVE_DECL_FREXPL@
1001 _GL_FUNCDECL_SYS (frexpl
, long double,
1002 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1004 # if @GNULIB_FREXPL@
1005 _GL_CXXALIAS_SYS (frexpl
, long double, (long double x
, int *expptr
));
1008 #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
1009 _GL_CXXALIASWARN (frexpl
);
1011 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
1013 # if HAVE_RAW_DECL_FREXPL
1014 _GL_WARN_ON_USE (frexpl
, "frexpl is unportable - "
1015 "use gnulib module frexpl for portability");
1020 /* Return sqrt(x^2+y^2). */
1022 # if @REPLACE_HYPOTF@
1023 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1025 # define hypotf rpl_hypotf
1027 _GL_FUNCDECL_RPL (hypotf
, float, (float x
, float y
));
1028 _GL_CXXALIAS_RPL (hypotf
, float, (float x
, float y
));
1031 _GL_FUNCDECL_SYS (hypotf
, float, (float x
, float y
));
1033 _GL_CXXALIAS_SYS (hypotf
, float, (float x
, float y
));
1035 _GL_CXXALIASWARN (hypotf
);
1036 #elif defined GNULIB_POSIXCHECK
1038 # if HAVE_RAW_DECL_HYPOTF
1039 _GL_WARN_ON_USE (hypotf
, "hypotf is unportable - "
1040 "use gnulib module hypotf for portability");
1044 /* Return sqrt(x^2+y^2). */
1046 # if @REPLACE_HYPOT@
1047 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1049 # define hypot rpl_hypot
1051 _GL_FUNCDECL_RPL (hypot
, double, (double x
, double y
));
1052 _GL_CXXALIAS_RPL (hypot
, double, (double x
, double y
));
1054 _GL_CXXALIAS_SYS (hypot
, double, (double x
, double y
));
1056 _GL_CXXALIASWARN (hypot
);
1057 #elif defined GNULIB_POSIXCHECK
1059 # if HAVE_RAW_DECL_HYPOT
1060 _GL_WARN_ON_USE (hypotf
, "hypot has portability problems - "
1061 "use gnulib module hypot for portability");
1065 /* Return sqrt(x^2+y^2). */
1067 # if @REPLACE_HYPOTL@
1068 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1070 # define hypotl rpl_hypotl
1072 _GL_FUNCDECL_RPL (hypotl
, long double, (long double x
, long double y
));
1073 _GL_CXXALIAS_RPL (hypotl
, long double, (long double x
, long double y
));
1076 _GL_FUNCDECL_SYS (hypotl
, long double, (long double x
, long double y
));
1078 _GL_CXXALIAS_SYS (hypotl
, long double, (long double x
, long double y
));
1080 _GL_CXXALIASWARN (hypotl
);
1081 #elif defined GNULIB_POSIXCHECK
1083 # if HAVE_RAW_DECL_HYPOTL
1084 _GL_WARN_ON_USE (hypotl
, "hypotl is unportable - "
1085 "use gnulib module hypotl for portability");
1091 # if @REPLACE_ILOGBF@
1092 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1094 # define ilogbf rpl_ilogbf
1096 _GL_FUNCDECL_RPL (ilogbf
, int, (float x
));
1097 _GL_CXXALIAS_RPL (ilogbf
, int, (float x
));
1100 _GL_FUNCDECL_SYS (ilogbf
, int, (float x
));
1102 _GL_CXXALIAS_SYS (ilogbf
, int, (float x
));
1104 _GL_CXXALIASWARN (ilogbf
);
1105 #elif defined GNULIB_POSIXCHECK
1107 # if HAVE_RAW_DECL_ILOGBF
1108 _GL_WARN_ON_USE (ilogbf
, "ilogbf is unportable - "
1109 "use gnulib module ilogbf for portability");
1114 # if @REPLACE_ILOGB@
1115 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1117 # define ilogb rpl_ilogb
1119 _GL_FUNCDECL_RPL (ilogb
, int, (double x
));
1120 _GL_CXXALIAS_RPL (ilogb
, int, (double x
));
1123 _GL_FUNCDECL_SYS (ilogb
, int, (double x
));
1125 _GL_CXXALIAS_SYS (ilogb
, int, (double x
));
1127 _GL_CXXALIASWARN (ilogb
);
1128 #elif defined GNULIB_POSIXCHECK
1130 # if HAVE_RAW_DECL_ILOGB
1131 _GL_WARN_ON_USE (ilogb
, "ilogb is unportable - "
1132 "use gnulib module ilogb for portability");
1138 _GL_FUNCDECL_SYS (ilogbl
, int, (long double x
));
1140 _GL_CXXALIAS_SYS (ilogbl
, int, (long double x
));
1141 _GL_CXXALIASWARN (ilogbl
);
1142 #elif defined GNULIB_POSIXCHECK
1144 # if HAVE_RAW_DECL_ILOGBL
1145 _GL_WARN_ON_USE (ilogbl
, "ilogbl is unportable - "
1146 "use gnulib module ilogbl for portability");
1151 /* Return x * 2^exp. */
1155 _GL_FUNCDECL_SYS (ldexpf
, float, (float x
, int exp
));
1157 _GL_CXXALIAS_SYS (ldexpf
, float, (float x
, int exp
));
1158 _GL_CXXALIASWARN (ldexpf
);
1159 #elif defined GNULIB_POSIXCHECK
1161 # if HAVE_RAW_DECL_LDEXPF
1162 _GL_WARN_ON_USE (ldexpf
, "ldexpf is unportable - "
1163 "use gnulib module ldexpf for portability");
1167 /* Return x * 2^exp. */
1168 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
1169 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1171 # define ldexpl rpl_ldexpl
1173 _GL_FUNCDECL_RPL (ldexpl
, long double, (long double x
, int exp
));
1174 _GL_CXXALIAS_RPL (ldexpl
, long double, (long double x
, int exp
));
1176 # if !@HAVE_DECL_LDEXPL@
1177 _GL_FUNCDECL_SYS (ldexpl
, long double, (long double x
, int exp
));
1179 # if @GNULIB_LDEXPL@
1180 _GL_CXXALIAS_SYS (ldexpl
, long double, (long double x
, int exp
));
1184 _GL_CXXALIASWARN (ldexpl
);
1186 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
1188 # if HAVE_RAW_DECL_LDEXPL
1189 _GL_WARN_ON_USE (ldexpl
, "ldexpl is unportable - "
1190 "use gnulib module ldexpl for portability");
1197 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1199 # define logf rpl_logf
1201 _GL_FUNCDECL_RPL (logf
, float, (float x
));
1202 _GL_CXXALIAS_RPL (logf
, float, (float x
));
1206 _GL_FUNCDECL_SYS (logf
, float, (float x
));
1208 _GL_CXXALIAS_SYS (logf
, float, (float x
));
1210 _GL_CXXALIASWARN (logf
);
1211 #elif defined GNULIB_POSIXCHECK
1213 # if HAVE_RAW_DECL_LOGF
1214 _GL_WARN_ON_USE (logf
, "logf is unportable - "
1215 "use gnulib module logf for portability");
1221 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1223 # define log rpl_log
1225 _GL_FUNCDECL_RPL (log
, double, (double x
));
1226 _GL_CXXALIAS_RPL (log
, double, (double x
));
1228 _GL_CXXALIAS_SYS (log
, double, (double x
));
1230 _GL_CXXALIASWARN (log
);
1231 #elif defined GNULIB_POSIXCHECK
1233 # if HAVE_RAW_DECL_LOG
1234 _GL_WARN_ON_USE (log
, "log has portability problems - "
1235 "use gnulib module log for portability");
1241 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1243 # define logl rpl_logl
1245 _GL_FUNCDECL_RPL (logl
, long double, (long double x
));
1246 _GL_CXXALIAS_RPL (logl
, long double, (long double x
));
1248 # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
1250 _GL_FUNCDECL_SYS (logl
, long double, (long double x
));
1252 _GL_CXXALIAS_SYS (logl
, long double, (long double x
));
1254 _GL_CXXALIASWARN (logl
);
1255 #elif defined GNULIB_POSIXCHECK
1257 # if HAVE_RAW_DECL_LOGL
1258 _GL_WARN_ON_USE (logl
, "logl is unportable - "
1259 "use gnulib module logl for portability");
1265 # if @REPLACE_LOG10F@
1266 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1268 # define log10f rpl_log10f
1270 _GL_FUNCDECL_RPL (log10f
, float, (float x
));
1271 _GL_CXXALIAS_RPL (log10f
, float, (float x
));
1275 _GL_FUNCDECL_SYS (log10f
, float, (float x
));
1277 _GL_CXXALIAS_SYS (log10f
, float, (float x
));
1279 _GL_CXXALIASWARN (log10f
);
1280 #elif defined GNULIB_POSIXCHECK
1282 # if HAVE_RAW_DECL_LOG10F
1283 _GL_WARN_ON_USE (log10f
, "log10f is unportable - "
1284 "use gnulib module log10f for portability");
1289 # if @REPLACE_LOG10@
1290 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1292 # define log10 rpl_log10
1294 _GL_FUNCDECL_RPL (log10
, double, (double x
));
1295 _GL_CXXALIAS_RPL (log10
, double, (double x
));
1297 _GL_CXXALIAS_SYS (log10
, double, (double x
));
1299 _GL_CXXALIASWARN (log10
);
1300 #elif defined GNULIB_POSIXCHECK
1302 # if HAVE_RAW_DECL_LOG10
1303 _GL_WARN_ON_USE (log10
, "log10 has portability problems - "
1304 "use gnulib module log10 for portability");
1309 # if @REPLACE_LOG10L@
1310 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1312 # define log10l rpl_log10l
1314 _GL_FUNCDECL_RPL (log10l
, long double, (long double x
));
1315 _GL_CXXALIAS_RPL (log10l
, long double, (long double x
));
1317 # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
1319 _GL_FUNCDECL_SYS (log10l
, long double, (long double x
));
1321 _GL_CXXALIAS_SYS (log10l
, long double, (long double x
));
1323 _GL_CXXALIASWARN (log10l
);
1324 #elif defined GNULIB_POSIXCHECK
1326 # if HAVE_RAW_DECL_LOG10L
1327 _GL_WARN_ON_USE (log10l
, "log10l is unportable - "
1328 "use gnulib module log10l for portability");
1334 # if @REPLACE_LOG1PF@
1335 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1337 # define log1pf rpl_log1pf
1339 _GL_FUNCDECL_RPL (log1pf
, float, (float x
));
1340 _GL_CXXALIAS_RPL (log1pf
, float, (float x
));
1343 _GL_FUNCDECL_SYS (log1pf
, float, (float x
));
1345 _GL_CXXALIAS_SYS (log1pf
, float, (float x
));
1347 _GL_CXXALIASWARN (log1pf
);
1348 #elif defined GNULIB_POSIXCHECK
1350 # if HAVE_RAW_DECL_LOG1PF
1351 _GL_WARN_ON_USE (log1pf
, "log1pf is unportable - "
1352 "use gnulib module log1pf for portability");
1357 # if @REPLACE_LOG1P@
1358 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1360 # define log1p rpl_log1p
1362 _GL_FUNCDECL_RPL (log1p
, double, (double x
));
1363 _GL_CXXALIAS_RPL (log1p
, double, (double x
));
1366 _GL_FUNCDECL_SYS (log1p
, double, (double x
));
1368 _GL_CXXALIAS_SYS (log1p
, double, (double x
));
1370 _GL_CXXALIASWARN (log1p
);
1371 #elif defined GNULIB_POSIXCHECK
1373 # if HAVE_RAW_DECL_LOG1P
1374 _GL_WARN_ON_USE (log1p
, "log1p has portability problems - "
1375 "use gnulib module log1p for portability");
1380 # if @REPLACE_LOG1PL@
1381 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1383 # define log1pl rpl_log1pl
1385 _GL_FUNCDECL_RPL (log1pl
, long double, (long double x
));
1386 _GL_CXXALIAS_RPL (log1pl
, long double, (long double x
));
1389 _GL_FUNCDECL_SYS (log1pl
, long double, (long double x
));
1391 _GL_CXXALIAS_SYS (log1pl
, long double, (long double x
));
1393 _GL_CXXALIASWARN (log1pl
);
1394 #elif defined GNULIB_POSIXCHECK
1396 # if HAVE_RAW_DECL_LOG1PL
1397 _GL_WARN_ON_USE (log1pl
, "log1pl has portability problems - "
1398 "use gnulib module log1pl for portability");
1404 # if @REPLACE_LOG2F@
1405 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1407 # define log2f rpl_log2f
1409 _GL_FUNCDECL_RPL (log2f
, float, (float x
));
1410 _GL_CXXALIAS_RPL (log2f
, float, (float x
));
1412 # if !@HAVE_DECL_LOG2F@
1414 _GL_FUNCDECL_SYS (log2f
, float, (float x
));
1416 _GL_CXXALIAS_SYS (log2f
, float, (float x
));
1418 _GL_CXXALIASWARN (log2f
);
1419 #elif defined GNULIB_POSIXCHECK
1421 # if HAVE_RAW_DECL_LOG2F
1422 _GL_WARN_ON_USE (log2f
, "log2f is unportable - "
1423 "use gnulib module log2f for portability");
1429 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1431 # define log2 rpl_log2
1433 _GL_FUNCDECL_RPL (log2
, double, (double x
));
1434 _GL_CXXALIAS_RPL (log2
, double, (double x
));
1436 # if !@HAVE_DECL_LOG2@
1438 _GL_FUNCDECL_SYS (log2
, double, (double x
));
1440 _GL_CXXALIAS_SYS (log2
, double, (double x
));
1442 _GL_CXXALIASWARN (log2
);
1443 #elif defined GNULIB_POSIXCHECK
1445 # if HAVE_RAW_DECL_LOG2
1446 _GL_WARN_ON_USE (log2
, "log2 is unportable - "
1447 "use gnulib module log2 for portability");
1452 # if @REPLACE_LOG2L@
1453 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1455 # define log2l rpl_log2l
1457 _GL_FUNCDECL_RPL (log2l
, long double, (long double x
));
1458 _GL_CXXALIAS_RPL (log2l
, long double, (long double x
));
1460 # if !@HAVE_DECL_LOG2L@
1461 _GL_FUNCDECL_SYS (log2l
, long double, (long double x
));
1463 _GL_CXXALIAS_SYS (log2l
, long double, (long double x
));
1465 _GL_CXXALIASWARN (log2l
);
1466 #elif defined GNULIB_POSIXCHECK
1468 # if HAVE_RAW_DECL_LOG2L
1469 _GL_WARN_ON_USE (log2l
, "log2l is unportable - "
1470 "use gnulib module log2l for portability");
1476 # if @REPLACE_LOGBF@
1477 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1479 # define logbf rpl_logbf
1481 _GL_FUNCDECL_RPL (logbf
, float, (float x
));
1482 _GL_CXXALIAS_RPL (logbf
, float, (float x
));
1485 _GL_FUNCDECL_SYS (logbf
, float, (float x
));
1487 _GL_CXXALIAS_SYS (logbf
, float, (float x
));
1489 _GL_CXXALIASWARN (logbf
);
1490 #elif defined GNULIB_POSIXCHECK
1492 # if HAVE_RAW_DECL_LOGBF
1493 _GL_WARN_ON_USE (logbf
, "logbf is unportable - "
1494 "use gnulib module logbf for portability");
1500 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1502 # define logb rpl_logb
1504 _GL_FUNCDECL_RPL (logb
, double, (double x
));
1505 _GL_CXXALIAS_RPL (logb
, double, (double x
));
1507 # if !@HAVE_DECL_LOGB@
1508 _GL_FUNCDECL_SYS (logb
, double, (double x
));
1510 _GL_CXXALIAS_SYS (logb
, double, (double x
));
1512 _GL_CXXALIASWARN (logb
);
1513 #elif defined GNULIB_POSIXCHECK
1515 # if HAVE_RAW_DECL_LOGB
1516 _GL_WARN_ON_USE (logb
, "logb is unportable - "
1517 "use gnulib module logb for portability");
1522 # if @REPLACE_LOGBL@
1523 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1525 # define logbl rpl_logbl
1527 _GL_FUNCDECL_RPL (logbl
, long double, (long double x
));
1528 _GL_CXXALIAS_RPL (logbl
, long double, (long double x
));
1531 _GL_FUNCDECL_SYS (logbl
, long double, (long double x
));
1533 _GL_CXXALIAS_SYS (logbl
, long double, (long double x
));
1535 _GL_CXXALIASWARN (logbl
);
1536 #elif defined GNULIB_POSIXCHECK
1538 # if HAVE_RAW_DECL_LOGBL
1539 _GL_WARN_ON_USE (logbl
, "logbl is unportable - "
1540 "use gnulib module logbl for portability");
1546 # if @REPLACE_MODFF@
1547 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1549 # define modff rpl_modff
1551 _GL_FUNCDECL_RPL (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1552 _GL_CXXALIAS_RPL (modff
, float, (float x
, float *iptr
));
1556 _GL_FUNCDECL_SYS (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1558 _GL_CXXALIAS_SYS (modff
, float, (float x
, float *iptr
));
1560 _GL_CXXALIASWARN (modff
);
1561 #elif defined GNULIB_POSIXCHECK
1563 # if HAVE_RAW_DECL_MODFF
1564 _GL_WARN_ON_USE (modff
, "modff is unportable - "
1565 "use gnulib module modff for portability");
1571 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1573 # define modf rpl_modf
1575 _GL_FUNCDECL_RPL (modf
, double, (double x
, double *iptr
) _GL_ARG_NONNULL ((2)));
1576 _GL_CXXALIAS_RPL (modf
, double, (double x
, double *iptr
));
1578 _GL_CXXALIAS_SYS (modf
, double, (double x
, double *iptr
));
1580 _GL_CXXALIASWARN (modf
);
1581 #elif defined GNULIB_POSIXCHECK
1583 # if HAVE_RAW_DECL_MODF
1584 _GL_WARN_ON_USE (modf
, "modf has portability problems - "
1585 "use gnulib module modf for portability");
1590 # if @REPLACE_MODFL@
1591 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1593 # define modfl rpl_modfl
1595 _GL_FUNCDECL_RPL (modfl
, long double, (long double x
, long double *iptr
)
1596 _GL_ARG_NONNULL ((2)));
1597 _GL_CXXALIAS_RPL (modfl
, long double, (long double x
, long double *iptr
));
1601 _GL_FUNCDECL_SYS (modfl
, long double, (long double x
, long double *iptr
)
1602 _GL_ARG_NONNULL ((2)));
1604 _GL_CXXALIAS_SYS (modfl
, long double, (long double x
, long double *iptr
));
1606 _GL_CXXALIASWARN (modfl
);
1607 #elif defined GNULIB_POSIXCHECK
1609 # if HAVE_RAW_DECL_MODFL
1610 _GL_WARN_ON_USE (modfl
, "modfl is unportable - "
1611 "use gnulib module modfl for portability");
1619 _GL_FUNCDECL_SYS (powf
, float, (float x
, float y
));
1621 _GL_CXXALIAS_SYS (powf
, float, (float x
, float y
));
1622 _GL_CXXALIASWARN (powf
);
1623 #elif defined GNULIB_POSIXCHECK
1625 # if HAVE_RAW_DECL_POWF
1626 _GL_WARN_ON_USE (powf
, "powf is unportable - "
1627 "use gnulib module powf for portability");
1632 #if @GNULIB_REMAINDERF@
1633 # if @REPLACE_REMAINDERF@
1634 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1636 # define remainderf rpl_remainderf
1638 _GL_FUNCDECL_RPL (remainderf
, float, (float x
, float y
));
1639 _GL_CXXALIAS_RPL (remainderf
, float, (float x
, float y
));
1641 # if !@HAVE_REMAINDERF@
1642 _GL_FUNCDECL_SYS (remainderf
, float, (float x
, float y
));
1644 _GL_CXXALIAS_SYS (remainderf
, float, (float x
, float y
));
1646 _GL_CXXALIASWARN (remainderf
);
1647 #elif defined GNULIB_POSIXCHECK
1649 # if HAVE_RAW_DECL_REMAINDERF
1650 _GL_WARN_ON_USE (remainderf
, "remainderf is unportable - "
1651 "use gnulib module remainderf for portability");
1655 #if @GNULIB_REMAINDER@
1656 # if @REPLACE_REMAINDER@
1657 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1659 # define remainder rpl_remainder
1661 _GL_FUNCDECL_RPL (remainder
, double, (double x
, double y
));
1662 _GL_CXXALIAS_RPL (remainder
, double, (double x
, double y
));
1664 # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
1665 _GL_FUNCDECL_SYS (remainder
, double, (double x
, double y
));
1667 _GL_CXXALIAS_SYS (remainder
, double, (double x
, double y
));
1669 _GL_CXXALIASWARN (remainder
);
1670 #elif defined GNULIB_POSIXCHECK
1672 # if HAVE_RAW_DECL_REMAINDER
1673 _GL_WARN_ON_USE (remainder
, "remainder is unportable - "
1674 "use gnulib module remainder for portability");
1678 #if @GNULIB_REMAINDERL@
1679 # if @REPLACE_REMAINDERL@
1680 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1682 # define remainderl rpl_remainderl
1684 _GL_FUNCDECL_RPL (remainderl
, long double, (long double x
, long double y
));
1685 _GL_CXXALIAS_RPL (remainderl
, long double, (long double x
, long double y
));
1687 # if !@HAVE_DECL_REMAINDERL@
1689 _GL_FUNCDECL_SYS (remainderl
, long double, (long double x
, long double y
));
1691 _GL_CXXALIAS_SYS (remainderl
, long double, (long double x
, long double y
));
1693 _GL_CXXALIASWARN (remainderl
);
1694 #elif defined GNULIB_POSIXCHECK
1696 # if HAVE_RAW_DECL_REMAINDERL
1697 _GL_WARN_ON_USE (remainderl
, "remainderl is unportable - "
1698 "use gnulib module remainderl for portability");
1704 # if !@HAVE_DECL_RINTF@
1705 _GL_FUNCDECL_SYS (rintf
, float, (float x
));
1707 _GL_CXXALIAS_SYS (rintf
, float, (float x
));
1708 _GL_CXXALIASWARN (rintf
);
1709 #elif defined GNULIB_POSIXCHECK
1711 # if HAVE_RAW_DECL_RINTF
1712 _GL_WARN_ON_USE (rintf
, "rintf is unportable - "
1713 "use gnulib module rintf for portability");
1719 _GL_FUNCDECL_SYS (rint
, double, (double x
));
1721 _GL_CXXALIAS_SYS (rint
, double, (double x
));
1722 _GL_CXXALIASWARN (rint
);
1723 #elif defined GNULIB_POSIXCHECK
1725 # if HAVE_RAW_DECL_RINT
1726 _GL_WARN_ON_USE (rint
, "rint is unportable - "
1727 "use gnulib module rint for portability");
1733 _GL_FUNCDECL_SYS (rintl
, long double, (long double x
));
1735 _GL_CXXALIAS_SYS (rintl
, long double, (long double x
));
1736 _GL_CXXALIASWARN (rintl
);
1737 #elif defined GNULIB_POSIXCHECK
1739 # if HAVE_RAW_DECL_RINTL
1740 _GL_WARN_ON_USE (rintl
, "rintl is unportable - "
1741 "use gnulib module rintl for portability");
1747 # if @REPLACE_ROUNDF@
1748 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1750 # define roundf rpl_roundf
1752 _GL_FUNCDECL_RPL (roundf
, float, (float x
));
1753 _GL_CXXALIAS_RPL (roundf
, float, (float x
));
1755 # if !@HAVE_DECL_ROUNDF@
1756 _GL_FUNCDECL_SYS (roundf
, float, (float x
));
1758 _GL_CXXALIAS_SYS (roundf
, float, (float x
));
1760 _GL_CXXALIASWARN (roundf
);
1761 #elif defined GNULIB_POSIXCHECK
1763 # if HAVE_RAW_DECL_ROUNDF
1764 _GL_WARN_ON_USE (roundf
, "roundf is unportable - "
1765 "use gnulib module roundf for portability");
1770 # if @REPLACE_ROUND@
1771 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1773 # define round rpl_round
1775 _GL_FUNCDECL_RPL (round
, double, (double x
));
1776 _GL_CXXALIAS_RPL (round
, double, (double x
));
1778 # if !@HAVE_DECL_ROUND@
1779 _GL_FUNCDECL_SYS (round
, double, (double x
));
1781 _GL_CXXALIAS_SYS (round
, double, (double x
));
1783 _GL_CXXALIASWARN (round
);
1784 #elif defined GNULIB_POSIXCHECK
1786 # if HAVE_RAW_DECL_ROUND
1787 _GL_WARN_ON_USE (round
, "round is unportable - "
1788 "use gnulib module round for portability");
1793 # if @REPLACE_ROUNDL@
1794 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1796 # define roundl rpl_roundl
1798 _GL_FUNCDECL_RPL (roundl
, long double, (long double x
));
1799 _GL_CXXALIAS_RPL (roundl
, long double, (long double x
));
1801 # if !@HAVE_DECL_ROUNDL@
1803 _GL_FUNCDECL_SYS (roundl
, long double, (long double x
));
1805 _GL_CXXALIAS_SYS (roundl
, long double, (long double x
));
1807 _GL_CXXALIASWARN (roundl
);
1808 #elif defined GNULIB_POSIXCHECK
1810 # if HAVE_RAW_DECL_ROUNDL
1811 _GL_WARN_ON_USE (roundl
, "roundl is unportable - "
1812 "use gnulib module roundl for portability");
1820 _GL_FUNCDECL_SYS (sinf
, float, (float x
));
1822 _GL_CXXALIAS_SYS (sinf
, float, (float x
));
1823 _GL_CXXALIASWARN (sinf
);
1824 #elif defined GNULIB_POSIXCHECK
1826 # if HAVE_RAW_DECL_SINF
1827 _GL_WARN_ON_USE (sinf
, "sinf is unportable - "
1828 "use gnulib module sinf for portability");
1833 # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
1835 _GL_FUNCDECL_SYS (sinl
, long double, (long double x
));
1837 _GL_CXXALIAS_SYS (sinl
, long double, (long double x
));
1838 _GL_CXXALIASWARN (sinl
);
1839 #elif defined GNULIB_POSIXCHECK
1841 # if HAVE_RAW_DECL_SINL
1842 _GL_WARN_ON_USE (sinl
, "sinl is unportable - "
1843 "use gnulib module sinl for portability");
1851 _GL_FUNCDECL_SYS (sinhf
, float, (float x
));
1853 _GL_CXXALIAS_SYS (sinhf
, float, (float x
));
1854 _GL_CXXALIASWARN (sinhf
);
1855 #elif defined GNULIB_POSIXCHECK
1857 # if HAVE_RAW_DECL_SINHF
1858 _GL_WARN_ON_USE (sinhf
, "sinhf is unportable - "
1859 "use gnulib module sinhf for portability");
1867 _GL_FUNCDECL_SYS (sqrtf
, float, (float x
));
1869 _GL_CXXALIAS_SYS (sqrtf
, float, (float x
));
1870 _GL_CXXALIASWARN (sqrtf
);
1871 #elif defined GNULIB_POSIXCHECK
1873 # if HAVE_RAW_DECL_SQRTF
1874 _GL_WARN_ON_USE (sqrtf
, "sqrtf is unportable - "
1875 "use gnulib module sqrtf for portability");
1880 # if @REPLACE_SQRTL@
1881 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1883 # define sqrtl rpl_sqrtl
1885 _GL_FUNCDECL_RPL (sqrtl
, long double, (long double x
));
1886 _GL_CXXALIAS_RPL (sqrtl
, long double, (long double x
));
1888 # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
1890 _GL_FUNCDECL_SYS (sqrtl
, long double, (long double x
));
1892 _GL_CXXALIAS_SYS (sqrtl
, long double, (long double x
));
1894 _GL_CXXALIASWARN (sqrtl
);
1895 #elif defined GNULIB_POSIXCHECK
1897 # if HAVE_RAW_DECL_SQRTL
1898 _GL_WARN_ON_USE (sqrtl
, "sqrtl is unportable - "
1899 "use gnulib module sqrtl for portability");
1907 _GL_FUNCDECL_SYS (tanf
, float, (float x
));
1909 _GL_CXXALIAS_SYS (tanf
, float, (float x
));
1910 _GL_CXXALIASWARN (tanf
);
1911 #elif defined GNULIB_POSIXCHECK
1913 # if HAVE_RAW_DECL_TANF
1914 _GL_WARN_ON_USE (tanf
, "tanf is unportable - "
1915 "use gnulib module tanf for portability");
1920 # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
1922 _GL_FUNCDECL_SYS (tanl
, long double, (long double x
));
1924 _GL_CXXALIAS_SYS (tanl
, long double, (long double x
));
1925 _GL_CXXALIASWARN (tanl
);
1926 #elif defined GNULIB_POSIXCHECK
1928 # if HAVE_RAW_DECL_TANL
1929 _GL_WARN_ON_USE (tanl
, "tanl is unportable - "
1930 "use gnulib module tanl for portability");
1938 _GL_FUNCDECL_SYS (tanhf
, float, (float x
));
1940 _GL_CXXALIAS_SYS (tanhf
, float, (float x
));
1941 _GL_CXXALIASWARN (tanhf
);
1942 #elif defined GNULIB_POSIXCHECK
1944 # if HAVE_RAW_DECL_TANHF
1945 _GL_WARN_ON_USE (tanhf
, "tanhf is unportable - "
1946 "use gnulib module tanhf for portability");
1952 # if @REPLACE_TRUNCF@
1953 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1954 # define truncf rpl_truncf
1956 _GL_FUNCDECL_RPL (truncf
, float, (float x
));
1957 _GL_CXXALIAS_RPL (truncf
, float, (float x
));
1959 # if !@HAVE_DECL_TRUNCF@
1960 _GL_FUNCDECL_SYS (truncf
, float, (float x
));
1962 _GL_CXXALIAS_SYS (truncf
, float, (float x
));
1964 _GL_CXXALIASWARN (truncf
);
1965 #elif defined GNULIB_POSIXCHECK
1967 # if HAVE_RAW_DECL_TRUNCF
1968 _GL_WARN_ON_USE (truncf
, "truncf is unportable - "
1969 "use gnulib module truncf for portability");
1974 # if @REPLACE_TRUNC@
1975 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1976 # define trunc rpl_trunc
1978 _GL_FUNCDECL_RPL (trunc
, double, (double x
));
1979 _GL_CXXALIAS_RPL (trunc
, double, (double x
));
1981 # if !@HAVE_DECL_TRUNC@
1982 _GL_FUNCDECL_SYS (trunc
, double, (double x
));
1984 _GL_CXXALIAS_SYS (trunc
, double, (double x
));
1986 _GL_CXXALIASWARN (trunc
);
1987 #elif defined GNULIB_POSIXCHECK
1989 # if HAVE_RAW_DECL_TRUNC
1990 _GL_WARN_ON_USE (trunc
, "trunc is unportable - "
1991 "use gnulib module trunc for portability");
1996 # if @REPLACE_TRUNCL@
1997 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1999 # define truncl rpl_truncl
2001 _GL_FUNCDECL_RPL (truncl
, long double, (long double x
));
2002 _GL_CXXALIAS_RPL (truncl
, long double, (long double x
));
2004 # if !@HAVE_DECL_TRUNCL@
2005 _GL_FUNCDECL_SYS (truncl
, long double, (long double x
));
2007 _GL_CXXALIAS_SYS (truncl
, long double, (long double x
));
2009 _GL_CXXALIASWARN (truncl
);
2010 #elif defined GNULIB_POSIXCHECK
2012 # if HAVE_RAW_DECL_TRUNCL
2013 _GL_WARN_ON_USE (truncl
, "truncl is unportable - "
2014 "use gnulib module truncl for portability");
2019 /* Definitions of function-like macros come here, after the function
2023 #if @GNULIB_ISFINITE@
2024 # if @REPLACE_ISFINITE@
2025 _GL_EXTERN_C
int gl_isfinitef (float x
);
2026 _GL_EXTERN_C
int gl_isfinited (double x
);
2027 _GL_EXTERN_C
int gl_isfinitel (long double x
);
2029 # define isfinite(x) \
2030 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
2031 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
2036 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite
)
2038 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
)
2041 #elif defined GNULIB_POSIXCHECK
2042 # if defined isfinite
2043 _GL_WARN_REAL_FLOATING_DECL (isfinite
);
2045 # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
2051 # if @REPLACE_ISINF@
2052 _GL_EXTERN_C
int gl_isinff (float x
);
2053 _GL_EXTERN_C
int gl_isinfd (double x
);
2054 _GL_EXTERN_C
int gl_isinfl (long double x
);
2057 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
2058 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
2063 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf
)
2065 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
)
2068 #elif defined GNULIB_POSIXCHECK
2070 _GL_WARN_REAL_FLOATING_DECL (isinf
);
2072 # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
2078 /* Test for NaN for 'float' numbers. */
2080 /* The original <math.h> included above provides a declaration of isnan macro
2081 or (older) isnanf function. */
2083 /* GCC 4.0 and newer provides three built-ins for isnan. */
2085 # define isnanf(x) __builtin_isnanf ((float)(x))
2086 # elif defined isnan
2088 # define isnanf(x) isnan ((float)(x))
2091 /* Test whether X is a NaN. */
2093 # define isnanf rpl_isnanf
2094 _GL_EXTERN_C
int isnanf (float x
);
2099 /* Test for NaN for 'double' numbers.
2100 This function is a gnulib extension, unlike isnan() which applied only
2101 to 'double' numbers earlier but now is a type-generic macro. */
2103 /* The original <math.h> included above provides a declaration of isnan
2106 /* GCC 4.0 and newer provides three built-ins for isnan. */
2108 # define isnand(x) __builtin_isnan ((double)(x))
2111 # define isnand(x) isnan ((double)(x))
2114 /* Test whether X is a NaN. */
2116 # define isnand rpl_isnand
2117 _GL_EXTERN_C
int isnand (double x
);
2122 /* Test for NaN for 'long double' numbers. */
2124 /* The original <math.h> included above provides a declaration of isnan
2125 macro or (older) isnanl function. */
2127 /* GCC 4.0 and newer provides three built-ins for isnan. */
2129 # define isnanl(x) __builtin_isnanl ((long double)(x))
2130 # elif defined isnan
2132 # define isnanl(x) isnan ((long double)(x))
2135 /* Test whether X is a NaN. */
2137 # define isnanl rpl_isnanl
2138 _GL_EXTERN_C
int isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2142 /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
2144 # if @REPLACE_ISNAN@
2145 /* We can't just use the isnanf macro (e.g.) as exposed by
2146 isnanf.h (e.g.) here, because those may end up being macros
2147 that recursively expand back to isnan. So use the gnulib
2148 replacements for them directly. */
2149 # if @HAVE_ISNANF@ && __GNUC__ >= 4
2150 # define gl_isnan_f(x) __builtin_isnanf ((float)(x))
2152 _GL_EXTERN_C
int rpl_isnanf (float x
);
2153 # define gl_isnan_f(x) rpl_isnanf (x)
2155 # if @HAVE_ISNAND@ && __GNUC__ >= 4
2156 # define gl_isnan_d(x) __builtin_isnan ((double)(x))
2158 _GL_EXTERN_C
int rpl_isnand (double x
);
2159 # define gl_isnan_d(x) rpl_isnand (x)
2161 # if @HAVE_ISNANL@ && __GNUC__ >= 4
2162 # define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
2164 _GL_EXTERN_C
int rpl_isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2165 # define gl_isnan_l(x) rpl_isnanl (x)
2169 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
2170 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
2172 # elif __GNUC__ >= 4
2175 (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \
2176 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
2177 __builtin_isnanf ((float)(x)))
2181 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan
)
2183 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
)
2186 /* Ensure isnan is a macro. */
2188 # define isnan isnan
2191 #elif defined GNULIB_POSIXCHECK
2193 _GL_WARN_REAL_FLOATING_DECL (isnan
);
2195 # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
2200 #if @GNULIB_SIGNBIT@
2201 # if @REPLACE_SIGNBIT_USING_GCC@
2203 /* GCC 4.0 and newer provides three built-ins for signbit. */
2204 # define signbit(x) \
2205 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
2206 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
2207 __builtin_signbitf (x))
2209 # if @REPLACE_SIGNBIT@
2211 _GL_EXTERN_C
int gl_signbitf (float arg
);
2212 _GL_EXTERN_C
int gl_signbitd (double arg
);
2213 _GL_EXTERN_C
int gl_signbitl (long double arg
);
2214 # if __GNUC__ >= 2 && !defined __STRICT_ANSI__
2215 # define _GL_NUM_UINT_WORDS(type) \
2216 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
2217 # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
2218 # define gl_signbitf_OPTIMIZED_MACRO
2219 # define gl_signbitf(arg) \
2220 ({ union { float _value; \
2221 unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
2223 _m._value = (arg); \
2224 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
2227 # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
2228 # define gl_signbitd_OPTIMIZED_MACRO
2229 # define gl_signbitd(arg) \
2230 ({ union { double _value; \
2231 unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
2233 _m._value = (arg); \
2234 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
2237 # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
2238 # define gl_signbitl_OPTIMIZED_MACRO
2239 # define gl_signbitl(arg) \
2240 ({ union { long double _value; \
2241 unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
2243 _m._value = (arg); \
2244 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
2248 # define signbit(x) \
2249 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
2250 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
2255 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit
)
2257 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
)
2260 #elif defined GNULIB_POSIXCHECK
2261 # if defined signbit
2262 _GL_WARN_REAL_FLOATING_DECL (signbit
);
2264 # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
2269 #endif /* _@GUARD_PREFIX@_MATH_H */
2270 #endif /* _@GUARD_PREFIX@_MATH_H */