e1dc97030fee3bc1b24c31a5184e6a1672962edf
1 /* A GNU-like <math.h>.
3 Copyright (C) 2002-2003, 2007-2016 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
31 #ifndef _GL_INLINE_HEADER_BEGIN
32 #error "Please include config.h first."
34 _GL_INLINE_HEADER_BEGIN
35 #ifndef _GL_MATH_INLINE
36 # define _GL_MATH_INLINE _GL_INLINE
39 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
41 /* The definition of _GL_ARG_NONNULL is copied here. */
43 /* The definition of _GL_WARN_ON_USE is copied here. */
46 /* Helper macros to define type-generic function FUNC as overloaded functions,
47 rather than as macros like in C. POSIX declares these with an argument of
48 real-floating (that is, one of float, double, or long double). */
49 # define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \
51 _gl_cxx_ ## func ## f (float f) \
56 _gl_cxx_ ## func ## d (double d) \
61 _gl_cxx_ ## func ## l (long double l) \
65 # define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \
70 return _gl_cxx_ ## func ## f (f); \
75 return _gl_cxx_ ## func ## d (d); \
78 func (long double l) \
80 return _gl_cxx_ ## func ## l (l); \
85 /* Helper macros to define a portability warning for the
86 classification macro FUNC called with VALUE. POSIX declares the
87 classification macros with an argument of real-floating (that is,
88 one of float, double, or long double). */
89 #define _GL_WARN_REAL_FLOATING_DECL(func) \
91 rpl_ ## func ## f (float f) \
96 rpl_ ## func ## d (double d) \
100 _GL_MATH_INLINE int \
101 rpl_ ## func ## l (long double l) \
105 _GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - " \
106 "use gnulib module " #func " for portability"); \
107 _GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - " \
108 "use gnulib module " #func " for portability"); \
109 _GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \
110 "use gnulib module " #func " for portability")
111 #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
112 (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \
113 : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \
114 : rpl_ ## func ## l (value))
118 /* Pull in a function that fixes the 'int' to 'long double' conversion
120 _GL_EXTERN_C
void _Qp_itoq (long double *, int);
121 static void (*_gl_math_fix_itold
) (long double *, int) = _Qp_itoq
;
125 /* POSIX allows platforms that don't support NAN. But all major
126 machines in the past 15 years have supported something close to
127 IEEE NaN, so we define this unconditionally. We also must define
128 it on platforms like Solaris 10, where NAN is present but defined
129 as a function pointer rather than a floating point constant. */
130 #if !defined NAN || @REPLACE_NAN@
131 # if !GNULIB_defined_NAN
133 /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
134 choke on the expression 0.0 / 0.0. */
135 # if defined __DECC || defined _MSC_VER
136 _GL_MATH_INLINE
float
139 static float zero
= 0.0f
;
142 # define NAN (_NaN())
144 # define NAN (0.0f / 0.0f)
146 # define GNULIB_defined_NAN 1
150 /* Solaris 10 defines HUGE_VAL, but as a function pointer rather
151 than a floating point constant. */
152 #if @REPLACE_HUGE_VAL@
154 # define HUGE_VALF (1.0f / 0.0f)
156 # define HUGE_VAL (1.0 / 0.0)
158 # define HUGE_VALL (1.0L / 0.0L)
161 /* HUGE_VALF is a 'float' Infinity. */
163 # if defined _MSC_VER
164 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
165 # define HUGE_VALF (1e25f * 1e25f)
167 # define HUGE_VALF (1.0f / 0.0f)
171 /* HUGE_VAL is a 'double' Infinity. */
173 # if defined _MSC_VER
174 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
175 # define HUGE_VAL (1e250 * 1e250)
177 # define HUGE_VAL (1.0 / 0.0)
181 /* HUGE_VALL is a 'long double' Infinity. */
183 # if defined _MSC_VER
184 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
185 # define HUGE_VALL (1e250L * 1e250L)
187 # define HUGE_VALL (1.0L / 0.0L)
192 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
193 #if !(defined FP_ILOGB0 && defined FP_ILOGBNAN)
194 # if defined __NetBSD__ || defined __sgi
195 /* NetBSD, IRIX 6.5: match what ilogb() does */
196 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
197 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
199 /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
200 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
201 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
203 /* Solaris 9: match what ilogb() does */
204 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
205 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
207 /* Gnulib defined values. */
208 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
209 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
217 _GL_FUNCDECL_SYS (acosf
, float, (float x
));
219 _GL_CXXALIAS_SYS (acosf
, float, (float x
));
220 _GL_CXXALIASWARN (acosf
);
221 #elif defined GNULIB_POSIXCHECK
223 # if HAVE_RAW_DECL_ACOSF
224 _GL_WARN_ON_USE (acosf
, "acosf is unportable - "
225 "use gnulib module acosf for portability");
230 # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
232 _GL_FUNCDECL_SYS (acosl
, long double, (long double x
));
234 _GL_CXXALIAS_SYS (acosl
, long double, (long double x
));
235 _GL_CXXALIASWARN (acosl
);
236 #elif defined GNULIB_POSIXCHECK
238 # if HAVE_RAW_DECL_ACOSL
239 _GL_WARN_ON_USE (acosl
, "acosl is unportable - "
240 "use gnulib module acosl for portability");
248 _GL_FUNCDECL_SYS (asinf
, float, (float x
));
250 _GL_CXXALIAS_SYS (asinf
, float, (float x
));
251 _GL_CXXALIASWARN (asinf
);
252 #elif defined GNULIB_POSIXCHECK
254 # if HAVE_RAW_DECL_ASINF
255 _GL_WARN_ON_USE (asinf
, "asinf is unportable - "
256 "use gnulib module asinf for portability");
261 # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
263 _GL_FUNCDECL_SYS (asinl
, long double, (long double x
));
265 _GL_CXXALIAS_SYS (asinl
, long double, (long double x
));
266 _GL_CXXALIASWARN (asinl
);
267 #elif defined GNULIB_POSIXCHECK
269 # if HAVE_RAW_DECL_ASINL
270 _GL_WARN_ON_USE (asinl
, "asinl is unportable - "
271 "use gnulib module asinl for portability");
279 _GL_FUNCDECL_SYS (atanf
, float, (float x
));
281 _GL_CXXALIAS_SYS (atanf
, float, (float x
));
282 _GL_CXXALIASWARN (atanf
);
283 #elif defined GNULIB_POSIXCHECK
285 # if HAVE_RAW_DECL_ATANF
286 _GL_WARN_ON_USE (atanf
, "atanf is unportable - "
287 "use gnulib module atanf for portability");
292 # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
294 _GL_FUNCDECL_SYS (atanl
, long double, (long double x
));
296 _GL_CXXALIAS_SYS (atanl
, long double, (long double x
));
297 _GL_CXXALIASWARN (atanl
);
298 #elif defined GNULIB_POSIXCHECK
300 # if HAVE_RAW_DECL_ATANL
301 _GL_WARN_ON_USE (atanl
, "atanl is unportable - "
302 "use gnulib module atanl for portability");
310 _GL_FUNCDECL_SYS (atan2f
, float, (float y
, float x
));
312 _GL_CXXALIAS_SYS (atan2f
, float, (float y
, float x
));
313 _GL_CXXALIASWARN (atan2f
);
314 #elif defined GNULIB_POSIXCHECK
316 # if HAVE_RAW_DECL_ATAN2F
317 _GL_WARN_ON_USE (atan2f
, "atan2f is unportable - "
318 "use gnulib module atan2f for portability");
325 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
327 # define cbrtf rpl_cbrtf
329 _GL_FUNCDECL_RPL (cbrtf
, float, (float x
));
330 _GL_CXXALIAS_RPL (cbrtf
, float, (float x
));
332 # if !@HAVE_DECL_CBRTF@
333 _GL_FUNCDECL_SYS (cbrtf
, float, (float x
));
335 _GL_CXXALIAS_SYS (cbrtf
, float, (float x
));
337 _GL_CXXALIASWARN (cbrtf
);
338 #elif defined GNULIB_POSIXCHECK
340 # if HAVE_RAW_DECL_CBRTF
341 _GL_WARN_ON_USE (cbrtf
, "cbrtf is unportable - "
342 "use gnulib module cbrtf for portability");
348 _GL_FUNCDECL_SYS (cbrt
, double, (double x
));
350 _GL_CXXALIAS_SYS (cbrt
, double, (double x
));
351 _GL_CXXALIASWARN (cbrt
);
352 #elif defined GNULIB_POSIXCHECK
354 # if HAVE_RAW_DECL_CBRT
355 _GL_WARN_ON_USE (cbrt
, "cbrt is unportable - "
356 "use gnulib module cbrt for portability");
362 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
364 # define cbrtl rpl_cbrtl
366 _GL_FUNCDECL_RPL (cbrtl
, long double, (long double x
));
367 _GL_CXXALIAS_RPL (cbrtl
, long double, (long double x
));
369 # if !@HAVE_DECL_CBRTL@
370 _GL_FUNCDECL_SYS (cbrtl
, long double, (long double x
));
372 _GL_CXXALIAS_SYS (cbrtl
, long double, (long double x
));
374 _GL_CXXALIASWARN (cbrtl
);
375 #elif defined GNULIB_POSIXCHECK
377 # if HAVE_RAW_DECL_CBRTL
378 _GL_WARN_ON_USE (cbrtl
, "cbrtl is unportable - "
379 "use gnulib module cbrtl for portability");
386 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
388 # define ceilf rpl_ceilf
390 _GL_FUNCDECL_RPL (ceilf
, float, (float x
));
391 _GL_CXXALIAS_RPL (ceilf
, float, (float x
));
393 # if !@HAVE_DECL_CEILF@
395 _GL_FUNCDECL_SYS (ceilf
, float, (float x
));
397 _GL_CXXALIAS_SYS (ceilf
, float, (float x
));
399 _GL_CXXALIASWARN (ceilf
);
400 #elif defined GNULIB_POSIXCHECK
402 # if HAVE_RAW_DECL_CEILF
403 _GL_WARN_ON_USE (ceilf
, "ceilf is unportable - "
404 "use gnulib module ceilf for portability");
410 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
412 # define ceil rpl_ceil
414 _GL_FUNCDECL_RPL (ceil
, double, (double x
));
415 _GL_CXXALIAS_RPL (ceil
, double, (double x
));
417 _GL_CXXALIAS_SYS (ceil
, double, (double x
));
419 _GL_CXXALIASWARN (ceil
);
424 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
426 # define ceill rpl_ceill
428 _GL_FUNCDECL_RPL (ceill
, long double, (long double x
));
429 _GL_CXXALIAS_RPL (ceill
, long double, (long double x
));
431 # if !@HAVE_DECL_CEILL@
433 _GL_FUNCDECL_SYS (ceill
, long double, (long double x
));
435 _GL_CXXALIAS_SYS (ceill
, long double, (long double x
));
437 _GL_CXXALIASWARN (ceill
);
438 #elif defined GNULIB_POSIXCHECK
440 # if HAVE_RAW_DECL_CEILL
441 _GL_WARN_ON_USE (ceill
, "ceill is unportable - "
442 "use gnulib module ceill for portability");
447 #if @GNULIB_COPYSIGNF@
448 # if !@HAVE_DECL_COPYSIGNF@
449 _GL_FUNCDECL_SYS (copysignf
, float, (float x
, float y
));
451 _GL_CXXALIAS_SYS (copysignf
, float, (float x
, float y
));
452 _GL_CXXALIASWARN (copysignf
);
453 #elif defined GNULIB_POSIXCHECK
455 # if HAVE_RAW_DECL_COPYSIGNF
456 _GL_WARN_ON_USE (copysignf
, "copysignf is unportable - "
457 "use gnulib module copysignf for portability");
461 #if @GNULIB_COPYSIGN@
462 # if !@HAVE_COPYSIGN@
463 _GL_FUNCDECL_SYS (copysign
, double, (double x
, double y
));
465 _GL_CXXALIAS_SYS (copysign
, double, (double x
, double y
));
466 _GL_CXXALIASWARN (copysign
);
467 #elif defined GNULIB_POSIXCHECK
469 # if HAVE_RAW_DECL_COPYSIGN
470 _GL_WARN_ON_USE (copysign
, "copysign is unportable - "
471 "use gnulib module copysign for portability");
475 #if @GNULIB_COPYSIGNL@
476 # if !@HAVE_COPYSIGNL@
477 _GL_FUNCDECL_SYS (copysignl
, long double, (long double x
, long double y
));
479 _GL_CXXALIAS_SYS (copysignl
, long double, (long double x
, long double y
));
480 _GL_CXXALIASWARN (copysignl
);
481 #elif defined GNULIB_POSIXCHECK
483 # if HAVE_RAW_DECL_COPYSIGNL
484 _GL_WARN_ON_USE (copysign
, "copysignl is unportable - "
485 "use gnulib module copysignl for portability");
493 _GL_FUNCDECL_SYS (cosf
, float, (float x
));
495 _GL_CXXALIAS_SYS (cosf
, float, (float x
));
496 _GL_CXXALIASWARN (cosf
);
497 #elif defined GNULIB_POSIXCHECK
499 # if HAVE_RAW_DECL_COSF
500 _GL_WARN_ON_USE (cosf
, "cosf is unportable - "
501 "use gnulib module cosf for portability");
506 # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
508 _GL_FUNCDECL_SYS (cosl
, long double, (long double x
));
510 _GL_CXXALIAS_SYS (cosl
, long double, (long double x
));
511 _GL_CXXALIASWARN (cosl
);
512 #elif defined GNULIB_POSIXCHECK
514 # if HAVE_RAW_DECL_COSL
515 _GL_WARN_ON_USE (cosl
, "cosl is unportable - "
516 "use gnulib module cosl for portability");
524 _GL_FUNCDECL_SYS (coshf
, float, (float x
));
526 _GL_CXXALIAS_SYS (coshf
, float, (float x
));
527 _GL_CXXALIASWARN (coshf
);
528 #elif defined GNULIB_POSIXCHECK
530 # if HAVE_RAW_DECL_COSHF
531 _GL_WARN_ON_USE (coshf
, "coshf is unportable - "
532 "use gnulib module coshf for portability");
540 _GL_FUNCDECL_SYS (expf
, float, (float x
));
542 _GL_CXXALIAS_SYS (expf
, float, (float x
));
543 _GL_CXXALIASWARN (expf
);
544 #elif defined GNULIB_POSIXCHECK
546 # if HAVE_RAW_DECL_EXPF
547 _GL_WARN_ON_USE (expf
, "expf is unportable - "
548 "use gnulib module expf for portability");
553 # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
555 _GL_FUNCDECL_SYS (expl
, long double, (long double x
));
557 _GL_CXXALIAS_SYS (expl
, long double, (long double x
));
558 _GL_CXXALIASWARN (expl
);
559 #elif defined GNULIB_POSIXCHECK
561 # if HAVE_RAW_DECL_EXPL
562 _GL_WARN_ON_USE (expl
, "expl is unportable - "
563 "use gnulib module expl for portability");
569 # if !@HAVE_DECL_EXP2F@
570 _GL_FUNCDECL_SYS (exp2f
, float, (float x
));
572 _GL_CXXALIAS_SYS (exp2f
, float, (float x
));
573 _GL_CXXALIASWARN (exp2f
);
574 #elif defined GNULIB_POSIXCHECK
576 # if HAVE_RAW_DECL_EXP2F
577 _GL_WARN_ON_USE (exp2f
, "exp2f is unportable - "
578 "use gnulib module exp2f for portability");
584 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
586 # define exp2 rpl_exp2
588 _GL_FUNCDECL_RPL (exp2
, double, (double x
));
589 _GL_CXXALIAS_RPL (exp2
, double, (double x
));
591 # if !@HAVE_DECL_EXP2@
592 _GL_FUNCDECL_SYS (exp2
, double, (double x
));
594 _GL_CXXALIAS_SYS (exp2
, double, (double x
));
596 _GL_CXXALIASWARN (exp2
);
597 #elif defined GNULIB_POSIXCHECK
599 # if HAVE_RAW_DECL_EXP2
600 _GL_WARN_ON_USE (exp2
, "exp2 is unportable - "
601 "use gnulib module exp2 for portability");
607 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
609 # define exp2l rpl_exp2l
611 _GL_FUNCDECL_RPL (exp2l
, long double, (long double x
));
612 _GL_CXXALIAS_RPL (exp2l
, long double, (long double x
));
614 # if !@HAVE_DECL_EXP2L@
616 _GL_FUNCDECL_SYS (exp2l
, long double, (long double x
));
618 _GL_CXXALIAS_SYS (exp2l
, long double, (long double x
));
620 _GL_CXXALIASWARN (exp2l
);
621 #elif defined GNULIB_POSIXCHECK
623 # if HAVE_RAW_DECL_EXP2L
624 _GL_WARN_ON_USE (exp2l
, "exp2l is unportable - "
625 "use gnulib module exp2l for portability");
631 # if @REPLACE_EXPM1F@
632 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
634 # define expm1f rpl_expm1f
636 _GL_FUNCDECL_RPL (expm1f
, float, (float x
));
637 _GL_CXXALIAS_RPL (expm1f
, float, (float x
));
640 _GL_FUNCDECL_SYS (expm1f
, float, (float x
));
642 _GL_CXXALIAS_SYS (expm1f
, float, (float x
));
644 _GL_CXXALIASWARN (expm1f
);
645 #elif defined GNULIB_POSIXCHECK
647 # if HAVE_RAW_DECL_EXPM1F
648 _GL_WARN_ON_USE (expm1f
, "expm1f is unportable - "
649 "use gnulib module expm1f for portability");
655 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
657 # define expm1 rpl_expm1
659 _GL_FUNCDECL_RPL (expm1
, double, (double x
));
660 _GL_CXXALIAS_RPL (expm1
, double, (double x
));
663 _GL_FUNCDECL_SYS (expm1
, double, (double x
));
665 _GL_CXXALIAS_SYS (expm1
, double, (double x
));
667 _GL_CXXALIASWARN (expm1
);
668 #elif defined GNULIB_POSIXCHECK
670 # if HAVE_RAW_DECL_EXPM1
671 _GL_WARN_ON_USE (expm1
, "expm1 is unportable - "
672 "use gnulib module expm1 for portability");
677 # if !@HAVE_DECL_EXPM1L@
679 _GL_FUNCDECL_SYS (expm1l
, long double, (long double x
));
681 _GL_CXXALIAS_SYS (expm1l
, long double, (long double x
));
682 _GL_CXXALIASWARN (expm1l
);
683 #elif defined GNULIB_POSIXCHECK
685 # if HAVE_RAW_DECL_EXPM1L
686 _GL_WARN_ON_USE (expm1l
, "expm1l is unportable - "
687 "use gnulib module expm1l for portability");
695 _GL_FUNCDECL_SYS (fabsf
, float, (float x
));
697 _GL_CXXALIAS_SYS (fabsf
, float, (float x
));
698 _GL_CXXALIASWARN (fabsf
);
699 #elif defined GNULIB_POSIXCHECK
701 # if HAVE_RAW_DECL_FABSF
702 _GL_WARN_ON_USE (fabsf
, "fabsf is unportable - "
703 "use gnulib module fabsf for portability");
709 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
711 # define fabsl rpl_fabsl
713 _GL_FUNCDECL_RPL (fabsl
, long double, (long double x
));
714 _GL_CXXALIAS_RPL (fabsl
, long double, (long double x
));
718 _GL_FUNCDECL_SYS (fabsl
, long double, (long double x
));
720 _GL_CXXALIAS_SYS (fabsl
, long double, (long double x
));
722 _GL_CXXALIASWARN (fabsl
);
723 #elif defined GNULIB_POSIXCHECK
725 # if HAVE_RAW_DECL_FABSL
726 _GL_WARN_ON_USE (fabsl
, "fabsl is unportable - "
727 "use gnulib module fabsl for portability");
733 # if @REPLACE_FLOORF@
734 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
736 # define floorf rpl_floorf
738 _GL_FUNCDECL_RPL (floorf
, float, (float x
));
739 _GL_CXXALIAS_RPL (floorf
, float, (float x
));
741 # if !@HAVE_DECL_FLOORF@
743 _GL_FUNCDECL_SYS (floorf
, float, (float x
));
745 _GL_CXXALIAS_SYS (floorf
, float, (float x
));
747 _GL_CXXALIASWARN (floorf
);
748 #elif defined GNULIB_POSIXCHECK
750 # if HAVE_RAW_DECL_FLOORF
751 _GL_WARN_ON_USE (floorf
, "floorf is unportable - "
752 "use gnulib module floorf for portability");
758 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
760 # define floor rpl_floor
762 _GL_FUNCDECL_RPL (floor
, double, (double x
));
763 _GL_CXXALIAS_RPL (floor
, double, (double x
));
765 _GL_CXXALIAS_SYS (floor
, double, (double x
));
767 _GL_CXXALIASWARN (floor
);
771 # if @REPLACE_FLOORL@
772 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
774 # define floorl rpl_floorl
776 _GL_FUNCDECL_RPL (floorl
, long double, (long double x
));
777 _GL_CXXALIAS_RPL (floorl
, long double, (long double x
));
779 # if !@HAVE_DECL_FLOORL@
781 _GL_FUNCDECL_SYS (floorl
, long double, (long double x
));
783 _GL_CXXALIAS_SYS (floorl
, long double, (long double x
));
785 _GL_CXXALIASWARN (floorl
);
786 #elif defined GNULIB_POSIXCHECK
788 # if HAVE_RAW_DECL_FLOORL
789 _GL_WARN_ON_USE (floorl
, "floorl is unportable - "
790 "use gnulib module floorl for portability");
797 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
799 # define fmaf rpl_fmaf
801 _GL_FUNCDECL_RPL (fmaf
, float, (float x
, float y
, float z
));
802 _GL_CXXALIAS_RPL (fmaf
, float, (float x
, float y
, float z
));
805 _GL_FUNCDECL_SYS (fmaf
, float, (float x
, float y
, float z
));
807 _GL_CXXALIAS_SYS (fmaf
, float, (float x
, float y
, float z
));
809 _GL_CXXALIASWARN (fmaf
);
810 #elif defined GNULIB_POSIXCHECK
812 # if HAVE_RAW_DECL_FMAF
813 _GL_WARN_ON_USE (fmaf
, "fmaf is unportable - "
814 "use gnulib module fmaf for portability");
820 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
824 _GL_FUNCDECL_RPL (fma
, double, (double x
, double y
, double z
));
825 _GL_CXXALIAS_RPL (fma
, double, (double x
, double y
, double z
));
828 _GL_FUNCDECL_SYS (fma
, double, (double x
, double y
, double z
));
830 _GL_CXXALIAS_SYS (fma
, double, (double x
, double y
, double z
));
832 _GL_CXXALIASWARN (fma
);
833 #elif defined GNULIB_POSIXCHECK
835 # if HAVE_RAW_DECL_FMA
836 _GL_WARN_ON_USE (fma
, "fma is unportable - "
837 "use gnulib module fma for portability");
843 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
845 # define fmal rpl_fmal
847 _GL_FUNCDECL_RPL (fmal
, long double,
848 (long double x
, long double y
, long double z
));
849 _GL_CXXALIAS_RPL (fmal
, long double,
850 (long double x
, long double y
, long double z
));
854 _GL_FUNCDECL_SYS (fmal
, long double,
855 (long double x
, long double y
, long double z
));
857 _GL_CXXALIAS_SYS (fmal
, long double,
858 (long double x
, long double y
, long double z
));
860 _GL_CXXALIASWARN (fmal
);
861 #elif defined GNULIB_POSIXCHECK
863 # if HAVE_RAW_DECL_FMAL
864 _GL_WARN_ON_USE (fmal
, "fmal is unportable - "
865 "use gnulib module fmal for portability");
872 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
874 # define fmodf rpl_fmodf
876 _GL_FUNCDECL_RPL (fmodf
, float, (float x
, float y
));
877 _GL_CXXALIAS_RPL (fmodf
, float, (float x
, float y
));
881 _GL_FUNCDECL_SYS (fmodf
, float, (float x
, float y
));
883 _GL_CXXALIAS_SYS (fmodf
, float, (float x
, float y
));
885 _GL_CXXALIASWARN (fmodf
);
886 #elif defined GNULIB_POSIXCHECK
888 # if HAVE_RAW_DECL_FMODF
889 _GL_WARN_ON_USE (fmodf
, "fmodf is unportable - "
890 "use gnulib module fmodf for portability");
896 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
898 # define fmod rpl_fmod
900 _GL_FUNCDECL_RPL (fmod
, double, (double x
, double y
));
901 _GL_CXXALIAS_RPL (fmod
, double, (double x
, double y
));
903 _GL_CXXALIAS_SYS (fmod
, double, (double x
, double y
));
905 _GL_CXXALIASWARN (fmod
);
906 #elif defined GNULIB_POSIXCHECK
908 # if HAVE_RAW_DECL_FMOD
909 _GL_WARN_ON_USE (fmod
, "fmod has portability problems - "
910 "use gnulib module fmod for portability");
916 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
918 # define fmodl rpl_fmodl
920 _GL_FUNCDECL_RPL (fmodl
, long double, (long double x
, long double y
));
921 _GL_CXXALIAS_RPL (fmodl
, long double, (long double x
, long double y
));
925 _GL_FUNCDECL_SYS (fmodl
, long double, (long double x
, long double y
));
927 _GL_CXXALIAS_SYS (fmodl
, long double, (long double x
, long double y
));
929 _GL_CXXALIASWARN (fmodl
);
930 #elif defined GNULIB_POSIXCHECK
932 # if HAVE_RAW_DECL_FMODL
933 _GL_WARN_ON_USE (fmodl
, "fmodl is unportable - "
934 "use gnulib module fmodl for portability");
942 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
943 If x is zero: mantissa = x, exp = 0.
944 If x is infinite or NaN: mantissa = x, exp unspecified.
945 Store exp in *EXPPTR and return mantissa. */
947 # if @REPLACE_FREXPF@
948 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
950 # define frexpf rpl_frexpf
952 _GL_FUNCDECL_RPL (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
953 _GL_CXXALIAS_RPL (frexpf
, float, (float x
, int *expptr
));
957 _GL_FUNCDECL_SYS (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
959 _GL_CXXALIAS_SYS (frexpf
, float, (float x
, int *expptr
));
961 _GL_CXXALIASWARN (frexpf
);
962 #elif defined GNULIB_POSIXCHECK
964 # if HAVE_RAW_DECL_FREXPF
965 _GL_WARN_ON_USE (frexpf
, "frexpf is unportable - "
966 "use gnulib module frexpf for portability");
973 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
974 If x is zero: mantissa = x, exp = 0.
975 If x is infinite or NaN: mantissa = x, exp unspecified.
976 Store exp in *EXPPTR and return mantissa. */
979 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
981 # define frexp rpl_frexp
983 _GL_FUNCDECL_RPL (frexp
, double, (double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
984 _GL_CXXALIAS_RPL (frexp
, double, (double x
, int *expptr
));
986 _GL_CXXALIAS_SYS (frexp
, double, (double x
, int *expptr
));
988 _GL_CXXALIASWARN1 (frexp
, double, (double x
, int *expptr
));
989 #elif defined GNULIB_POSIXCHECK
991 /* Assume frexp is always declared. */
992 _GL_WARN_ON_USE (frexp
, "frexp is unportable - "
993 "use gnulib module frexp for portability");
999 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1000 If x is zero: mantissa = x, exp = 0.
1001 If x is infinite or NaN: mantissa = x, exp unspecified.
1002 Store exp in *EXPPTR and return mantissa. */
1003 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
1004 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1006 # define frexpl rpl_frexpl
1008 _GL_FUNCDECL_RPL (frexpl
, long double,
1009 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1010 _GL_CXXALIAS_RPL (frexpl
, long double, (long double x
, int *expptr
));
1012 # if !@HAVE_DECL_FREXPL@
1013 _GL_FUNCDECL_SYS (frexpl
, long double,
1014 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1016 # if @GNULIB_FREXPL@
1017 _GL_CXXALIAS_SYS (frexpl
, long double, (long double x
, int *expptr
));
1020 #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
1021 _GL_CXXALIASWARN (frexpl
);
1023 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
1025 # if HAVE_RAW_DECL_FREXPL
1026 _GL_WARN_ON_USE (frexpl
, "frexpl is unportable - "
1027 "use gnulib module frexpl for portability");
1032 /* Return sqrt(x^2+y^2). */
1034 # if @REPLACE_HYPOTF@
1035 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1037 # define hypotf rpl_hypotf
1039 _GL_FUNCDECL_RPL (hypotf
, float, (float x
, float y
));
1040 _GL_CXXALIAS_RPL (hypotf
, float, (float x
, float y
));
1043 _GL_FUNCDECL_SYS (hypotf
, float, (float x
, float y
));
1045 _GL_CXXALIAS_SYS (hypotf
, float, (float x
, float y
));
1047 _GL_CXXALIASWARN (hypotf
);
1048 #elif defined GNULIB_POSIXCHECK
1050 # if HAVE_RAW_DECL_HYPOTF
1051 _GL_WARN_ON_USE (hypotf
, "hypotf is unportable - "
1052 "use gnulib module hypotf for portability");
1056 /* Return sqrt(x^2+y^2). */
1058 # if @REPLACE_HYPOT@
1059 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1061 # define hypot rpl_hypot
1063 _GL_FUNCDECL_RPL (hypot
, double, (double x
, double y
));
1064 _GL_CXXALIAS_RPL (hypot
, double, (double x
, double y
));
1066 _GL_CXXALIAS_SYS (hypot
, double, (double x
, double y
));
1068 _GL_CXXALIASWARN (hypot
);
1069 #elif defined GNULIB_POSIXCHECK
1071 # if HAVE_RAW_DECL_HYPOT
1072 _GL_WARN_ON_USE (hypotf
, "hypot has portability problems - "
1073 "use gnulib module hypot for portability");
1077 /* Return sqrt(x^2+y^2). */
1079 # if @REPLACE_HYPOTL@
1080 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1082 # define hypotl rpl_hypotl
1084 _GL_FUNCDECL_RPL (hypotl
, long double, (long double x
, long double y
));
1085 _GL_CXXALIAS_RPL (hypotl
, long double, (long double x
, long double y
));
1088 _GL_FUNCDECL_SYS (hypotl
, long double, (long double x
, long double y
));
1090 _GL_CXXALIAS_SYS (hypotl
, long double, (long double x
, long double y
));
1092 _GL_CXXALIASWARN (hypotl
);
1093 #elif defined GNULIB_POSIXCHECK
1095 # if HAVE_RAW_DECL_HYPOTL
1096 _GL_WARN_ON_USE (hypotl
, "hypotl is unportable - "
1097 "use gnulib module hypotl for portability");
1103 # if @REPLACE_ILOGBF@
1104 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1106 # define ilogbf rpl_ilogbf
1108 _GL_FUNCDECL_RPL (ilogbf
, int, (float x
));
1109 _GL_CXXALIAS_RPL (ilogbf
, int, (float x
));
1112 _GL_FUNCDECL_SYS (ilogbf
, int, (float x
));
1114 _GL_CXXALIAS_SYS (ilogbf
, int, (float x
));
1116 _GL_CXXALIASWARN (ilogbf
);
1117 #elif defined GNULIB_POSIXCHECK
1119 # if HAVE_RAW_DECL_ILOGBF
1120 _GL_WARN_ON_USE (ilogbf
, "ilogbf is unportable - "
1121 "use gnulib module ilogbf for portability");
1126 # if @REPLACE_ILOGB@
1127 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1129 # define ilogb rpl_ilogb
1131 _GL_FUNCDECL_RPL (ilogb
, int, (double x
));
1132 _GL_CXXALIAS_RPL (ilogb
, int, (double x
));
1135 _GL_FUNCDECL_SYS (ilogb
, int, (double x
));
1137 _GL_CXXALIAS_SYS (ilogb
, int, (double x
));
1139 _GL_CXXALIASWARN (ilogb
);
1140 #elif defined GNULIB_POSIXCHECK
1142 # if HAVE_RAW_DECL_ILOGB
1143 _GL_WARN_ON_USE (ilogb
, "ilogb is unportable - "
1144 "use gnulib module ilogb for portability");
1150 _GL_FUNCDECL_SYS (ilogbl
, int, (long double x
));
1152 _GL_CXXALIAS_SYS (ilogbl
, int, (long double x
));
1153 _GL_CXXALIASWARN (ilogbl
);
1154 #elif defined GNULIB_POSIXCHECK
1156 # if HAVE_RAW_DECL_ILOGBL
1157 _GL_WARN_ON_USE (ilogbl
, "ilogbl is unportable - "
1158 "use gnulib module ilogbl for portability");
1163 /* Return x * 2^exp. */
1167 _GL_FUNCDECL_SYS (ldexpf
, float, (float x
, int exp
));
1169 _GL_CXXALIAS_SYS (ldexpf
, float, (float x
, int exp
));
1170 _GL_CXXALIASWARN (ldexpf
);
1171 #elif defined GNULIB_POSIXCHECK
1173 # if HAVE_RAW_DECL_LDEXPF
1174 _GL_WARN_ON_USE (ldexpf
, "ldexpf is unportable - "
1175 "use gnulib module ldexpf for portability");
1179 /* Return x * 2^exp. */
1180 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
1181 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1183 # define ldexpl rpl_ldexpl
1185 _GL_FUNCDECL_RPL (ldexpl
, long double, (long double x
, int exp
));
1186 _GL_CXXALIAS_RPL (ldexpl
, long double, (long double x
, int exp
));
1188 # if !@HAVE_DECL_LDEXPL@
1189 _GL_FUNCDECL_SYS (ldexpl
, long double, (long double x
, int exp
));
1191 # if @GNULIB_LDEXPL@
1192 _GL_CXXALIAS_SYS (ldexpl
, long double, (long double x
, int exp
));
1196 _GL_CXXALIASWARN (ldexpl
);
1198 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
1200 # if HAVE_RAW_DECL_LDEXPL
1201 _GL_WARN_ON_USE (ldexpl
, "ldexpl is unportable - "
1202 "use gnulib module ldexpl for portability");
1209 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1211 # define logf rpl_logf
1213 _GL_FUNCDECL_RPL (logf
, float, (float x
));
1214 _GL_CXXALIAS_RPL (logf
, float, (float x
));
1218 _GL_FUNCDECL_SYS (logf
, float, (float x
));
1220 _GL_CXXALIAS_SYS (logf
, float, (float x
));
1222 _GL_CXXALIASWARN (logf
);
1223 #elif defined GNULIB_POSIXCHECK
1225 # if HAVE_RAW_DECL_LOGF
1226 _GL_WARN_ON_USE (logf
, "logf is unportable - "
1227 "use gnulib module logf for portability");
1233 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1235 # define log rpl_log
1237 _GL_FUNCDECL_RPL (log
, double, (double x
));
1238 _GL_CXXALIAS_RPL (log
, double, (double x
));
1240 _GL_CXXALIAS_SYS (log
, double, (double x
));
1242 _GL_CXXALIASWARN (log
);
1243 #elif defined GNULIB_POSIXCHECK
1245 # if HAVE_RAW_DECL_LOG
1246 _GL_WARN_ON_USE (log
, "log has portability problems - "
1247 "use gnulib module log for portability");
1253 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1255 # define logl rpl_logl
1257 _GL_FUNCDECL_RPL (logl
, long double, (long double x
));
1258 _GL_CXXALIAS_RPL (logl
, long double, (long double x
));
1260 # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
1262 _GL_FUNCDECL_SYS (logl
, long double, (long double x
));
1264 _GL_CXXALIAS_SYS (logl
, long double, (long double x
));
1266 _GL_CXXALIASWARN (logl
);
1267 #elif defined GNULIB_POSIXCHECK
1269 # if HAVE_RAW_DECL_LOGL
1270 _GL_WARN_ON_USE (logl
, "logl is unportable - "
1271 "use gnulib module logl for portability");
1277 # if @REPLACE_LOG10F@
1278 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1280 # define log10f rpl_log10f
1282 _GL_FUNCDECL_RPL (log10f
, float, (float x
));
1283 _GL_CXXALIAS_RPL (log10f
, float, (float x
));
1287 _GL_FUNCDECL_SYS (log10f
, float, (float x
));
1289 _GL_CXXALIAS_SYS (log10f
, float, (float x
));
1291 _GL_CXXALIASWARN (log10f
);
1292 #elif defined GNULIB_POSIXCHECK
1294 # if HAVE_RAW_DECL_LOG10F
1295 _GL_WARN_ON_USE (log10f
, "log10f is unportable - "
1296 "use gnulib module log10f for portability");
1301 # if @REPLACE_LOG10@
1302 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1304 # define log10 rpl_log10
1306 _GL_FUNCDECL_RPL (log10
, double, (double x
));
1307 _GL_CXXALIAS_RPL (log10
, double, (double x
));
1309 _GL_CXXALIAS_SYS (log10
, double, (double x
));
1311 _GL_CXXALIASWARN (log10
);
1312 #elif defined GNULIB_POSIXCHECK
1314 # if HAVE_RAW_DECL_LOG10
1315 _GL_WARN_ON_USE (log10
, "log10 has portability problems - "
1316 "use gnulib module log10 for portability");
1321 # if @REPLACE_LOG10L@
1322 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1324 # define log10l rpl_log10l
1326 _GL_FUNCDECL_RPL (log10l
, long double, (long double x
));
1327 _GL_CXXALIAS_RPL (log10l
, long double, (long double x
));
1329 # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
1331 _GL_FUNCDECL_SYS (log10l
, long double, (long double x
));
1333 _GL_CXXALIAS_SYS (log10l
, long double, (long double x
));
1335 _GL_CXXALIASWARN (log10l
);
1336 #elif defined GNULIB_POSIXCHECK
1338 # if HAVE_RAW_DECL_LOG10L
1339 _GL_WARN_ON_USE (log10l
, "log10l is unportable - "
1340 "use gnulib module log10l for portability");
1346 # if @REPLACE_LOG1PF@
1347 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1349 # define log1pf rpl_log1pf
1351 _GL_FUNCDECL_RPL (log1pf
, float, (float x
));
1352 _GL_CXXALIAS_RPL (log1pf
, float, (float x
));
1355 _GL_FUNCDECL_SYS (log1pf
, float, (float x
));
1357 _GL_CXXALIAS_SYS (log1pf
, float, (float x
));
1359 _GL_CXXALIASWARN (log1pf
);
1360 #elif defined GNULIB_POSIXCHECK
1362 # if HAVE_RAW_DECL_LOG1PF
1363 _GL_WARN_ON_USE (log1pf
, "log1pf is unportable - "
1364 "use gnulib module log1pf for portability");
1369 # if @REPLACE_LOG1P@
1370 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1372 # define log1p rpl_log1p
1374 _GL_FUNCDECL_RPL (log1p
, double, (double x
));
1375 _GL_CXXALIAS_RPL (log1p
, double, (double x
));
1378 _GL_FUNCDECL_SYS (log1p
, double, (double x
));
1380 _GL_CXXALIAS_SYS (log1p
, double, (double x
));
1382 _GL_CXXALIASWARN (log1p
);
1383 #elif defined GNULIB_POSIXCHECK
1385 # if HAVE_RAW_DECL_LOG1P
1386 _GL_WARN_ON_USE (log1p
, "log1p has portability problems - "
1387 "use gnulib module log1p for portability");
1392 # if @REPLACE_LOG1PL@
1393 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1395 # define log1pl rpl_log1pl
1397 _GL_FUNCDECL_RPL (log1pl
, long double, (long double x
));
1398 _GL_CXXALIAS_RPL (log1pl
, long double, (long double x
));
1401 _GL_FUNCDECL_SYS (log1pl
, long double, (long double x
));
1403 _GL_CXXALIAS_SYS (log1pl
, long double, (long double x
));
1405 _GL_CXXALIASWARN (log1pl
);
1406 #elif defined GNULIB_POSIXCHECK
1408 # if HAVE_RAW_DECL_LOG1PL
1409 _GL_WARN_ON_USE (log1pl
, "log1pl has portability problems - "
1410 "use gnulib module log1pl for portability");
1416 # if @REPLACE_LOG2F@
1417 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1419 # define log2f rpl_log2f
1421 _GL_FUNCDECL_RPL (log2f
, float, (float x
));
1422 _GL_CXXALIAS_RPL (log2f
, float, (float x
));
1424 # if !@HAVE_DECL_LOG2F@
1426 _GL_FUNCDECL_SYS (log2f
, float, (float x
));
1428 _GL_CXXALIAS_SYS (log2f
, float, (float x
));
1430 _GL_CXXALIASWARN (log2f
);
1431 #elif defined GNULIB_POSIXCHECK
1433 # if HAVE_RAW_DECL_LOG2F
1434 _GL_WARN_ON_USE (log2f
, "log2f is unportable - "
1435 "use gnulib module log2f for portability");
1441 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1443 # define log2 rpl_log2
1445 _GL_FUNCDECL_RPL (log2
, double, (double x
));
1446 _GL_CXXALIAS_RPL (log2
, double, (double x
));
1448 # if !@HAVE_DECL_LOG2@
1450 _GL_FUNCDECL_SYS (log2
, double, (double x
));
1452 _GL_CXXALIAS_SYS (log2
, double, (double x
));
1454 _GL_CXXALIASWARN (log2
);
1455 #elif defined GNULIB_POSIXCHECK
1457 # if HAVE_RAW_DECL_LOG2
1458 _GL_WARN_ON_USE (log2
, "log2 is unportable - "
1459 "use gnulib module log2 for portability");
1464 # if @REPLACE_LOG2L@
1465 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1467 # define log2l rpl_log2l
1469 _GL_FUNCDECL_RPL (log2l
, long double, (long double x
));
1470 _GL_CXXALIAS_RPL (log2l
, long double, (long double x
));
1472 # if !@HAVE_DECL_LOG2L@
1473 _GL_FUNCDECL_SYS (log2l
, long double, (long double x
));
1475 _GL_CXXALIAS_SYS (log2l
, long double, (long double x
));
1477 _GL_CXXALIASWARN (log2l
);
1478 #elif defined GNULIB_POSIXCHECK
1480 # if HAVE_RAW_DECL_LOG2L
1481 _GL_WARN_ON_USE (log2l
, "log2l is unportable - "
1482 "use gnulib module log2l for portability");
1488 # if @REPLACE_LOGBF@
1489 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1491 # define logbf rpl_logbf
1493 _GL_FUNCDECL_RPL (logbf
, float, (float x
));
1494 _GL_CXXALIAS_RPL (logbf
, float, (float x
));
1497 _GL_FUNCDECL_SYS (logbf
, float, (float x
));
1499 _GL_CXXALIAS_SYS (logbf
, float, (float x
));
1501 _GL_CXXALIASWARN (logbf
);
1502 #elif defined GNULIB_POSIXCHECK
1504 # if HAVE_RAW_DECL_LOGBF
1505 _GL_WARN_ON_USE (logbf
, "logbf is unportable - "
1506 "use gnulib module logbf for portability");
1512 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1514 # define logb rpl_logb
1516 _GL_FUNCDECL_RPL (logb
, double, (double x
));
1517 _GL_CXXALIAS_RPL (logb
, double, (double x
));
1519 # if !@HAVE_DECL_LOGB@
1520 _GL_FUNCDECL_SYS (logb
, double, (double x
));
1522 _GL_CXXALIAS_SYS (logb
, double, (double x
));
1524 _GL_CXXALIASWARN (logb
);
1525 #elif defined GNULIB_POSIXCHECK
1527 # if HAVE_RAW_DECL_LOGB
1528 _GL_WARN_ON_USE (logb
, "logb is unportable - "
1529 "use gnulib module logb for portability");
1534 # if @REPLACE_LOGBL@
1535 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1537 # define logbl rpl_logbl
1539 _GL_FUNCDECL_RPL (logbl
, long double, (long double x
));
1540 _GL_CXXALIAS_RPL (logbl
, long double, (long double x
));
1543 _GL_FUNCDECL_SYS (logbl
, long double, (long double x
));
1545 _GL_CXXALIAS_SYS (logbl
, long double, (long double x
));
1547 _GL_CXXALIASWARN (logbl
);
1548 #elif defined GNULIB_POSIXCHECK
1550 # if HAVE_RAW_DECL_LOGBL
1551 _GL_WARN_ON_USE (logbl
, "logbl is unportable - "
1552 "use gnulib module logbl for portability");
1558 # if @REPLACE_MODFF@
1559 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1561 # define modff rpl_modff
1563 _GL_FUNCDECL_RPL (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1564 _GL_CXXALIAS_RPL (modff
, float, (float x
, float *iptr
));
1568 _GL_FUNCDECL_SYS (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1570 _GL_CXXALIAS_SYS (modff
, float, (float x
, float *iptr
));
1572 _GL_CXXALIASWARN (modff
);
1573 #elif defined GNULIB_POSIXCHECK
1575 # if HAVE_RAW_DECL_MODFF
1576 _GL_WARN_ON_USE (modff
, "modff is unportable - "
1577 "use gnulib module modff for portability");
1583 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1585 # define modf rpl_modf
1587 _GL_FUNCDECL_RPL (modf
, double, (double x
, double *iptr
) _GL_ARG_NONNULL ((2)));
1588 _GL_CXXALIAS_RPL (modf
, double, (double x
, double *iptr
));
1590 _GL_CXXALIAS_SYS (modf
, double, (double x
, double *iptr
));
1592 _GL_CXXALIASWARN (modf
);
1593 #elif defined GNULIB_POSIXCHECK
1595 # if HAVE_RAW_DECL_MODF
1596 _GL_WARN_ON_USE (modf
, "modf has portability problems - "
1597 "use gnulib module modf for portability");
1602 # if @REPLACE_MODFL@
1603 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1605 # define modfl rpl_modfl
1607 _GL_FUNCDECL_RPL (modfl
, long double, (long double x
, long double *iptr
)
1608 _GL_ARG_NONNULL ((2)));
1609 _GL_CXXALIAS_RPL (modfl
, long double, (long double x
, long double *iptr
));
1613 _GL_FUNCDECL_SYS (modfl
, long double, (long double x
, long double *iptr
)
1614 _GL_ARG_NONNULL ((2)));
1616 _GL_CXXALIAS_SYS (modfl
, long double, (long double x
, long double *iptr
));
1618 _GL_CXXALIASWARN (modfl
);
1619 #elif defined GNULIB_POSIXCHECK
1621 # if HAVE_RAW_DECL_MODFL
1622 _GL_WARN_ON_USE (modfl
, "modfl is unportable - "
1623 "use gnulib module modfl for portability");
1631 _GL_FUNCDECL_SYS (powf
, float, (float x
, float y
));
1633 _GL_CXXALIAS_SYS (powf
, float, (float x
, float y
));
1634 _GL_CXXALIASWARN (powf
);
1635 #elif defined GNULIB_POSIXCHECK
1637 # if HAVE_RAW_DECL_POWF
1638 _GL_WARN_ON_USE (powf
, "powf is unportable - "
1639 "use gnulib module powf for portability");
1644 #if @GNULIB_REMAINDERF@
1645 # if @REPLACE_REMAINDERF@
1646 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1648 # define remainderf rpl_remainderf
1650 _GL_FUNCDECL_RPL (remainderf
, float, (float x
, float y
));
1651 _GL_CXXALIAS_RPL (remainderf
, float, (float x
, float y
));
1653 # if !@HAVE_REMAINDERF@
1654 _GL_FUNCDECL_SYS (remainderf
, float, (float x
, float y
));
1656 _GL_CXXALIAS_SYS (remainderf
, float, (float x
, float y
));
1658 _GL_CXXALIASWARN (remainderf
);
1659 #elif defined GNULIB_POSIXCHECK
1661 # if HAVE_RAW_DECL_REMAINDERF
1662 _GL_WARN_ON_USE (remainderf
, "remainderf is unportable - "
1663 "use gnulib module remainderf for portability");
1667 #if @GNULIB_REMAINDER@
1668 # if @REPLACE_REMAINDER@
1669 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1671 # define remainder rpl_remainder
1673 _GL_FUNCDECL_RPL (remainder
, double, (double x
, double y
));
1674 _GL_CXXALIAS_RPL (remainder
, double, (double x
, double y
));
1676 # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
1677 _GL_FUNCDECL_SYS (remainder
, double, (double x
, double y
));
1679 _GL_CXXALIAS_SYS (remainder
, double, (double x
, double y
));
1681 _GL_CXXALIASWARN (remainder
);
1682 #elif defined GNULIB_POSIXCHECK
1684 # if HAVE_RAW_DECL_REMAINDER
1685 _GL_WARN_ON_USE (remainder
, "remainder is unportable - "
1686 "use gnulib module remainder for portability");
1690 #if @GNULIB_REMAINDERL@
1691 # if @REPLACE_REMAINDERL@
1692 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1694 # define remainderl rpl_remainderl
1696 _GL_FUNCDECL_RPL (remainderl
, long double, (long double x
, long double y
));
1697 _GL_CXXALIAS_RPL (remainderl
, long double, (long double x
, long double y
));
1699 # if !@HAVE_DECL_REMAINDERL@
1701 _GL_FUNCDECL_SYS (remainderl
, long double, (long double x
, long double y
));
1703 _GL_CXXALIAS_SYS (remainderl
, long double, (long double x
, long double y
));
1705 _GL_CXXALIASWARN (remainderl
);
1706 #elif defined GNULIB_POSIXCHECK
1708 # if HAVE_RAW_DECL_REMAINDERL
1709 _GL_WARN_ON_USE (remainderl
, "remainderl is unportable - "
1710 "use gnulib module remainderl for portability");
1716 # if !@HAVE_DECL_RINTF@
1717 _GL_FUNCDECL_SYS (rintf
, float, (float x
));
1719 _GL_CXXALIAS_SYS (rintf
, float, (float x
));
1720 _GL_CXXALIASWARN (rintf
);
1721 #elif defined GNULIB_POSIXCHECK
1723 # if HAVE_RAW_DECL_RINTF
1724 _GL_WARN_ON_USE (rintf
, "rintf is unportable - "
1725 "use gnulib module rintf for portability");
1731 _GL_FUNCDECL_SYS (rint
, double, (double x
));
1733 _GL_CXXALIAS_SYS (rint
, double, (double x
));
1734 _GL_CXXALIASWARN (rint
);
1735 #elif defined GNULIB_POSIXCHECK
1737 # if HAVE_RAW_DECL_RINT
1738 _GL_WARN_ON_USE (rint
, "rint is unportable - "
1739 "use gnulib module rint for portability");
1745 _GL_FUNCDECL_SYS (rintl
, long double, (long double x
));
1747 _GL_CXXALIAS_SYS (rintl
, long double, (long double x
));
1748 _GL_CXXALIASWARN (rintl
);
1749 #elif defined GNULIB_POSIXCHECK
1751 # if HAVE_RAW_DECL_RINTL
1752 _GL_WARN_ON_USE (rintl
, "rintl is unportable - "
1753 "use gnulib module rintl for portability");
1759 # if @REPLACE_ROUNDF@
1760 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1762 # define roundf rpl_roundf
1764 _GL_FUNCDECL_RPL (roundf
, float, (float x
));
1765 _GL_CXXALIAS_RPL (roundf
, float, (float x
));
1767 # if !@HAVE_DECL_ROUNDF@
1768 _GL_FUNCDECL_SYS (roundf
, float, (float x
));
1770 _GL_CXXALIAS_SYS (roundf
, float, (float x
));
1772 _GL_CXXALIASWARN (roundf
);
1773 #elif defined GNULIB_POSIXCHECK
1775 # if HAVE_RAW_DECL_ROUNDF
1776 _GL_WARN_ON_USE (roundf
, "roundf is unportable - "
1777 "use gnulib module roundf for portability");
1782 # if @REPLACE_ROUND@
1783 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1785 # define round rpl_round
1787 _GL_FUNCDECL_RPL (round
, double, (double x
));
1788 _GL_CXXALIAS_RPL (round
, double, (double x
));
1790 # if !@HAVE_DECL_ROUND@
1791 _GL_FUNCDECL_SYS (round
, double, (double x
));
1793 _GL_CXXALIAS_SYS (round
, double, (double x
));
1795 _GL_CXXALIASWARN (round
);
1796 #elif defined GNULIB_POSIXCHECK
1798 # if HAVE_RAW_DECL_ROUND
1799 _GL_WARN_ON_USE (round
, "round is unportable - "
1800 "use gnulib module round for portability");
1805 # if @REPLACE_ROUNDL@
1806 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1808 # define roundl rpl_roundl
1810 _GL_FUNCDECL_RPL (roundl
, long double, (long double x
));
1811 _GL_CXXALIAS_RPL (roundl
, long double, (long double x
));
1813 # if !@HAVE_DECL_ROUNDL@
1815 _GL_FUNCDECL_SYS (roundl
, long double, (long double x
));
1817 _GL_CXXALIAS_SYS (roundl
, long double, (long double x
));
1819 _GL_CXXALIASWARN (roundl
);
1820 #elif defined GNULIB_POSIXCHECK
1822 # if HAVE_RAW_DECL_ROUNDL
1823 _GL_WARN_ON_USE (roundl
, "roundl is unportable - "
1824 "use gnulib module roundl for portability");
1832 _GL_FUNCDECL_SYS (sinf
, float, (float x
));
1834 _GL_CXXALIAS_SYS (sinf
, float, (float x
));
1835 _GL_CXXALIASWARN (sinf
);
1836 #elif defined GNULIB_POSIXCHECK
1838 # if HAVE_RAW_DECL_SINF
1839 _GL_WARN_ON_USE (sinf
, "sinf is unportable - "
1840 "use gnulib module sinf for portability");
1845 # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
1847 _GL_FUNCDECL_SYS (sinl
, long double, (long double x
));
1849 _GL_CXXALIAS_SYS (sinl
, long double, (long double x
));
1850 _GL_CXXALIASWARN (sinl
);
1851 #elif defined GNULIB_POSIXCHECK
1853 # if HAVE_RAW_DECL_SINL
1854 _GL_WARN_ON_USE (sinl
, "sinl is unportable - "
1855 "use gnulib module sinl for portability");
1863 _GL_FUNCDECL_SYS (sinhf
, float, (float x
));
1865 _GL_CXXALIAS_SYS (sinhf
, float, (float x
));
1866 _GL_CXXALIASWARN (sinhf
);
1867 #elif defined GNULIB_POSIXCHECK
1869 # if HAVE_RAW_DECL_SINHF
1870 _GL_WARN_ON_USE (sinhf
, "sinhf is unportable - "
1871 "use gnulib module sinhf for portability");
1879 _GL_FUNCDECL_SYS (sqrtf
, float, (float x
));
1881 _GL_CXXALIAS_SYS (sqrtf
, float, (float x
));
1882 _GL_CXXALIASWARN (sqrtf
);
1883 #elif defined GNULIB_POSIXCHECK
1885 # if HAVE_RAW_DECL_SQRTF
1886 _GL_WARN_ON_USE (sqrtf
, "sqrtf is unportable - "
1887 "use gnulib module sqrtf for portability");
1892 # if @REPLACE_SQRTL@
1893 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1895 # define sqrtl rpl_sqrtl
1897 _GL_FUNCDECL_RPL (sqrtl
, long double, (long double x
));
1898 _GL_CXXALIAS_RPL (sqrtl
, long double, (long double x
));
1900 # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
1902 _GL_FUNCDECL_SYS (sqrtl
, long double, (long double x
));
1904 _GL_CXXALIAS_SYS (sqrtl
, long double, (long double x
));
1906 _GL_CXXALIASWARN (sqrtl
);
1907 #elif defined GNULIB_POSIXCHECK
1909 # if HAVE_RAW_DECL_SQRTL
1910 _GL_WARN_ON_USE (sqrtl
, "sqrtl is unportable - "
1911 "use gnulib module sqrtl for portability");
1919 _GL_FUNCDECL_SYS (tanf
, float, (float x
));
1921 _GL_CXXALIAS_SYS (tanf
, float, (float x
));
1922 _GL_CXXALIASWARN (tanf
);
1923 #elif defined GNULIB_POSIXCHECK
1925 # if HAVE_RAW_DECL_TANF
1926 _GL_WARN_ON_USE (tanf
, "tanf is unportable - "
1927 "use gnulib module tanf for portability");
1932 # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
1934 _GL_FUNCDECL_SYS (tanl
, long double, (long double x
));
1936 _GL_CXXALIAS_SYS (tanl
, long double, (long double x
));
1937 _GL_CXXALIASWARN (tanl
);
1938 #elif defined GNULIB_POSIXCHECK
1940 # if HAVE_RAW_DECL_TANL
1941 _GL_WARN_ON_USE (tanl
, "tanl is unportable - "
1942 "use gnulib module tanl for portability");
1950 _GL_FUNCDECL_SYS (tanhf
, float, (float x
));
1952 _GL_CXXALIAS_SYS (tanhf
, float, (float x
));
1953 _GL_CXXALIASWARN (tanhf
);
1954 #elif defined GNULIB_POSIXCHECK
1956 # if HAVE_RAW_DECL_TANHF
1957 _GL_WARN_ON_USE (tanhf
, "tanhf is unportable - "
1958 "use gnulib module tanhf for portability");
1964 # if @REPLACE_TRUNCF@
1965 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1967 # define truncf rpl_truncf
1969 _GL_FUNCDECL_RPL (truncf
, float, (float x
));
1970 _GL_CXXALIAS_RPL (truncf
, float, (float x
));
1972 # if !@HAVE_DECL_TRUNCF@
1973 _GL_FUNCDECL_SYS (truncf
, float, (float x
));
1975 _GL_CXXALIAS_SYS (truncf
, float, (float x
));
1977 _GL_CXXALIASWARN (truncf
);
1978 #elif defined GNULIB_POSIXCHECK
1980 # if HAVE_RAW_DECL_TRUNCF
1981 _GL_WARN_ON_USE (truncf
, "truncf is unportable - "
1982 "use gnulib module truncf for portability");
1987 # if @REPLACE_TRUNC@
1988 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1990 # define trunc rpl_trunc
1992 _GL_FUNCDECL_RPL (trunc
, double, (double x
));
1993 _GL_CXXALIAS_RPL (trunc
, double, (double x
));
1995 # if !@HAVE_DECL_TRUNC@
1996 _GL_FUNCDECL_SYS (trunc
, double, (double x
));
1998 _GL_CXXALIAS_SYS (trunc
, double, (double x
));
2000 _GL_CXXALIASWARN (trunc
);
2001 #elif defined GNULIB_POSIXCHECK
2003 # if HAVE_RAW_DECL_TRUNC
2004 _GL_WARN_ON_USE (trunc
, "trunc is unportable - "
2005 "use gnulib module trunc for portability");
2010 # if @REPLACE_TRUNCL@
2011 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2013 # define truncl rpl_truncl
2015 _GL_FUNCDECL_RPL (truncl
, long double, (long double x
));
2016 _GL_CXXALIAS_RPL (truncl
, long double, (long double x
));
2018 # if !@HAVE_DECL_TRUNCL@
2019 _GL_FUNCDECL_SYS (truncl
, long double, (long double x
));
2021 _GL_CXXALIAS_SYS (truncl
, long double, (long double x
));
2023 _GL_CXXALIASWARN (truncl
);
2024 #elif defined GNULIB_POSIXCHECK
2026 # if HAVE_RAW_DECL_TRUNCL
2027 _GL_WARN_ON_USE (truncl
, "truncl is unportable - "
2028 "use gnulib module truncl for portability");
2033 /* Definitions of function-like macros come here, after the function
2037 #if @GNULIB_ISFINITE@
2038 # if @REPLACE_ISFINITE@
2039 _GL_EXTERN_C
int gl_isfinitef (float x
);
2040 _GL_EXTERN_C
int gl_isfinited (double x
);
2041 _GL_EXTERN_C
int gl_isfinitel (long double x
);
2043 # define isfinite(x) \
2044 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
2045 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
2049 # if defined isfinite || defined GNULIB_NAMESPACE
2050 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite
)
2052 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
)
2055 #elif defined GNULIB_POSIXCHECK
2056 # if defined isfinite
2057 _GL_WARN_REAL_FLOATING_DECL (isfinite
);
2059 # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
2065 # if @REPLACE_ISINF@
2066 _GL_EXTERN_C
int gl_isinff (float x
);
2067 _GL_EXTERN_C
int gl_isinfd (double x
);
2068 _GL_EXTERN_C
int gl_isinfl (long double x
);
2071 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
2072 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
2076 # if defined isinf || defined GNULIB_NAMESPACE
2077 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf
)
2079 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
)
2082 #elif defined GNULIB_POSIXCHECK
2084 _GL_WARN_REAL_FLOATING_DECL (isinf
);
2086 # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
2092 /* Test for NaN for 'float' numbers. */
2094 /* The original <math.h> included above provides a declaration of isnan macro
2095 or (older) isnanf function. */
2097 /* GCC 4.0 and newer provides three built-ins for isnan. */
2099 # define isnanf(x) __builtin_isnanf ((float)(x))
2100 # elif defined isnan
2102 # define isnanf(x) isnan ((float)(x))
2105 /* Test whether X is a NaN. */
2107 # define isnanf rpl_isnanf
2108 _GL_EXTERN_C
int isnanf (float x
);
2113 /* Test for NaN for 'double' numbers.
2114 This function is a gnulib extension, unlike isnan() which applied only
2115 to 'double' numbers earlier but now is a type-generic macro. */
2117 /* The original <math.h> included above provides a declaration of isnan
2120 /* GCC 4.0 and newer provides three built-ins for isnan. */
2122 # define isnand(x) __builtin_isnan ((double)(x))
2125 # define isnand(x) isnan ((double)(x))
2128 /* Test whether X is a NaN. */
2130 # define isnand rpl_isnand
2131 _GL_EXTERN_C
int isnand (double x
);
2136 /* Test for NaN for 'long double' numbers. */
2138 /* The original <math.h> included above provides a declaration of isnan
2139 macro or (older) isnanl function. */
2141 /* GCC 4.0 and newer provides three built-ins for isnan. */
2143 # define isnanl(x) __builtin_isnanl ((long double)(x))
2144 # elif defined isnan
2146 # define isnanl(x) isnan ((long double)(x))
2149 /* Test whether X is a NaN. */
2151 # define isnanl rpl_isnanl
2152 _GL_EXTERN_C
int isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2156 /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
2158 # if @REPLACE_ISNAN@
2159 /* We can't just use the isnanf macro (e.g.) as exposed by
2160 isnanf.h (e.g.) here, because those may end up being macros
2161 that recursively expand back to isnan. So use the gnulib
2162 replacements for them directly. */
2163 # if @HAVE_ISNANF@ && __GNUC__ >= 4
2164 # define gl_isnan_f(x) __builtin_isnanf ((float)(x))
2166 _GL_EXTERN_C
int rpl_isnanf (float x
);
2167 # define gl_isnan_f(x) rpl_isnanf (x)
2169 # if @HAVE_ISNAND@ && __GNUC__ >= 4
2170 # define gl_isnan_d(x) __builtin_isnan ((double)(x))
2172 _GL_EXTERN_C
int rpl_isnand (double x
);
2173 # define gl_isnan_d(x) rpl_isnand (x)
2175 # if @HAVE_ISNANL@ && __GNUC__ >= 4
2176 # define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
2178 _GL_EXTERN_C
int rpl_isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2179 # define gl_isnan_l(x) rpl_isnanl (x)
2183 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
2184 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
2186 # elif __GNUC__ >= 4
2189 (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \
2190 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
2191 __builtin_isnanf ((float)(x)))
2194 # if defined isnan || defined GNULIB_NAMESPACE
2195 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan
)
2197 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
)
2200 /* Ensure isnan is a macro. */
2202 # define isnan isnan
2205 #elif defined GNULIB_POSIXCHECK
2207 _GL_WARN_REAL_FLOATING_DECL (isnan
);
2209 # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
2214 #if @GNULIB_SIGNBIT@
2215 # if (@REPLACE_SIGNBIT_USING_GCC@ \
2216 && (!defined __cplusplus || __cplusplus < 201103))
2218 /* GCC 4.0 and newer provides three built-ins for signbit. */
2219 # define signbit(x) \
2220 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
2221 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
2222 __builtin_signbitf (x))
2224 # if @REPLACE_SIGNBIT@
2226 _GL_EXTERN_C
int gl_signbitf (float arg
);
2227 _GL_EXTERN_C
int gl_signbitd (double arg
);
2228 _GL_EXTERN_C
int gl_signbitl (long double arg
);
2229 # if __GNUC__ >= 2 && !defined __STRICT_ANSI__
2230 # define _GL_NUM_UINT_WORDS(type) \
2231 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
2232 # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
2233 # define gl_signbitf_OPTIMIZED_MACRO
2234 # define gl_signbitf(arg) \
2235 ({ union { float _value; \
2236 unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
2238 _m._value = (arg); \
2239 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
2242 # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
2243 # define gl_signbitd_OPTIMIZED_MACRO
2244 # define gl_signbitd(arg) \
2245 ({ union { double _value; \
2246 unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
2248 _m._value = (arg); \
2249 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
2252 # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
2253 # define gl_signbitl_OPTIMIZED_MACRO
2254 # define gl_signbitl(arg) \
2255 ({ union { long double _value; \
2256 unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
2258 _m._value = (arg); \
2259 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
2263 # define signbit(x) \
2264 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
2265 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
2269 # if defined signbit || defined GNULIB_NAMESPACE
2270 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit
)
2272 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
)
2275 #elif defined GNULIB_POSIXCHECK
2276 # if defined signbit
2277 _GL_WARN_REAL_FLOATING_DECL (signbit
);
2279 # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
2283 _GL_INLINE_HEADER_END
2285 #endif /* _@GUARD_PREFIX@_MATH_H */
2286 #endif /* _@GUARD_PREFIX@_MATH_H */
This page took 0.087036 seconds and 4 git commands to generate.