1 /* A GNU-like <math.h>.
3 Copyright (C) 2002-2003, 2007-2019 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 <https://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 /* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in <fp.h>. */
32 #if defined __VMS && ! defined NAN
36 #ifndef _GL_INLINE_HEADER_BEGIN
37 #error "Please include config.h first."
39 _GL_INLINE_HEADER_BEGIN
40 #ifndef _GL_MATH_INLINE
41 # define _GL_MATH_INLINE _GL_INLINE
44 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
46 /* The definition of _GL_ARG_NONNULL is copied here. */
48 /* The definition of _GL_WARN_ON_USE is copied here. */
51 /* Helper macros to define type-generic function FUNC as overloaded functions,
52 rather than as macros like in C. POSIX declares these with an argument of
53 real-floating (that is, one of float, double, or long double). */
54 # define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \
56 _gl_cxx_ ## func ## f (float f) \
61 _gl_cxx_ ## func ## d (double d) \
66 _gl_cxx_ ## func ## l (long double l) \
70 # define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \
75 return _gl_cxx_ ## func ## f (f); \
80 return _gl_cxx_ ## func ## d (d); \
83 rpl_func (long double l) \
85 return _gl_cxx_ ## func ## l (l); \
90 /* Helper macros to define a portability warning for the
91 classification macro FUNC called with VALUE. POSIX declares the
92 classification macros with an argument of real-floating (that is,
93 one of float, double, or long double). */
94 #define _GL_WARN_REAL_FLOATING_DECL(func) \
96 _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
97 "use gnulib module " #func " for portability") \
98 rpl_ ## func ## f (float f) \
102 _GL_MATH_INLINE int \
103 _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
104 "use gnulib module " #func " for portability") \
105 rpl_ ## func ## d (double d) \
109 _GL_MATH_INLINE int \
110 _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
111 "use gnulib module " #func " for portability") \
112 rpl_ ## func ## l (long double l) \
116 #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
117 (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \
118 : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \
119 : rpl_ ## func ## l (value))
123 /* Pull in a function that fixes the 'int' to 'long double' conversion
125 _GL_EXTERN_C
void _Qp_itoq (long double *, int);
126 static void (*_gl_math_fix_itold
) (long double *, int) = _Qp_itoq
;
130 /* POSIX allows platforms that don't support NAN. But all major
131 machines in the past 15 years have supported something close to
132 IEEE NaN, so we define this unconditionally. We also must define
133 it on platforms like Solaris 10, where NAN is present but defined
134 as a function pointer rather than a floating point constant. */
135 #if !defined NAN || @REPLACE_NAN@
136 # if !GNULIB_defined_NAN
138 /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
139 choke on the expression 0.0 / 0.0. */
140 # if defined __DECC || defined _MSC_VER
141 _GL_MATH_INLINE
float
144 static float zero
= 0.0f
;
147 # define NAN (_NaN())
149 # define NAN (0.0f / 0.0f)
151 # define GNULIB_defined_NAN 1
155 /* Solaris 10 defines HUGE_VAL, but as a function pointer rather
156 than a floating point constant. */
157 #if @REPLACE_HUGE_VAL@
159 # define HUGE_VALF (1.0f / 0.0f)
161 # define HUGE_VAL (1.0 / 0.0)
163 # define HUGE_VALL (1.0L / 0.0L)
166 /* HUGE_VALF is a 'float' Infinity. */
168 # if defined _MSC_VER
169 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
170 # define HUGE_VALF (1e25f * 1e25f)
172 # define HUGE_VALF (1.0f / 0.0f)
176 /* HUGE_VAL is a 'double' Infinity. */
178 # if defined _MSC_VER
179 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
180 # define HUGE_VAL (1e250 * 1e250)
182 # define HUGE_VAL (1.0 / 0.0)
186 /* HUGE_VALL is a 'long double' Infinity. */
188 # if defined _MSC_VER
189 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
190 # define HUGE_VALL (1e250L * 1e250L)
192 # define HUGE_VALL (1.0L / 0.0L)
197 #if defined FP_ILOGB0 && defined FP_ILOGBNAN
198 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */
199 # if defined __HAIKU__
200 /* Haiku: match what ilogb() does */
203 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
204 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
207 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
208 # if defined __NetBSD__ || defined __sgi
209 /* NetBSD, IRIX 6.5: match what ilogb() does */
210 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
211 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
213 /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
214 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
215 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
217 /* Solaris 9: match what ilogb() does */
218 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
219 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
221 /* Gnulib defined values. */
222 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
223 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
230 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
232 # define acosf rpl_acosf
234 _GL_FUNCDECL_RPL (acosf
, float, (float x
));
235 _GL_CXXALIAS_RPL (acosf
, float, (float x
));
239 _GL_FUNCDECL_SYS (acosf
, float, (float x
));
241 _GL_CXXALIAS_SYS (acosf
, float, (float x
));
243 _GL_CXXALIASWARN (acosf
);
244 #elif defined GNULIB_POSIXCHECK
246 # if HAVE_RAW_DECL_ACOSF
247 _GL_WARN_ON_USE (acosf
, "acosf is unportable - "
248 "use gnulib module acosf for portability");
253 # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
255 _GL_FUNCDECL_SYS (acosl
, long double, (long double x
));
257 _GL_CXXALIAS_SYS (acosl
, long double, (long double x
));
258 _GL_CXXALIASWARN (acosl
);
259 #elif defined GNULIB_POSIXCHECK
261 # if HAVE_RAW_DECL_ACOSL
262 _GL_WARN_ON_USE (acosl
, "acosl is unportable - "
263 "use gnulib module acosl for portability");
270 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
272 # define asinf rpl_asinf
274 _GL_FUNCDECL_RPL (asinf
, float, (float x
));
275 _GL_CXXALIAS_RPL (asinf
, float, (float x
));
279 _GL_FUNCDECL_SYS (asinf
, float, (float x
));
281 _GL_CXXALIAS_SYS (asinf
, float, (float x
));
283 _GL_CXXALIASWARN (asinf
);
284 #elif defined GNULIB_POSIXCHECK
286 # if HAVE_RAW_DECL_ASINF
287 _GL_WARN_ON_USE (asinf
, "asinf is unportable - "
288 "use gnulib module asinf for portability");
293 # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
295 _GL_FUNCDECL_SYS (asinl
, long double, (long double x
));
297 _GL_CXXALIAS_SYS (asinl
, long double, (long double x
));
298 _GL_CXXALIASWARN (asinl
);
299 #elif defined GNULIB_POSIXCHECK
301 # if HAVE_RAW_DECL_ASINL
302 _GL_WARN_ON_USE (asinl
, "asinl is unportable - "
303 "use gnulib module asinl for portability");
310 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
312 # define atanf rpl_atanf
314 _GL_FUNCDECL_RPL (atanf
, float, (float x
));
315 _GL_CXXALIAS_RPL (atanf
, float, (float x
));
319 _GL_FUNCDECL_SYS (atanf
, float, (float x
));
321 _GL_CXXALIAS_SYS (atanf
, float, (float x
));
323 _GL_CXXALIASWARN (atanf
);
324 #elif defined GNULIB_POSIXCHECK
326 # if HAVE_RAW_DECL_ATANF
327 _GL_WARN_ON_USE (atanf
, "atanf is unportable - "
328 "use gnulib module atanf for portability");
333 # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
335 _GL_FUNCDECL_SYS (atanl
, long double, (long double x
));
337 _GL_CXXALIAS_SYS (atanl
, long double, (long double x
));
338 _GL_CXXALIASWARN (atanl
);
339 #elif defined GNULIB_POSIXCHECK
341 # if HAVE_RAW_DECL_ATANL
342 _GL_WARN_ON_USE (atanl
, "atanl is unportable - "
343 "use gnulib module atanl for portability");
349 # if @REPLACE_ATAN2F@
350 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
352 # define atan2f rpl_atan2f
354 _GL_FUNCDECL_RPL (atan2f
, float, (float y
, float x
));
355 _GL_CXXALIAS_RPL (atan2f
, float, (float y
, float x
));
359 _GL_FUNCDECL_SYS (atan2f
, float, (float y
, float x
));
361 _GL_CXXALIAS_SYS (atan2f
, float, (float y
, float x
));
363 _GL_CXXALIASWARN (atan2f
);
364 #elif defined GNULIB_POSIXCHECK
366 # if HAVE_RAW_DECL_ATAN2F
367 _GL_WARN_ON_USE (atan2f
, "atan2f is unportable - "
368 "use gnulib module atan2f for portability");
375 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
377 # define cbrtf rpl_cbrtf
379 _GL_FUNCDECL_RPL (cbrtf
, float, (float x
));
380 _GL_CXXALIAS_RPL (cbrtf
, float, (float x
));
382 # if !@HAVE_DECL_CBRTF@
383 _GL_FUNCDECL_SYS (cbrtf
, float, (float x
));
385 _GL_CXXALIAS_SYS (cbrtf
, float, (float x
));
387 _GL_CXXALIASWARN (cbrtf
);
388 #elif defined GNULIB_POSIXCHECK
390 # if HAVE_RAW_DECL_CBRTF
391 _GL_WARN_ON_USE (cbrtf
, "cbrtf is unportable - "
392 "use gnulib module cbrtf for portability");
398 _GL_FUNCDECL_SYS (cbrt
, double, (double x
));
400 _GL_CXXALIAS_SYS (cbrt
, double, (double x
));
402 _GL_CXXALIASWARN (cbrt
);
404 #elif defined GNULIB_POSIXCHECK
406 # if HAVE_RAW_DECL_CBRT
407 _GL_WARN_ON_USE (cbrt
, "cbrt is unportable - "
408 "use gnulib module cbrt for portability");
414 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
416 # define cbrtl rpl_cbrtl
418 _GL_FUNCDECL_RPL (cbrtl
, long double, (long double x
));
419 _GL_CXXALIAS_RPL (cbrtl
, long double, (long double x
));
421 # if !@HAVE_DECL_CBRTL@
422 _GL_FUNCDECL_SYS (cbrtl
, long double, (long double x
));
424 _GL_CXXALIAS_SYS (cbrtl
, long double, (long double x
));
426 _GL_CXXALIASWARN (cbrtl
);
427 #elif defined GNULIB_POSIXCHECK
429 # if HAVE_RAW_DECL_CBRTL
430 _GL_WARN_ON_USE (cbrtl
, "cbrtl is unportable - "
431 "use gnulib module cbrtl for portability");
438 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
440 # define ceilf rpl_ceilf
442 _GL_FUNCDECL_RPL (ceilf
, float, (float x
));
443 _GL_CXXALIAS_RPL (ceilf
, float, (float x
));
445 # if !@HAVE_DECL_CEILF@
447 _GL_FUNCDECL_SYS (ceilf
, float, (float x
));
449 _GL_CXXALIAS_SYS (ceilf
, float, (float x
));
451 _GL_CXXALIASWARN (ceilf
);
452 #elif defined GNULIB_POSIXCHECK
454 # if HAVE_RAW_DECL_CEILF
455 _GL_WARN_ON_USE (ceilf
, "ceilf is unportable - "
456 "use gnulib module ceilf for portability");
462 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
464 # define ceil rpl_ceil
466 _GL_FUNCDECL_RPL (ceil
, double, (double x
));
467 _GL_CXXALIAS_RPL (ceil
, double, (double x
));
469 _GL_CXXALIAS_SYS (ceil
, double, (double x
));
472 _GL_CXXALIASWARN (ceil
);
478 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
480 # define ceill rpl_ceill
482 _GL_FUNCDECL_RPL (ceill
, long double, (long double x
));
483 _GL_CXXALIAS_RPL (ceill
, long double, (long double x
));
485 # if !@HAVE_DECL_CEILL@
487 _GL_FUNCDECL_SYS (ceill
, long double, (long double x
));
489 _GL_CXXALIAS_SYS (ceill
, long double, (long double x
));
491 _GL_CXXALIASWARN (ceill
);
492 #elif defined GNULIB_POSIXCHECK
494 # if HAVE_RAW_DECL_CEILL
495 _GL_WARN_ON_USE (ceill
, "ceill is unportable - "
496 "use gnulib module ceill for portability");
501 #if @GNULIB_COPYSIGNF@
502 # if !@HAVE_DECL_COPYSIGNF@
504 _GL_FUNCDECL_SYS (copysignf
, float, (float x
, float y
));
506 _GL_CXXALIAS_SYS (copysignf
, float, (float x
, float y
));
507 _GL_CXXALIASWARN (copysignf
);
508 #elif defined GNULIB_POSIXCHECK
510 # if HAVE_RAW_DECL_COPYSIGNF
511 _GL_WARN_ON_USE (copysignf
, "copysignf is unportable - "
512 "use gnulib module copysignf for portability");
516 #if @GNULIB_COPYSIGN@
517 # if !@HAVE_COPYSIGN@
518 _GL_FUNCDECL_SYS (copysign
, double, (double x
, double y
));
520 _GL_CXXALIAS_SYS (copysign
, double, (double x
, double y
));
522 _GL_CXXALIASWARN (copysign
);
524 #elif defined GNULIB_POSIXCHECK
526 # if HAVE_RAW_DECL_COPYSIGN
527 _GL_WARN_ON_USE (copysign
, "copysign is unportable - "
528 "use gnulib module copysign for portability");
532 #if @GNULIB_COPYSIGNL@
533 # if !@HAVE_COPYSIGNL@
534 _GL_FUNCDECL_SYS (copysignl
, long double, (long double x
, long double y
));
536 _GL_CXXALIAS_SYS (copysignl
, long double, (long double x
, long double y
));
537 _GL_CXXALIASWARN (copysignl
);
538 #elif defined GNULIB_POSIXCHECK
540 # if HAVE_RAW_DECL_COPYSIGNL
541 _GL_WARN_ON_USE (copysign
, "copysignl is unportable - "
542 "use gnulib module copysignl for portability");
549 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
551 # define cosf rpl_cosf
553 _GL_FUNCDECL_RPL (cosf
, float, (float x
));
554 _GL_CXXALIAS_RPL (cosf
, float, (float x
));
558 _GL_FUNCDECL_SYS (cosf
, float, (float x
));
560 _GL_CXXALIAS_SYS (cosf
, float, (float x
));
562 _GL_CXXALIASWARN (cosf
);
563 #elif defined GNULIB_POSIXCHECK
565 # if HAVE_RAW_DECL_COSF
566 _GL_WARN_ON_USE (cosf
, "cosf is unportable - "
567 "use gnulib module cosf for portability");
572 # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
574 _GL_FUNCDECL_SYS (cosl
, long double, (long double x
));
576 _GL_CXXALIAS_SYS (cosl
, long double, (long double x
));
577 _GL_CXXALIASWARN (cosl
);
578 #elif defined GNULIB_POSIXCHECK
580 # if HAVE_RAW_DECL_COSL
581 _GL_WARN_ON_USE (cosl
, "cosl is unportable - "
582 "use gnulib module cosl for portability");
589 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
591 # define coshf rpl_coshf
593 _GL_FUNCDECL_RPL (coshf
, float, (float x
));
594 _GL_CXXALIAS_RPL (coshf
, float, (float x
));
598 _GL_FUNCDECL_SYS (coshf
, float, (float x
));
600 _GL_CXXALIAS_SYS (coshf
, float, (float x
));
602 _GL_CXXALIASWARN (coshf
);
603 #elif defined GNULIB_POSIXCHECK
605 # if HAVE_RAW_DECL_COSHF
606 _GL_WARN_ON_USE (coshf
, "coshf is unportable - "
607 "use gnulib module coshf for portability");
614 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
616 # define expf rpl_expf
618 _GL_FUNCDECL_RPL (expf
, float, (float x
));
619 _GL_CXXALIAS_RPL (expf
, float, (float x
));
623 _GL_FUNCDECL_SYS (expf
, float, (float x
));
625 _GL_CXXALIAS_SYS (expf
, float, (float x
));
627 _GL_CXXALIASWARN (expf
);
628 #elif defined GNULIB_POSIXCHECK
630 # if HAVE_RAW_DECL_EXPF
631 _GL_WARN_ON_USE (expf
, "expf is unportable - "
632 "use gnulib module expf for portability");
638 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
640 # define expl rpl_expl
642 _GL_FUNCDECL_RPL (expl
, long double, (long double x
));
643 _GL_CXXALIAS_RPL (expl
, long double, (long double x
));
645 # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
647 _GL_FUNCDECL_SYS (expl
, long double, (long double x
));
649 _GL_CXXALIAS_SYS (expl
, long double, (long double x
));
651 _GL_CXXALIASWARN (expl
);
652 #elif defined GNULIB_POSIXCHECK
654 # if HAVE_RAW_DECL_EXPL
655 _GL_WARN_ON_USE (expl
, "expl is unportable - "
656 "use gnulib module expl for portability");
662 # if !@HAVE_DECL_EXP2F@
663 _GL_FUNCDECL_SYS (exp2f
, float, (float x
));
665 _GL_CXXALIAS_SYS (exp2f
, float, (float x
));
666 _GL_CXXALIASWARN (exp2f
);
667 #elif defined GNULIB_POSIXCHECK
669 # if HAVE_RAW_DECL_EXP2F
670 _GL_WARN_ON_USE (exp2f
, "exp2f is unportable - "
671 "use gnulib module exp2f for portability");
677 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
679 # define exp2 rpl_exp2
681 _GL_FUNCDECL_RPL (exp2
, double, (double x
));
682 _GL_CXXALIAS_RPL (exp2
, double, (double x
));
684 # if !@HAVE_DECL_EXP2@
685 _GL_FUNCDECL_SYS (exp2
, double, (double x
));
687 _GL_CXXALIAS_SYS (exp2
, double, (double x
));
690 _GL_CXXALIASWARN (exp2
);
692 #elif defined GNULIB_POSIXCHECK
694 # if HAVE_RAW_DECL_EXP2
695 _GL_WARN_ON_USE (exp2
, "exp2 is unportable - "
696 "use gnulib module exp2 for portability");
702 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
704 # define exp2l rpl_exp2l
706 _GL_FUNCDECL_RPL (exp2l
, long double, (long double x
));
707 _GL_CXXALIAS_RPL (exp2l
, long double, (long double x
));
709 # if !@HAVE_DECL_EXP2L@
711 _GL_FUNCDECL_SYS (exp2l
, long double, (long double x
));
713 _GL_CXXALIAS_SYS (exp2l
, long double, (long double x
));
715 _GL_CXXALIASWARN (exp2l
);
716 #elif defined GNULIB_POSIXCHECK
718 # if HAVE_RAW_DECL_EXP2L
719 _GL_WARN_ON_USE (exp2l
, "exp2l is unportable - "
720 "use gnulib module exp2l for portability");
726 # if @REPLACE_EXPM1F@
727 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
729 # define expm1f rpl_expm1f
731 _GL_FUNCDECL_RPL (expm1f
, float, (float x
));
732 _GL_CXXALIAS_RPL (expm1f
, float, (float x
));
735 _GL_FUNCDECL_SYS (expm1f
, float, (float x
));
737 _GL_CXXALIAS_SYS (expm1f
, float, (float x
));
739 _GL_CXXALIASWARN (expm1f
);
740 #elif defined GNULIB_POSIXCHECK
742 # if HAVE_RAW_DECL_EXPM1F
743 _GL_WARN_ON_USE (expm1f
, "expm1f is unportable - "
744 "use gnulib module expm1f for portability");
750 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
752 # define expm1 rpl_expm1
754 _GL_FUNCDECL_RPL (expm1
, double, (double x
));
755 _GL_CXXALIAS_RPL (expm1
, double, (double x
));
758 _GL_FUNCDECL_SYS (expm1
, double, (double x
));
760 _GL_CXXALIAS_SYS (expm1
, double, (double x
));
763 _GL_CXXALIASWARN (expm1
);
765 #elif defined GNULIB_POSIXCHECK
767 # if HAVE_RAW_DECL_EXPM1
768 _GL_WARN_ON_USE (expm1
, "expm1 is unportable - "
769 "use gnulib module expm1 for portability");
774 # if @REPLACE_EXPM1L@
775 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
777 # define expm1l rpl_expm1l
779 _GL_FUNCDECL_RPL (expm1l
, long double, (long double x
));
780 _GL_CXXALIAS_RPL (expm1l
, long double, (long double x
));
782 # if !@HAVE_DECL_EXPM1L@
784 # if !(defined __cplusplus && defined _AIX)
785 _GL_FUNCDECL_SYS (expm1l
, long double, (long double x
));
788 _GL_CXXALIAS_SYS (expm1l
, long double, (long double x
));
790 _GL_CXXALIASWARN (expm1l
);
791 #elif defined GNULIB_POSIXCHECK
793 # if HAVE_RAW_DECL_EXPM1L
794 _GL_WARN_ON_USE (expm1l
, "expm1l is unportable - "
795 "use gnulib module expm1l for portability");
803 _GL_FUNCDECL_SYS (fabsf
, float, (float x
));
805 _GL_CXXALIAS_SYS (fabsf
, float, (float x
));
806 _GL_CXXALIASWARN (fabsf
);
807 #elif defined GNULIB_POSIXCHECK
809 # if HAVE_RAW_DECL_FABSF
810 _GL_WARN_ON_USE (fabsf
, "fabsf is unportable - "
811 "use gnulib module fabsf for portability");
817 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
819 # define fabsl rpl_fabsl
821 _GL_FUNCDECL_RPL (fabsl
, long double, (long double x
));
822 _GL_CXXALIAS_RPL (fabsl
, long double, (long double x
));
826 _GL_FUNCDECL_SYS (fabsl
, long double, (long double x
));
828 _GL_CXXALIAS_SYS (fabsl
, long double, (long double x
));
830 _GL_CXXALIASWARN (fabsl
);
831 #elif defined GNULIB_POSIXCHECK
833 # if HAVE_RAW_DECL_FABSL
834 _GL_WARN_ON_USE (fabsl
, "fabsl is unportable - "
835 "use gnulib module fabsl for portability");
841 # if @REPLACE_FLOORF@
842 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
844 # define floorf rpl_floorf
846 _GL_FUNCDECL_RPL (floorf
, float, (float x
));
847 _GL_CXXALIAS_RPL (floorf
, float, (float x
));
849 # if !@HAVE_DECL_FLOORF@
851 _GL_FUNCDECL_SYS (floorf
, float, (float x
));
853 _GL_CXXALIAS_SYS (floorf
, float, (float x
));
855 _GL_CXXALIASWARN (floorf
);
856 #elif defined GNULIB_POSIXCHECK
858 # if HAVE_RAW_DECL_FLOORF
859 _GL_WARN_ON_USE (floorf
, "floorf is unportable - "
860 "use gnulib module floorf for portability");
866 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
868 # define floor rpl_floor
870 _GL_FUNCDECL_RPL (floor
, double, (double x
));
871 _GL_CXXALIAS_RPL (floor
, double, (double x
));
873 _GL_CXXALIAS_SYS (floor
, double, (double x
));
876 _GL_CXXALIASWARN (floor
);
881 # if @REPLACE_FLOORL@
882 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
884 # define floorl rpl_floorl
886 _GL_FUNCDECL_RPL (floorl
, long double, (long double x
));
887 _GL_CXXALIAS_RPL (floorl
, long double, (long double x
));
889 # if !@HAVE_DECL_FLOORL@
891 _GL_FUNCDECL_SYS (floorl
, long double, (long double x
));
893 _GL_CXXALIAS_SYS (floorl
, long double, (long double x
));
895 _GL_CXXALIASWARN (floorl
);
896 #elif defined GNULIB_POSIXCHECK
898 # if HAVE_RAW_DECL_FLOORL
899 _GL_WARN_ON_USE (floorl
, "floorl is unportable - "
900 "use gnulib module floorl for portability");
907 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
909 # define fmaf rpl_fmaf
911 _GL_FUNCDECL_RPL (fmaf
, float, (float x
, float y
, float z
));
912 _GL_CXXALIAS_RPL (fmaf
, float, (float x
, float y
, float z
));
916 _GL_FUNCDECL_SYS (fmaf
, float, (float x
, float y
, float z
));
918 _GL_CXXALIAS_SYS (fmaf
, float, (float x
, float y
, float z
));
920 _GL_CXXALIASWARN (fmaf
);
921 #elif defined GNULIB_POSIXCHECK
923 # if HAVE_RAW_DECL_FMAF
924 _GL_WARN_ON_USE (fmaf
, "fmaf is unportable - "
925 "use gnulib module fmaf for portability");
931 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
935 _GL_FUNCDECL_RPL (fma
, double, (double x
, double y
, double z
));
936 _GL_CXXALIAS_RPL (fma
, double, (double x
, double y
, double z
));
940 _GL_FUNCDECL_SYS (fma
, double, (double x
, double y
, double z
));
942 _GL_CXXALIAS_SYS (fma
, double, (double x
, double y
, double z
));
945 _GL_CXXALIASWARN (fma
);
947 #elif defined GNULIB_POSIXCHECK
949 # if HAVE_RAW_DECL_FMA
950 _GL_WARN_ON_USE (fma
, "fma is unportable - "
951 "use gnulib module fma for portability");
957 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
959 # define fmal rpl_fmal
961 _GL_FUNCDECL_RPL (fmal
, long double,
962 (long double x
, long double y
, long double z
));
963 _GL_CXXALIAS_RPL (fmal
, long double,
964 (long double x
, long double y
, long double z
));
968 # if !(defined __cplusplus && defined _AIX)
969 _GL_FUNCDECL_SYS (fmal
, long double,
970 (long double x
, long double y
, long double z
));
973 _GL_CXXALIAS_SYS (fmal
, long double,
974 (long double x
, long double y
, long double z
));
976 _GL_CXXALIASWARN (fmal
);
977 #elif defined GNULIB_POSIXCHECK
979 # if HAVE_RAW_DECL_FMAL
980 _GL_WARN_ON_USE (fmal
, "fmal is unportable - "
981 "use gnulib module fmal for portability");
988 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
990 # define fmodf rpl_fmodf
992 _GL_FUNCDECL_RPL (fmodf
, float, (float x
, float y
));
993 _GL_CXXALIAS_RPL (fmodf
, float, (float x
, float y
));
997 _GL_FUNCDECL_SYS (fmodf
, float, (float x
, float y
));
999 _GL_CXXALIAS_SYS (fmodf
, float, (float x
, float y
));
1001 _GL_CXXALIASWARN (fmodf
);
1002 #elif defined GNULIB_POSIXCHECK
1004 # if HAVE_RAW_DECL_FMODF
1005 _GL_WARN_ON_USE (fmodf
, "fmodf is unportable - "
1006 "use gnulib module fmodf for portability");
1012 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1014 # define fmod rpl_fmod
1016 _GL_FUNCDECL_RPL (fmod
, double, (double x
, double y
));
1017 _GL_CXXALIAS_RPL (fmod
, double, (double x
, double y
));
1019 _GL_CXXALIAS_SYS (fmod
, double, (double x
, double y
));
1022 _GL_CXXALIASWARN (fmod
);
1024 #elif defined GNULIB_POSIXCHECK
1026 # if HAVE_RAW_DECL_FMOD
1027 _GL_WARN_ON_USE (fmod
, "fmod has portability problems - "
1028 "use gnulib module fmod for portability");
1033 # if @REPLACE_FMODL@
1034 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1036 # define fmodl rpl_fmodl
1038 _GL_FUNCDECL_RPL (fmodl
, long double, (long double x
, long double y
));
1039 _GL_CXXALIAS_RPL (fmodl
, long double, (long double x
, long double y
));
1043 _GL_FUNCDECL_SYS (fmodl
, long double, (long double x
, long double y
));
1045 _GL_CXXALIAS_SYS (fmodl
, long double, (long double x
, long double y
));
1047 _GL_CXXALIASWARN (fmodl
);
1048 #elif defined GNULIB_POSIXCHECK
1050 # if HAVE_RAW_DECL_FMODL
1051 _GL_WARN_ON_USE (fmodl
, "fmodl is unportable - "
1052 "use gnulib module fmodl for portability");
1058 x = mantissa * 2^exp
1060 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1061 If x is zero: mantissa = x, exp = 0.
1062 If x is infinite or NaN: mantissa = x, exp unspecified.
1063 Store exp in *EXPPTR and return mantissa. */
1065 # if @REPLACE_FREXPF@
1066 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1068 # define frexpf rpl_frexpf
1070 _GL_FUNCDECL_RPL (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1071 _GL_CXXALIAS_RPL (frexpf
, float, (float x
, int *expptr
));
1075 _GL_FUNCDECL_SYS (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1077 _GL_CXXALIAS_SYS (frexpf
, float, (float x
, int *expptr
));
1079 _GL_CXXALIASWARN (frexpf
);
1080 #elif defined GNULIB_POSIXCHECK
1082 # if HAVE_RAW_DECL_FREXPF
1083 _GL_WARN_ON_USE (frexpf
, "frexpf is unportable - "
1084 "use gnulib module frexpf for portability");
1089 x = mantissa * 2^exp
1091 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1092 If x is zero: mantissa = x, exp = 0.
1093 If x is infinite or NaN: mantissa = x, exp unspecified.
1094 Store exp in *EXPPTR and return mantissa. */
1096 # if @REPLACE_FREXP@
1097 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1099 # define frexp rpl_frexp
1101 _GL_FUNCDECL_RPL (frexp
, double, (double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1102 _GL_CXXALIAS_RPL (frexp
, double, (double x
, int *expptr
));
1104 _GL_CXXALIAS_SYS (frexp
, double, (double x
, int *expptr
));
1107 _GL_CXXALIASWARN1 (frexp
, double, (double x
, int *expptr
));
1109 #elif defined GNULIB_POSIXCHECK
1111 /* Assume frexp is always declared. */
1112 _GL_WARN_ON_USE (frexp
, "frexp is unportable - "
1113 "use gnulib module frexp for portability");
1117 x = mantissa * 2^exp
1119 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1120 If x is zero: mantissa = x, exp = 0.
1121 If x is infinite or NaN: mantissa = x, exp unspecified.
1122 Store exp in *EXPPTR and return mantissa. */
1123 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
1124 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1126 # define frexpl rpl_frexpl
1128 _GL_FUNCDECL_RPL (frexpl
, long double,
1129 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1130 _GL_CXXALIAS_RPL (frexpl
, long double, (long double x
, int *expptr
));
1132 # if !@HAVE_DECL_FREXPL@
1133 _GL_FUNCDECL_SYS (frexpl
, long double,
1134 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1136 # if @GNULIB_FREXPL@
1137 _GL_CXXALIAS_SYS (frexpl
, long double, (long double x
, int *expptr
));
1140 #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
1141 _GL_CXXALIASWARN (frexpl
);
1143 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
1145 # if HAVE_RAW_DECL_FREXPL
1146 _GL_WARN_ON_USE (frexpl
, "frexpl is unportable - "
1147 "use gnulib module frexpl for portability");
1152 /* Return sqrt(x^2+y^2). */
1154 # if @REPLACE_HYPOTF@
1155 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1157 # define hypotf rpl_hypotf
1159 _GL_FUNCDECL_RPL (hypotf
, float, (float x
, float y
));
1160 _GL_CXXALIAS_RPL (hypotf
, float, (float x
, float y
));
1163 _GL_FUNCDECL_SYS (hypotf
, float, (float x
, float y
));
1165 _GL_CXXALIAS_SYS (hypotf
, float, (float x
, float y
));
1167 _GL_CXXALIASWARN (hypotf
);
1168 #elif defined GNULIB_POSIXCHECK
1170 # if HAVE_RAW_DECL_HYPOTF
1171 _GL_WARN_ON_USE (hypotf
, "hypotf is unportable - "
1172 "use gnulib module hypotf for portability");
1176 /* Return sqrt(x^2+y^2). */
1178 # if @REPLACE_HYPOT@
1179 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1181 # define hypot rpl_hypot
1183 _GL_FUNCDECL_RPL (hypot
, double, (double x
, double y
));
1184 _GL_CXXALIAS_RPL (hypot
, double, (double x
, double y
));
1186 _GL_CXXALIAS_SYS (hypot
, double, (double x
, double y
));
1189 _GL_CXXALIASWARN (hypot
);
1191 #elif defined GNULIB_POSIXCHECK
1193 # if HAVE_RAW_DECL_HYPOT
1194 _GL_WARN_ON_USE (hypotf
, "hypot has portability problems - "
1195 "use gnulib module hypot for portability");
1199 /* Return sqrt(x^2+y^2). */
1201 # if @REPLACE_HYPOTL@
1202 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1204 # define hypotl rpl_hypotl
1206 _GL_FUNCDECL_RPL (hypotl
, long double, (long double x
, long double y
));
1207 _GL_CXXALIAS_RPL (hypotl
, long double, (long double x
, long double y
));
1210 _GL_FUNCDECL_SYS (hypotl
, long double, (long double x
, long double y
));
1212 _GL_CXXALIAS_SYS (hypotl
, long double, (long double x
, long double y
));
1214 _GL_CXXALIASWARN (hypotl
);
1215 #elif defined GNULIB_POSIXCHECK
1217 # if HAVE_RAW_DECL_HYPOTL
1218 _GL_WARN_ON_USE (hypotl
, "hypotl is unportable - "
1219 "use gnulib module hypotl for portability");
1225 # if @REPLACE_ILOGBF@
1226 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1228 # define ilogbf rpl_ilogbf
1230 _GL_FUNCDECL_RPL (ilogbf
, int, (float x
));
1231 _GL_CXXALIAS_RPL (ilogbf
, int, (float x
));
1234 _GL_FUNCDECL_SYS (ilogbf
, int, (float x
));
1236 _GL_CXXALIAS_SYS (ilogbf
, int, (float x
));
1238 _GL_CXXALIASWARN (ilogbf
);
1239 #elif defined GNULIB_POSIXCHECK
1241 # if HAVE_RAW_DECL_ILOGBF
1242 _GL_WARN_ON_USE (ilogbf
, "ilogbf is unportable - "
1243 "use gnulib module ilogbf for portability");
1248 # if @REPLACE_ILOGB@
1249 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1251 # define ilogb rpl_ilogb
1253 _GL_FUNCDECL_RPL (ilogb
, int, (double x
));
1254 _GL_CXXALIAS_RPL (ilogb
, int, (double x
));
1257 _GL_FUNCDECL_SYS (ilogb
, int, (double x
));
1259 _GL_CXXALIAS_SYS (ilogb
, int, (double x
));
1262 _GL_CXXALIASWARN (ilogb
);
1264 #elif defined GNULIB_POSIXCHECK
1266 # if HAVE_RAW_DECL_ILOGB
1267 _GL_WARN_ON_USE (ilogb
, "ilogb is unportable - "
1268 "use gnulib module ilogb for portability");
1273 # if @REPLACE_ILOGBL@
1274 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1276 # define ilogbl rpl_ilogbl
1278 _GL_FUNCDECL_RPL (ilogbl
, int, (long double x
));
1279 _GL_CXXALIAS_RPL (ilogbl
, int, (long double x
));
1282 _GL_FUNCDECL_SYS (ilogbl
, int, (long double x
));
1284 _GL_CXXALIAS_SYS (ilogbl
, int, (long double x
));
1286 _GL_CXXALIASWARN (ilogbl
);
1287 #elif defined GNULIB_POSIXCHECK
1289 # if HAVE_RAW_DECL_ILOGBL
1290 _GL_WARN_ON_USE (ilogbl
, "ilogbl is unportable - "
1291 "use gnulib module ilogbl for portability");
1296 /* Return x * 2^exp. */
1300 _GL_FUNCDECL_SYS (ldexpf
, float, (float x
, int exp
));
1302 _GL_CXXALIAS_SYS (ldexpf
, float, (float x
, int exp
));
1303 _GL_CXXALIASWARN (ldexpf
);
1304 #elif defined GNULIB_POSIXCHECK
1306 # if HAVE_RAW_DECL_LDEXPF
1307 _GL_WARN_ON_USE (ldexpf
, "ldexpf is unportable - "
1308 "use gnulib module ldexpf for portability");
1312 /* Return x * 2^exp. */
1313 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
1314 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1316 # define ldexpl rpl_ldexpl
1318 _GL_FUNCDECL_RPL (ldexpl
, long double, (long double x
, int exp
));
1319 _GL_CXXALIAS_RPL (ldexpl
, long double, (long double x
, int exp
));
1321 # if !@HAVE_DECL_LDEXPL@
1322 _GL_FUNCDECL_SYS (ldexpl
, long double, (long double x
, int exp
));
1324 # if @GNULIB_LDEXPL@
1325 _GL_CXXALIAS_SYS (ldexpl
, long double, (long double x
, int exp
));
1329 _GL_CXXALIASWARN (ldexpl
);
1331 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
1333 # if HAVE_RAW_DECL_LDEXPL
1334 _GL_WARN_ON_USE (ldexpl
, "ldexpl is unportable - "
1335 "use gnulib module ldexpl for portability");
1342 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1344 # define logf rpl_logf
1346 _GL_FUNCDECL_RPL (logf
, float, (float x
));
1347 _GL_CXXALIAS_RPL (logf
, float, (float x
));
1351 _GL_FUNCDECL_SYS (logf
, float, (float x
));
1353 _GL_CXXALIAS_SYS (logf
, float, (float x
));
1355 _GL_CXXALIASWARN (logf
);
1356 #elif defined GNULIB_POSIXCHECK
1358 # if HAVE_RAW_DECL_LOGF
1359 _GL_WARN_ON_USE (logf
, "logf is unportable - "
1360 "use gnulib module logf for portability");
1366 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1368 # define log rpl_log
1370 _GL_FUNCDECL_RPL (log
, double, (double x
));
1371 _GL_CXXALIAS_RPL (log
, double, (double x
));
1373 _GL_CXXALIAS_SYS (log
, double, (double x
));
1376 _GL_CXXALIASWARN (log
);
1378 #elif defined GNULIB_POSIXCHECK
1380 # if HAVE_RAW_DECL_LOG
1381 _GL_WARN_ON_USE (log
, "log has portability problems - "
1382 "use gnulib module log for portability");
1388 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1390 # define logl rpl_logl
1392 _GL_FUNCDECL_RPL (logl
, long double, (long double x
));
1393 _GL_CXXALIAS_RPL (logl
, long double, (long double x
));
1395 # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
1397 _GL_FUNCDECL_SYS (logl
, long double, (long double x
));
1399 _GL_CXXALIAS_SYS (logl
, long double, (long double x
));
1401 _GL_CXXALIASWARN (logl
);
1402 #elif defined GNULIB_POSIXCHECK
1404 # if HAVE_RAW_DECL_LOGL
1405 _GL_WARN_ON_USE (logl
, "logl is unportable - "
1406 "use gnulib module logl for portability");
1412 # if @REPLACE_LOG10F@
1413 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1415 # define log10f rpl_log10f
1417 _GL_FUNCDECL_RPL (log10f
, float, (float x
));
1418 _GL_CXXALIAS_RPL (log10f
, float, (float x
));
1422 _GL_FUNCDECL_SYS (log10f
, float, (float x
));
1424 _GL_CXXALIAS_SYS (log10f
, float, (float x
));
1426 _GL_CXXALIASWARN (log10f
);
1427 #elif defined GNULIB_POSIXCHECK
1429 # if HAVE_RAW_DECL_LOG10F
1430 _GL_WARN_ON_USE (log10f
, "log10f is unportable - "
1431 "use gnulib module log10f for portability");
1436 # if @REPLACE_LOG10@
1437 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1439 # define log10 rpl_log10
1441 _GL_FUNCDECL_RPL (log10
, double, (double x
));
1442 _GL_CXXALIAS_RPL (log10
, double, (double x
));
1444 _GL_CXXALIAS_SYS (log10
, double, (double x
));
1447 _GL_CXXALIASWARN (log10
);
1449 #elif defined GNULIB_POSIXCHECK
1451 # if HAVE_RAW_DECL_LOG10
1452 _GL_WARN_ON_USE (log10
, "log10 has portability problems - "
1453 "use gnulib module log10 for portability");
1458 # if @REPLACE_LOG10L@
1459 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1461 # define log10l rpl_log10l
1463 _GL_FUNCDECL_RPL (log10l
, long double, (long double x
));
1464 _GL_CXXALIAS_RPL (log10l
, long double, (long double x
));
1466 # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
1468 _GL_FUNCDECL_SYS (log10l
, long double, (long double x
));
1470 _GL_CXXALIAS_SYS (log10l
, long double, (long double x
));
1472 _GL_CXXALIASWARN (log10l
);
1473 #elif defined GNULIB_POSIXCHECK
1475 # if HAVE_RAW_DECL_LOG10L
1476 _GL_WARN_ON_USE (log10l
, "log10l is unportable - "
1477 "use gnulib module log10l for portability");
1483 # if @REPLACE_LOG1PF@
1484 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1486 # define log1pf rpl_log1pf
1488 _GL_FUNCDECL_RPL (log1pf
, float, (float x
));
1489 _GL_CXXALIAS_RPL (log1pf
, float, (float x
));
1492 _GL_FUNCDECL_SYS (log1pf
, float, (float x
));
1494 _GL_CXXALIAS_SYS (log1pf
, float, (float x
));
1496 _GL_CXXALIASWARN (log1pf
);
1497 #elif defined GNULIB_POSIXCHECK
1499 # if HAVE_RAW_DECL_LOG1PF
1500 _GL_WARN_ON_USE (log1pf
, "log1pf is unportable - "
1501 "use gnulib module log1pf for portability");
1506 # if @REPLACE_LOG1P@
1507 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1509 # define log1p rpl_log1p
1511 _GL_FUNCDECL_RPL (log1p
, double, (double x
));
1512 _GL_CXXALIAS_RPL (log1p
, double, (double x
));
1515 _GL_FUNCDECL_SYS (log1p
, double, (double x
));
1517 _GL_CXXALIAS_SYS (log1p
, double, (double x
));
1520 _GL_CXXALIASWARN (log1p
);
1522 #elif defined GNULIB_POSIXCHECK
1524 # if HAVE_RAW_DECL_LOG1P
1525 _GL_WARN_ON_USE (log1p
, "log1p has portability problems - "
1526 "use gnulib module log1p for portability");
1531 # if @REPLACE_LOG1PL@
1532 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1534 # define log1pl rpl_log1pl
1536 _GL_FUNCDECL_RPL (log1pl
, long double, (long double x
));
1537 _GL_CXXALIAS_RPL (log1pl
, long double, (long double x
));
1540 _GL_FUNCDECL_SYS (log1pl
, long double, (long double x
));
1542 _GL_CXXALIAS_SYS (log1pl
, long double, (long double x
));
1544 _GL_CXXALIASWARN (log1pl
);
1545 #elif defined GNULIB_POSIXCHECK
1547 # if HAVE_RAW_DECL_LOG1PL
1548 _GL_WARN_ON_USE (log1pl
, "log1pl has portability problems - "
1549 "use gnulib module log1pl for portability");
1555 # if @REPLACE_LOG2F@
1556 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1558 # define log2f rpl_log2f
1560 _GL_FUNCDECL_RPL (log2f
, float, (float x
));
1561 _GL_CXXALIAS_RPL (log2f
, float, (float x
));
1563 # if !@HAVE_DECL_LOG2F@
1565 _GL_FUNCDECL_SYS (log2f
, float, (float x
));
1567 _GL_CXXALIAS_SYS (log2f
, float, (float x
));
1569 _GL_CXXALIASWARN (log2f
);
1570 #elif defined GNULIB_POSIXCHECK
1572 # if HAVE_RAW_DECL_LOG2F
1573 _GL_WARN_ON_USE (log2f
, "log2f is unportable - "
1574 "use gnulib module log2f for portability");
1580 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1582 # define log2 rpl_log2
1584 _GL_FUNCDECL_RPL (log2
, double, (double x
));
1585 _GL_CXXALIAS_RPL (log2
, double, (double x
));
1587 # if !@HAVE_DECL_LOG2@
1589 _GL_FUNCDECL_SYS (log2
, double, (double x
));
1591 _GL_CXXALIAS_SYS (log2
, double, (double x
));
1594 _GL_CXXALIASWARN (log2
);
1596 #elif defined GNULIB_POSIXCHECK
1598 # if HAVE_RAW_DECL_LOG2
1599 _GL_WARN_ON_USE (log2
, "log2 is unportable - "
1600 "use gnulib module log2 for portability");
1605 # if @REPLACE_LOG2L@
1606 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1608 # define log2l rpl_log2l
1610 _GL_FUNCDECL_RPL (log2l
, long double, (long double x
));
1611 _GL_CXXALIAS_RPL (log2l
, long double, (long double x
));
1613 # if !@HAVE_DECL_LOG2L@
1614 _GL_FUNCDECL_SYS (log2l
, long double, (long double x
));
1616 _GL_CXXALIAS_SYS (log2l
, long double, (long double x
));
1618 _GL_CXXALIASWARN (log2l
);
1619 #elif defined GNULIB_POSIXCHECK
1621 # if HAVE_RAW_DECL_LOG2L
1622 _GL_WARN_ON_USE (log2l
, "log2l is unportable - "
1623 "use gnulib module log2l for portability");
1629 # if @REPLACE_LOGBF@
1630 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1632 # define logbf rpl_logbf
1634 _GL_FUNCDECL_RPL (logbf
, float, (float x
));
1635 _GL_CXXALIAS_RPL (logbf
, float, (float x
));
1638 _GL_FUNCDECL_SYS (logbf
, float, (float x
));
1640 _GL_CXXALIAS_SYS (logbf
, float, (float x
));
1642 _GL_CXXALIASWARN (logbf
);
1643 #elif defined GNULIB_POSIXCHECK
1645 # if HAVE_RAW_DECL_LOGBF
1646 _GL_WARN_ON_USE (logbf
, "logbf is unportable - "
1647 "use gnulib module logbf for portability");
1653 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1655 # define logb rpl_logb
1657 _GL_FUNCDECL_RPL (logb
, double, (double x
));
1658 _GL_CXXALIAS_RPL (logb
, double, (double x
));
1660 # if !@HAVE_DECL_LOGB@
1661 _GL_FUNCDECL_SYS (logb
, double, (double x
));
1663 _GL_CXXALIAS_SYS (logb
, double, (double x
));
1666 _GL_CXXALIASWARN (logb
);
1668 #elif defined GNULIB_POSIXCHECK
1670 # if HAVE_RAW_DECL_LOGB
1671 _GL_WARN_ON_USE (logb
, "logb is unportable - "
1672 "use gnulib module logb for portability");
1677 # if @REPLACE_LOGBL@
1678 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1680 # define logbl rpl_logbl
1682 _GL_FUNCDECL_RPL (logbl
, long double, (long double x
));
1683 _GL_CXXALIAS_RPL (logbl
, long double, (long double x
));
1686 _GL_FUNCDECL_SYS (logbl
, long double, (long double x
));
1688 _GL_CXXALIAS_SYS (logbl
, long double, (long double x
));
1690 _GL_CXXALIASWARN (logbl
);
1691 #elif defined GNULIB_POSIXCHECK
1693 # if HAVE_RAW_DECL_LOGBL
1694 _GL_WARN_ON_USE (logbl
, "logbl is unportable - "
1695 "use gnulib module logbl for portability");
1701 # if @REPLACE_MODFF@
1702 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1704 # define modff rpl_modff
1706 _GL_FUNCDECL_RPL (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1707 _GL_CXXALIAS_RPL (modff
, float, (float x
, float *iptr
));
1711 _GL_FUNCDECL_SYS (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1713 _GL_CXXALIAS_SYS (modff
, float, (float x
, float *iptr
));
1715 _GL_CXXALIASWARN (modff
);
1716 #elif defined GNULIB_POSIXCHECK
1718 # if HAVE_RAW_DECL_MODFF
1719 _GL_WARN_ON_USE (modff
, "modff is unportable - "
1720 "use gnulib module modff for portability");
1726 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1728 # define modf rpl_modf
1730 _GL_FUNCDECL_RPL (modf
, double, (double x
, double *iptr
) _GL_ARG_NONNULL ((2)));
1731 _GL_CXXALIAS_RPL (modf
, double, (double x
, double *iptr
));
1733 _GL_CXXALIAS_SYS (modf
, double, (double x
, double *iptr
));
1736 _GL_CXXALIASWARN (modf
);
1738 #elif defined GNULIB_POSIXCHECK
1740 # if HAVE_RAW_DECL_MODF
1741 _GL_WARN_ON_USE (modf
, "modf has portability problems - "
1742 "use gnulib module modf for portability");
1747 # if @REPLACE_MODFL@
1748 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1750 # define modfl rpl_modfl
1752 _GL_FUNCDECL_RPL (modfl
, long double, (long double x
, long double *iptr
)
1753 _GL_ARG_NONNULL ((2)));
1754 _GL_CXXALIAS_RPL (modfl
, long double, (long double x
, long double *iptr
));
1758 _GL_FUNCDECL_SYS (modfl
, long double, (long double x
, long double *iptr
)
1759 _GL_ARG_NONNULL ((2)));
1761 _GL_CXXALIAS_SYS (modfl
, long double, (long double x
, long double *iptr
));
1763 _GL_CXXALIASWARN (modfl
);
1764 #elif defined GNULIB_POSIXCHECK
1766 # if HAVE_RAW_DECL_MODFL
1767 _GL_WARN_ON_USE (modfl
, "modfl is unportable - "
1768 "use gnulib module modfl for portability");
1776 _GL_FUNCDECL_SYS (powf
, float, (float x
, float y
));
1778 _GL_CXXALIAS_SYS (powf
, float, (float x
, float y
));
1779 _GL_CXXALIASWARN (powf
);
1780 #elif defined GNULIB_POSIXCHECK
1782 # if HAVE_RAW_DECL_POWF
1783 _GL_WARN_ON_USE (powf
, "powf is unportable - "
1784 "use gnulib module powf for portability");
1789 #if @GNULIB_REMAINDERF@
1790 # if @REPLACE_REMAINDERF@
1791 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1793 # define remainderf rpl_remainderf
1795 _GL_FUNCDECL_RPL (remainderf
, float, (float x
, float y
));
1796 _GL_CXXALIAS_RPL (remainderf
, float, (float x
, float y
));
1798 # if !@HAVE_REMAINDERF@
1799 _GL_FUNCDECL_SYS (remainderf
, float, (float x
, float y
));
1801 _GL_CXXALIAS_SYS (remainderf
, float, (float x
, float y
));
1803 _GL_CXXALIASWARN (remainderf
);
1804 #elif defined GNULIB_POSIXCHECK
1806 # if HAVE_RAW_DECL_REMAINDERF
1807 _GL_WARN_ON_USE (remainderf
, "remainderf is unportable - "
1808 "use gnulib module remainderf for portability");
1812 #if @GNULIB_REMAINDER@
1813 # if @REPLACE_REMAINDER@
1814 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1816 # define remainder rpl_remainder
1818 _GL_FUNCDECL_RPL (remainder
, double, (double x
, double y
));
1819 _GL_CXXALIAS_RPL (remainder
, double, (double x
, double y
));
1821 # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
1822 _GL_FUNCDECL_SYS (remainder
, double, (double x
, double y
));
1824 _GL_CXXALIAS_SYS (remainder
, double, (double x
, double y
));
1827 _GL_CXXALIASWARN (remainder
);
1829 #elif defined GNULIB_POSIXCHECK
1831 # if HAVE_RAW_DECL_REMAINDER
1832 _GL_WARN_ON_USE (remainder
, "remainder is unportable - "
1833 "use gnulib module remainder for portability");
1837 #if @GNULIB_REMAINDERL@
1838 # if @REPLACE_REMAINDERL@
1839 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1841 # define remainderl rpl_remainderl
1843 _GL_FUNCDECL_RPL (remainderl
, long double, (long double x
, long double y
));
1844 _GL_CXXALIAS_RPL (remainderl
, long double, (long double x
, long double y
));
1846 # if !@HAVE_DECL_REMAINDERL@
1848 # if !(defined __cplusplus && defined _AIX)
1849 _GL_FUNCDECL_SYS (remainderl
, long double, (long double x
, long double y
));
1852 _GL_CXXALIAS_SYS (remainderl
, long double, (long double x
, long double y
));
1854 _GL_CXXALIASWARN (remainderl
);
1855 #elif defined GNULIB_POSIXCHECK
1857 # if HAVE_RAW_DECL_REMAINDERL
1858 _GL_WARN_ON_USE (remainderl
, "remainderl is unportable - "
1859 "use gnulib module remainderl for portability");
1865 # if !@HAVE_DECL_RINTF@
1866 _GL_FUNCDECL_SYS (rintf
, float, (float x
));
1868 _GL_CXXALIAS_SYS (rintf
, float, (float x
));
1869 _GL_CXXALIASWARN (rintf
);
1870 #elif defined GNULIB_POSIXCHECK
1872 # if HAVE_RAW_DECL_RINTF
1873 _GL_WARN_ON_USE (rintf
, "rintf is unportable - "
1874 "use gnulib module rintf for portability");
1880 _GL_FUNCDECL_SYS (rint
, double, (double x
));
1882 _GL_CXXALIAS_SYS (rint
, double, (double x
));
1884 _GL_CXXALIASWARN (rint
);
1886 #elif defined GNULIB_POSIXCHECK
1888 # if HAVE_RAW_DECL_RINT
1889 _GL_WARN_ON_USE (rint
, "rint is unportable - "
1890 "use gnulib module rint for portability");
1895 # if @REPLACE_RINTL@
1896 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1898 # define rintl rpl_rintl
1900 _GL_FUNCDECL_RPL (rintl
, long double, (long double x
));
1901 _GL_CXXALIAS_RPL (rintl
, long double, (long double x
));
1904 _GL_FUNCDECL_SYS (rintl
, long double, (long double x
));
1906 _GL_CXXALIAS_SYS (rintl
, long double, (long double x
));
1908 _GL_CXXALIASWARN (rintl
);
1909 #elif defined GNULIB_POSIXCHECK
1911 # if HAVE_RAW_DECL_RINTL
1912 _GL_WARN_ON_USE (rintl
, "rintl is unportable - "
1913 "use gnulib module rintl for portability");
1919 # if @REPLACE_ROUNDF@
1920 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1922 # define roundf rpl_roundf
1924 _GL_FUNCDECL_RPL (roundf
, float, (float x
));
1925 _GL_CXXALIAS_RPL (roundf
, float, (float x
));
1927 # if !@HAVE_DECL_ROUNDF@
1928 _GL_FUNCDECL_SYS (roundf
, float, (float x
));
1930 _GL_CXXALIAS_SYS (roundf
, float, (float x
));
1932 _GL_CXXALIASWARN (roundf
);
1933 #elif defined GNULIB_POSIXCHECK
1935 # if HAVE_RAW_DECL_ROUNDF
1936 _GL_WARN_ON_USE (roundf
, "roundf is unportable - "
1937 "use gnulib module roundf for portability");
1942 # if @REPLACE_ROUND@
1943 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1945 # define round rpl_round
1947 _GL_FUNCDECL_RPL (round
, double, (double x
));
1948 _GL_CXXALIAS_RPL (round
, double, (double x
));
1950 # if !@HAVE_DECL_ROUND@
1951 _GL_FUNCDECL_SYS (round
, double, (double x
));
1953 _GL_CXXALIAS_SYS (round
, double, (double x
));
1956 _GL_CXXALIASWARN (round
);
1958 #elif defined GNULIB_POSIXCHECK
1960 # if HAVE_RAW_DECL_ROUND
1961 _GL_WARN_ON_USE (round
, "round is unportable - "
1962 "use gnulib module round for portability");
1967 # if @REPLACE_ROUNDL@
1968 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1970 # define roundl rpl_roundl
1972 _GL_FUNCDECL_RPL (roundl
, long double, (long double x
));
1973 _GL_CXXALIAS_RPL (roundl
, long double, (long double x
));
1975 # if !@HAVE_DECL_ROUNDL@
1977 # if !(defined __cplusplus && defined _AIX)
1978 _GL_FUNCDECL_SYS (roundl
, long double, (long double x
));
1981 _GL_CXXALIAS_SYS (roundl
, long double, (long double x
));
1983 _GL_CXXALIASWARN (roundl
);
1984 #elif defined GNULIB_POSIXCHECK
1986 # if HAVE_RAW_DECL_ROUNDL
1987 _GL_WARN_ON_USE (roundl
, "roundl is unportable - "
1988 "use gnulib module roundl for portability");
1995 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1997 # define sinf rpl_sinf
1999 _GL_FUNCDECL_RPL (sinf
, float, (float x
));
2000 _GL_CXXALIAS_RPL (sinf
, float, (float x
));
2004 _GL_FUNCDECL_SYS (sinf
, float, (float x
));
2006 _GL_CXXALIAS_SYS (sinf
, float, (float x
));
2008 _GL_CXXALIASWARN (sinf
);
2009 #elif defined GNULIB_POSIXCHECK
2011 # if HAVE_RAW_DECL_SINF
2012 _GL_WARN_ON_USE (sinf
, "sinf is unportable - "
2013 "use gnulib module sinf for portability");
2018 # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
2020 _GL_FUNCDECL_SYS (sinl
, long double, (long double x
));
2022 _GL_CXXALIAS_SYS (sinl
, long double, (long double x
));
2023 _GL_CXXALIASWARN (sinl
);
2024 #elif defined GNULIB_POSIXCHECK
2026 # if HAVE_RAW_DECL_SINL
2027 _GL_WARN_ON_USE (sinl
, "sinl is unportable - "
2028 "use gnulib module sinl for portability");
2034 # if @REPLACE_SINHF@
2035 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2037 # define sinhf rpl_sinhf
2039 _GL_FUNCDECL_RPL (sinhf
, float, (float x
));
2040 _GL_CXXALIAS_RPL (sinhf
, float, (float x
));
2044 _GL_FUNCDECL_SYS (sinhf
, float, (float x
));
2046 _GL_CXXALIAS_SYS (sinhf
, float, (float x
));
2048 _GL_CXXALIASWARN (sinhf
);
2049 #elif defined GNULIB_POSIXCHECK
2051 # if HAVE_RAW_DECL_SINHF
2052 _GL_WARN_ON_USE (sinhf
, "sinhf is unportable - "
2053 "use gnulib module sinhf for portability");
2059 # if @REPLACE_SQRTF@
2060 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2062 # define sqrtf rpl_sqrtf
2064 _GL_FUNCDECL_RPL (sqrtf
, float, (float x
));
2065 _GL_CXXALIAS_RPL (sqrtf
, float, (float x
));
2069 _GL_FUNCDECL_SYS (sqrtf
, float, (float x
));
2071 _GL_CXXALIAS_SYS (sqrtf
, float, (float x
));
2073 _GL_CXXALIASWARN (sqrtf
);
2074 #elif defined GNULIB_POSIXCHECK
2076 # if HAVE_RAW_DECL_SQRTF
2077 _GL_WARN_ON_USE (sqrtf
, "sqrtf is unportable - "
2078 "use gnulib module sqrtf for portability");
2083 # if @REPLACE_SQRTL@
2084 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2086 # define sqrtl rpl_sqrtl
2088 _GL_FUNCDECL_RPL (sqrtl
, long double, (long double x
));
2089 _GL_CXXALIAS_RPL (sqrtl
, long double, (long double x
));
2091 # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
2093 _GL_FUNCDECL_SYS (sqrtl
, long double, (long double x
));
2095 _GL_CXXALIAS_SYS (sqrtl
, long double, (long double x
));
2097 _GL_CXXALIASWARN (sqrtl
);
2098 #elif defined GNULIB_POSIXCHECK
2100 # if HAVE_RAW_DECL_SQRTL
2101 _GL_WARN_ON_USE (sqrtl
, "sqrtl is unportable - "
2102 "use gnulib module sqrtl for portability");
2109 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2111 # define tanf rpl_tanf
2113 _GL_FUNCDECL_RPL (tanf
, float, (float x
));
2114 _GL_CXXALIAS_RPL (tanf
, float, (float x
));
2118 _GL_FUNCDECL_SYS (tanf
, float, (float x
));
2120 _GL_CXXALIAS_SYS (tanf
, float, (float x
));
2122 _GL_CXXALIASWARN (tanf
);
2123 #elif defined GNULIB_POSIXCHECK
2125 # if HAVE_RAW_DECL_TANF
2126 _GL_WARN_ON_USE (tanf
, "tanf is unportable - "
2127 "use gnulib module tanf for portability");
2132 # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
2134 _GL_FUNCDECL_SYS (tanl
, long double, (long double x
));
2136 _GL_CXXALIAS_SYS (tanl
, long double, (long double x
));
2137 _GL_CXXALIASWARN (tanl
);
2138 #elif defined GNULIB_POSIXCHECK
2140 # if HAVE_RAW_DECL_TANL
2141 _GL_WARN_ON_USE (tanl
, "tanl is unportable - "
2142 "use gnulib module tanl for portability");
2148 # if @REPLACE_TANHF@
2149 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2151 # define tanhf rpl_tanhf
2153 _GL_FUNCDECL_RPL (tanhf
, float, (float x
));
2154 _GL_CXXALIAS_RPL (tanhf
, float, (float x
));
2158 _GL_FUNCDECL_SYS (tanhf
, float, (float x
));
2160 _GL_CXXALIAS_SYS (tanhf
, float, (float x
));
2162 _GL_CXXALIASWARN (tanhf
);
2163 #elif defined GNULIB_POSIXCHECK
2165 # if HAVE_RAW_DECL_TANHF
2166 _GL_WARN_ON_USE (tanhf
, "tanhf is unportable - "
2167 "use gnulib module tanhf for portability");
2173 # if @REPLACE_TRUNCF@
2174 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2176 # define truncf rpl_truncf
2178 _GL_FUNCDECL_RPL (truncf
, float, (float x
));
2179 _GL_CXXALIAS_RPL (truncf
, float, (float x
));
2181 # if !@HAVE_DECL_TRUNCF@
2182 _GL_FUNCDECL_SYS (truncf
, float, (float x
));
2184 _GL_CXXALIAS_SYS (truncf
, float, (float x
));
2186 _GL_CXXALIASWARN (truncf
);
2187 #elif defined GNULIB_POSIXCHECK
2189 # if HAVE_RAW_DECL_TRUNCF
2190 _GL_WARN_ON_USE (truncf
, "truncf is unportable - "
2191 "use gnulib module truncf for portability");
2196 # if @REPLACE_TRUNC@
2197 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2199 # define trunc rpl_trunc
2201 _GL_FUNCDECL_RPL (trunc
, double, (double x
));
2202 _GL_CXXALIAS_RPL (trunc
, double, (double x
));
2204 # if !@HAVE_DECL_TRUNC@
2205 _GL_FUNCDECL_SYS (trunc
, double, (double x
));
2207 _GL_CXXALIAS_SYS (trunc
, double, (double x
));
2210 _GL_CXXALIASWARN (trunc
);
2212 #elif defined GNULIB_POSIXCHECK
2214 # if HAVE_RAW_DECL_TRUNC
2215 _GL_WARN_ON_USE (trunc
, "trunc is unportable - "
2216 "use gnulib module trunc for portability");
2221 # if @REPLACE_TRUNCL@
2222 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2224 # define truncl rpl_truncl
2226 _GL_FUNCDECL_RPL (truncl
, long double, (long double x
));
2227 _GL_CXXALIAS_RPL (truncl
, long double, (long double x
));
2229 # if !@HAVE_DECL_TRUNCL@
2230 _GL_FUNCDECL_SYS (truncl
, long double, (long double x
));
2232 _GL_CXXALIAS_SYS (truncl
, long double, (long double x
));
2234 _GL_CXXALIASWARN (truncl
);
2235 #elif defined GNULIB_POSIXCHECK
2237 # if HAVE_RAW_DECL_TRUNCL
2238 _GL_WARN_ON_USE (truncl
, "truncl is unportable - "
2239 "use gnulib module truncl for portability");
2244 /* Definitions of function-like macros come here, after the function
2248 #if @GNULIB_ISFINITE@
2249 # if @REPLACE_ISFINITE@
2250 _GL_EXTERN_C
int gl_isfinitef (float x
);
2251 _GL_EXTERN_C
int gl_isfinited (double x
);
2252 _GL_EXTERN_C
int gl_isfinitel (long double x
);
2254 # define isfinite(x) \
2255 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
2256 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
2260 # if defined isfinite || defined GNULIB_NAMESPACE
2261 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite
)
2263 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX))
2264 /* This platform's <cmath> possibly defines isfinite through a set of inline
2266 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
, rpl_isfinite
, bool)
2267 # define isfinite rpl_isfinite
2269 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
, isfinite
, bool)
2273 #elif defined GNULIB_POSIXCHECK
2274 # if defined isfinite
2275 _GL_WARN_REAL_FLOATING_DECL (isfinite
);
2277 # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
2283 # if @REPLACE_ISINF@
2284 _GL_EXTERN_C
int gl_isinff (float x
);
2285 _GL_EXTERN_C
int gl_isinfd (double x
);
2286 _GL_EXTERN_C
int gl_isinfl (long double x
);
2289 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
2290 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
2294 # if defined isinf || defined GNULIB_NAMESPACE
2295 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf
)
2297 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__))
2298 /* This platform's <cmath> possibly defines isinf through a set of inline
2300 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
, rpl_isinf
, bool)
2301 # define isinf rpl_isinf
2303 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
, isinf
, bool)
2307 #elif defined GNULIB_POSIXCHECK
2309 _GL_WARN_REAL_FLOATING_DECL (isinf
);
2311 # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
2317 /* Test for NaN for 'float' numbers. */
2319 /* The original <math.h> included above provides a declaration of isnan macro
2320 or (older) isnanf function. */
2322 /* GCC 4.0 and newer provides three built-ins for isnan. */
2324 # define isnanf(x) __builtin_isnanf ((float)(x))
2325 # elif defined isnan
2327 # define isnanf(x) isnan ((float)(x))
2330 /* Test whether X is a NaN. */
2332 # define isnanf rpl_isnanf
2333 _GL_EXTERN_C
int isnanf (float x
);
2338 /* Test for NaN for 'double' numbers.
2339 This function is a gnulib extension, unlike isnan() which applied only
2340 to 'double' numbers earlier but now is a type-generic macro. */
2342 /* The original <math.h> included above provides a declaration of isnan
2345 /* GCC 4.0 and newer provides three built-ins for isnan. */
2347 # define isnand(x) __builtin_isnan ((double)(x))
2350 # define isnand(x) isnan ((double)(x))
2353 /* Test whether X is a NaN. */
2355 # define isnand rpl_isnand
2356 _GL_EXTERN_C
int isnand (double x
);
2361 /* Test for NaN for 'long double' numbers. */
2363 /* The original <math.h> included above provides a declaration of isnan
2364 macro or (older) isnanl function. */
2366 /* GCC 4.0 and newer provides three built-ins for isnan. */
2368 # define isnanl(x) __builtin_isnanl ((long double)(x))
2369 # elif defined isnan
2371 # define isnanl(x) isnan ((long double)(x))
2374 /* Test whether X is a NaN. */
2376 # define isnanl rpl_isnanl
2377 _GL_EXTERN_C
int isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2381 /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
2383 # if @REPLACE_ISNAN@
2384 /* We can't just use the isnanf macro (e.g.) as exposed by
2385 isnanf.h (e.g.) here, because those may end up being macros
2386 that recursively expand back to isnan. So use the gnulib
2387 replacements for them directly. */
2388 # if @HAVE_ISNANF@ && __GNUC__ >= 4
2389 # define gl_isnan_f(x) __builtin_isnanf ((float)(x))
2391 _GL_EXTERN_C
int rpl_isnanf (float x
);
2392 # define gl_isnan_f(x) rpl_isnanf (x)
2394 # if @HAVE_ISNAND@ && __GNUC__ >= 4
2395 # define gl_isnan_d(x) __builtin_isnan ((double)(x))
2397 _GL_EXTERN_C
int rpl_isnand (double x
);
2398 # define gl_isnan_d(x) rpl_isnand (x)
2400 # if @HAVE_ISNANL@ && __GNUC__ >= 4
2401 # define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
2403 _GL_EXTERN_C
int rpl_isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2404 # define gl_isnan_l(x) rpl_isnanl (x)
2408 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
2409 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
2411 # elif __GNUC__ >= 4
2414 (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \
2415 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
2416 __builtin_isnanf ((float)(x)))
2419 # if defined isnan || defined GNULIB_NAMESPACE
2420 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan
)
2422 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__))
2423 /* This platform's <cmath> possibly defines isnan through a set of inline
2425 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
, rpl_isnan
, bool)
2426 # define isnan rpl_isnan
2428 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
, isnan
, bool)
2432 /* Ensure isnan is a macro. */
2434 # define isnan isnan
2437 #elif defined GNULIB_POSIXCHECK
2439 _GL_WARN_REAL_FLOATING_DECL (isnan
);
2441 # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
2446 #if @GNULIB_SIGNBIT@
2447 # if (@REPLACE_SIGNBIT_USING_GCC@ \
2448 && (!defined __cplusplus || __cplusplus < 201103))
2450 /* GCC 4.0 and newer provides three built-ins for signbit. */
2451 # define signbit(x) \
2452 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
2453 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
2454 __builtin_signbitf (x))
2456 # if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit
2458 _GL_EXTERN_C
int gl_signbitf (float arg
);
2459 _GL_EXTERN_C
int gl_signbitd (double arg
);
2460 _GL_EXTERN_C
int gl_signbitl (long double arg
);
2461 # if __GNUC__ >= 2 && !defined __STRICT_ANSI__
2462 # define _GL_NUM_UINT_WORDS(type) \
2463 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
2464 # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
2465 # define gl_signbitf_OPTIMIZED_MACRO
2466 # define gl_signbitf(arg) \
2467 ({ union { float _value; \
2468 unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
2470 _m._value = (arg); \
2471 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
2474 # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
2475 # define gl_signbitd_OPTIMIZED_MACRO
2476 # define gl_signbitd(arg) \
2477 ({ union { double _value; \
2478 unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
2480 _m._value = (arg); \
2481 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
2484 # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
2485 # define gl_signbitl_OPTIMIZED_MACRO
2486 # define gl_signbitl(arg) \
2487 ({ union { long double _value; \
2488 unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
2490 _m._value = (arg); \
2491 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
2495 # define signbit(x) \
2496 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
2497 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
2499 # define GNULIB_defined_signbit 1
2502 # if defined signbit || defined GNULIB_NAMESPACE
2503 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit
)
2505 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX))
2506 /* This platform's <cmath> possibly defines signbit through a set of inline
2508 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
, rpl_signbit
, bool)
2509 # define signbit rpl_signbit
2511 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
, signbit
, bool)
2515 #elif defined GNULIB_POSIXCHECK
2516 # if defined signbit
2517 _GL_WARN_REAL_FLOATING_DECL (signbit
);
2519 # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
2523 _GL_INLINE_HEADER_END
2525 #endif /* _@GUARD_PREFIX@_MATH_H */
2526 #endif /* _@GUARD_PREFIX@_MATH_H */
This page took 0.083294 seconds and 5 git commands to generate.