1 /* A GNU-like <math.h>.
3 Copyright (C) 2002-2003, 2007-2020 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 /* For clang: Use __has_builtin to determine whether a builtin is available. */
131 #ifndef __has_builtin
132 # define __has_builtin(name) 0
136 /* POSIX allows platforms that don't support NAN. But all major
137 machines in the past 15 years have supported something close to
138 IEEE NaN, so we define this unconditionally. We also must define
139 it on platforms like Solaris 10, where NAN is present but defined
140 as a function pointer rather than a floating point constant. */
141 #if !defined NAN || @REPLACE_NAN@
142 # if !GNULIB_defined_NAN
144 /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
145 choke on the expression 0.0 / 0.0. */
146 # if defined __DECC || defined _MSC_VER
147 _GL_MATH_INLINE
float
150 static float zero
= 0.0f
;
153 # define NAN (_NaN())
155 # define NAN (0.0f / 0.0f)
157 # define GNULIB_defined_NAN 1
161 /* Solaris 10 defines HUGE_VAL, but as a function pointer rather
162 than a floating point constant. */
163 #if @REPLACE_HUGE_VAL@
165 # define HUGE_VALF (1.0f / 0.0f)
167 # define HUGE_VAL (1.0 / 0.0)
169 # define HUGE_VALL (1.0L / 0.0L)
172 /* HUGE_VALF is a 'float' Infinity. */
174 # if defined _MSC_VER
175 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
176 # define HUGE_VALF (1e25f * 1e25f)
178 # define HUGE_VALF (1.0f / 0.0f)
182 /* HUGE_VAL is a 'double' Infinity. */
184 # if defined _MSC_VER
185 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
186 # define HUGE_VAL (1e250 * 1e250)
188 # define HUGE_VAL (1.0 / 0.0)
192 /* HUGE_VALL is a 'long double' Infinity. */
194 # if defined _MSC_VER
195 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
196 # define HUGE_VALL (1e250L * 1e250L)
198 # define HUGE_VALL (1.0L / 0.0L)
203 #if defined FP_ILOGB0 && defined FP_ILOGBNAN
204 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */
205 # if defined __HAIKU__
206 /* Haiku: match what ilogb() does */
209 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
210 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
213 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
214 # if defined __NetBSD__ || defined __sgi
215 /* NetBSD, IRIX 6.5: match what ilogb() does */
216 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
217 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
219 /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
220 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
221 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
223 /* Solaris 9: match what ilogb() does */
224 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
225 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
227 /* Gnulib defined values. */
228 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
229 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
236 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
238 # define acosf rpl_acosf
240 _GL_FUNCDECL_RPL (acosf
, float, (float x
));
241 _GL_CXXALIAS_RPL (acosf
, float, (float x
));
245 _GL_FUNCDECL_SYS (acosf
, float, (float x
));
247 _GL_CXXALIAS_SYS (acosf
, float, (float x
));
249 _GL_CXXALIASWARN (acosf
);
250 #elif defined GNULIB_POSIXCHECK
252 # if HAVE_RAW_DECL_ACOSF
253 _GL_WARN_ON_USE (acosf
, "acosf is unportable - "
254 "use gnulib module acosf for portability");
259 # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
261 _GL_FUNCDECL_SYS (acosl
, long double, (long double x
));
263 _GL_CXXALIAS_SYS (acosl
, long double, (long double x
));
264 _GL_CXXALIASWARN (acosl
);
265 #elif defined GNULIB_POSIXCHECK
267 # if HAVE_RAW_DECL_ACOSL
268 _GL_WARN_ON_USE (acosl
, "acosl is unportable - "
269 "use gnulib module acosl for portability");
276 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
278 # define asinf rpl_asinf
280 _GL_FUNCDECL_RPL (asinf
, float, (float x
));
281 _GL_CXXALIAS_RPL (asinf
, float, (float x
));
285 _GL_FUNCDECL_SYS (asinf
, float, (float x
));
287 _GL_CXXALIAS_SYS (asinf
, float, (float x
));
289 _GL_CXXALIASWARN (asinf
);
290 #elif defined GNULIB_POSIXCHECK
292 # if HAVE_RAW_DECL_ASINF
293 _GL_WARN_ON_USE (asinf
, "asinf is unportable - "
294 "use gnulib module asinf for portability");
299 # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
301 _GL_FUNCDECL_SYS (asinl
, long double, (long double x
));
303 _GL_CXXALIAS_SYS (asinl
, long double, (long double x
));
304 _GL_CXXALIASWARN (asinl
);
305 #elif defined GNULIB_POSIXCHECK
307 # if HAVE_RAW_DECL_ASINL
308 _GL_WARN_ON_USE (asinl
, "asinl is unportable - "
309 "use gnulib module asinl for portability");
316 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
318 # define atanf rpl_atanf
320 _GL_FUNCDECL_RPL (atanf
, float, (float x
));
321 _GL_CXXALIAS_RPL (atanf
, float, (float x
));
325 _GL_FUNCDECL_SYS (atanf
, float, (float x
));
327 _GL_CXXALIAS_SYS (atanf
, float, (float x
));
329 _GL_CXXALIASWARN (atanf
);
330 #elif defined GNULIB_POSIXCHECK
332 # if HAVE_RAW_DECL_ATANF
333 _GL_WARN_ON_USE (atanf
, "atanf is unportable - "
334 "use gnulib module atanf for portability");
339 # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
341 _GL_FUNCDECL_SYS (atanl
, long double, (long double x
));
343 _GL_CXXALIAS_SYS (atanl
, long double, (long double x
));
344 _GL_CXXALIASWARN (atanl
);
345 #elif defined GNULIB_POSIXCHECK
347 # if HAVE_RAW_DECL_ATANL
348 _GL_WARN_ON_USE (atanl
, "atanl is unportable - "
349 "use gnulib module atanl for portability");
355 # if @REPLACE_ATAN2F@
356 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
358 # define atan2f rpl_atan2f
360 _GL_FUNCDECL_RPL (atan2f
, float, (float y
, float x
));
361 _GL_CXXALIAS_RPL (atan2f
, float, (float y
, float x
));
365 _GL_FUNCDECL_SYS (atan2f
, float, (float y
, float x
));
367 _GL_CXXALIAS_SYS (atan2f
, float, (float y
, float x
));
369 _GL_CXXALIASWARN (atan2f
);
370 #elif defined GNULIB_POSIXCHECK
372 # if HAVE_RAW_DECL_ATAN2F
373 _GL_WARN_ON_USE (atan2f
, "atan2f is unportable - "
374 "use gnulib module atan2f for portability");
381 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
383 # define cbrtf rpl_cbrtf
385 _GL_FUNCDECL_RPL (cbrtf
, float, (float x
));
386 _GL_CXXALIAS_RPL (cbrtf
, float, (float x
));
388 # if !@HAVE_DECL_CBRTF@
389 _GL_FUNCDECL_SYS (cbrtf
, float, (float x
));
391 _GL_CXXALIAS_SYS (cbrtf
, float, (float x
));
393 _GL_CXXALIASWARN (cbrtf
);
394 #elif defined GNULIB_POSIXCHECK
396 # if HAVE_RAW_DECL_CBRTF
397 _GL_WARN_ON_USE (cbrtf
, "cbrtf is unportable - "
398 "use gnulib module cbrtf for portability");
404 _GL_FUNCDECL_SYS (cbrt
, double, (double x
));
406 _GL_CXXALIAS_SYS (cbrt
, double, (double x
));
408 _GL_CXXALIASWARN (cbrt
);
410 #elif defined GNULIB_POSIXCHECK
412 # if HAVE_RAW_DECL_CBRT
413 _GL_WARN_ON_USE (cbrt
, "cbrt is unportable - "
414 "use gnulib module cbrt for portability");
420 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
422 # define cbrtl rpl_cbrtl
424 _GL_FUNCDECL_RPL (cbrtl
, long double, (long double x
));
425 _GL_CXXALIAS_RPL (cbrtl
, long double, (long double x
));
427 # if !@HAVE_DECL_CBRTL@
428 _GL_FUNCDECL_SYS (cbrtl
, long double, (long double x
));
430 _GL_CXXALIAS_SYS (cbrtl
, long double, (long double x
));
432 _GL_CXXALIASWARN (cbrtl
);
433 #elif defined GNULIB_POSIXCHECK
435 # if HAVE_RAW_DECL_CBRTL
436 _GL_WARN_ON_USE (cbrtl
, "cbrtl is unportable - "
437 "use gnulib module cbrtl for portability");
444 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
446 # define ceilf rpl_ceilf
448 _GL_FUNCDECL_RPL (ceilf
, float, (float x
));
449 _GL_CXXALIAS_RPL (ceilf
, float, (float x
));
451 # if !@HAVE_DECL_CEILF@
453 _GL_FUNCDECL_SYS (ceilf
, float, (float x
));
455 _GL_CXXALIAS_SYS (ceilf
, float, (float x
));
457 _GL_CXXALIASWARN (ceilf
);
458 #elif defined GNULIB_POSIXCHECK
460 # if HAVE_RAW_DECL_CEILF
461 _GL_WARN_ON_USE (ceilf
, "ceilf is unportable - "
462 "use gnulib module ceilf for portability");
468 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
470 # define ceil rpl_ceil
472 _GL_FUNCDECL_RPL (ceil
, double, (double x
));
473 _GL_CXXALIAS_RPL (ceil
, double, (double x
));
475 _GL_CXXALIAS_SYS (ceil
, double, (double x
));
478 _GL_CXXALIASWARN (ceil
);
484 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
486 # define ceill rpl_ceill
488 _GL_FUNCDECL_RPL (ceill
, long double, (long double x
));
489 _GL_CXXALIAS_RPL (ceill
, long double, (long double x
));
491 # if !@HAVE_DECL_CEILL@
493 _GL_FUNCDECL_SYS (ceill
, long double, (long double x
));
495 _GL_CXXALIAS_SYS (ceill
, long double, (long double x
));
497 _GL_CXXALIASWARN (ceill
);
498 #elif defined GNULIB_POSIXCHECK
500 # if HAVE_RAW_DECL_CEILL
501 _GL_WARN_ON_USE (ceill
, "ceill is unportable - "
502 "use gnulib module ceill for portability");
507 #if @GNULIB_COPYSIGNF@
508 # if !@HAVE_DECL_COPYSIGNF@
510 _GL_FUNCDECL_SYS (copysignf
, float, (float x
, float y
));
512 _GL_CXXALIAS_SYS (copysignf
, float, (float x
, float y
));
513 _GL_CXXALIASWARN (copysignf
);
514 #elif defined GNULIB_POSIXCHECK
516 # if HAVE_RAW_DECL_COPYSIGNF
517 _GL_WARN_ON_USE (copysignf
, "copysignf is unportable - "
518 "use gnulib module copysignf for portability");
522 #if @GNULIB_COPYSIGN@
523 # if !@HAVE_COPYSIGN@
524 _GL_FUNCDECL_SYS (copysign
, double, (double x
, double y
));
526 _GL_CXXALIAS_SYS (copysign
, double, (double x
, double y
));
528 _GL_CXXALIASWARN (copysign
);
530 #elif defined GNULIB_POSIXCHECK
532 # if HAVE_RAW_DECL_COPYSIGN
533 _GL_WARN_ON_USE (copysign
, "copysign is unportable - "
534 "use gnulib module copysign for portability");
538 #if @GNULIB_COPYSIGNL@
539 # if !@HAVE_COPYSIGNL@
540 _GL_FUNCDECL_SYS (copysignl
, long double, (long double x
, long double y
));
542 _GL_CXXALIAS_SYS (copysignl
, long double, (long double x
, long double y
));
543 _GL_CXXALIASWARN (copysignl
);
544 #elif defined GNULIB_POSIXCHECK
546 # if HAVE_RAW_DECL_COPYSIGNL
547 _GL_WARN_ON_USE (copysign
, "copysignl is unportable - "
548 "use gnulib module copysignl for portability");
555 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
557 # define cosf rpl_cosf
559 _GL_FUNCDECL_RPL (cosf
, float, (float x
));
560 _GL_CXXALIAS_RPL (cosf
, float, (float x
));
564 _GL_FUNCDECL_SYS (cosf
, float, (float x
));
566 _GL_CXXALIAS_SYS (cosf
, float, (float x
));
568 _GL_CXXALIASWARN (cosf
);
569 #elif defined GNULIB_POSIXCHECK
571 # if HAVE_RAW_DECL_COSF
572 _GL_WARN_ON_USE (cosf
, "cosf is unportable - "
573 "use gnulib module cosf for portability");
578 # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
580 _GL_FUNCDECL_SYS (cosl
, long double, (long double x
));
582 _GL_CXXALIAS_SYS (cosl
, long double, (long double x
));
583 _GL_CXXALIASWARN (cosl
);
584 #elif defined GNULIB_POSIXCHECK
586 # if HAVE_RAW_DECL_COSL
587 _GL_WARN_ON_USE (cosl
, "cosl is unportable - "
588 "use gnulib module cosl for portability");
595 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
597 # define coshf rpl_coshf
599 _GL_FUNCDECL_RPL (coshf
, float, (float x
));
600 _GL_CXXALIAS_RPL (coshf
, float, (float x
));
604 _GL_FUNCDECL_SYS (coshf
, float, (float x
));
606 _GL_CXXALIAS_SYS (coshf
, float, (float x
));
608 _GL_CXXALIASWARN (coshf
);
609 #elif defined GNULIB_POSIXCHECK
611 # if HAVE_RAW_DECL_COSHF
612 _GL_WARN_ON_USE (coshf
, "coshf is unportable - "
613 "use gnulib module coshf for portability");
620 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
622 # define expf rpl_expf
624 _GL_FUNCDECL_RPL (expf
, float, (float x
));
625 _GL_CXXALIAS_RPL (expf
, float, (float x
));
629 _GL_FUNCDECL_SYS (expf
, float, (float x
));
631 _GL_CXXALIAS_SYS (expf
, float, (float x
));
633 _GL_CXXALIASWARN (expf
);
634 #elif defined GNULIB_POSIXCHECK
636 # if HAVE_RAW_DECL_EXPF
637 _GL_WARN_ON_USE (expf
, "expf is unportable - "
638 "use gnulib module expf for portability");
644 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
646 # define expl rpl_expl
648 _GL_FUNCDECL_RPL (expl
, long double, (long double x
));
649 _GL_CXXALIAS_RPL (expl
, long double, (long double x
));
651 # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
653 _GL_FUNCDECL_SYS (expl
, long double, (long double x
));
655 _GL_CXXALIAS_SYS (expl
, long double, (long double x
));
657 _GL_CXXALIASWARN (expl
);
658 #elif defined GNULIB_POSIXCHECK
660 # if HAVE_RAW_DECL_EXPL
661 _GL_WARN_ON_USE (expl
, "expl is unportable - "
662 "use gnulib module expl for portability");
668 # if !@HAVE_DECL_EXP2F@
669 _GL_FUNCDECL_SYS (exp2f
, float, (float x
));
671 _GL_CXXALIAS_SYS (exp2f
, float, (float x
));
672 _GL_CXXALIASWARN (exp2f
);
673 #elif defined GNULIB_POSIXCHECK
675 # if HAVE_RAW_DECL_EXP2F
676 _GL_WARN_ON_USE (exp2f
, "exp2f is unportable - "
677 "use gnulib module exp2f for portability");
683 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
685 # define exp2 rpl_exp2
687 _GL_FUNCDECL_RPL (exp2
, double, (double x
));
688 _GL_CXXALIAS_RPL (exp2
, double, (double x
));
690 # if !@HAVE_DECL_EXP2@
691 _GL_FUNCDECL_SYS (exp2
, double, (double x
));
693 _GL_CXXALIAS_SYS (exp2
, double, (double x
));
696 _GL_CXXALIASWARN (exp2
);
698 #elif defined GNULIB_POSIXCHECK
700 # if HAVE_RAW_DECL_EXP2
701 _GL_WARN_ON_USE (exp2
, "exp2 is unportable - "
702 "use gnulib module exp2 for portability");
708 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
710 # define exp2l rpl_exp2l
712 _GL_FUNCDECL_RPL (exp2l
, long double, (long double x
));
713 _GL_CXXALIAS_RPL (exp2l
, long double, (long double x
));
715 # if !@HAVE_DECL_EXP2L@
717 _GL_FUNCDECL_SYS (exp2l
, long double, (long double x
));
719 _GL_CXXALIAS_SYS (exp2l
, long double, (long double x
));
721 _GL_CXXALIASWARN (exp2l
);
722 #elif defined GNULIB_POSIXCHECK
724 # if HAVE_RAW_DECL_EXP2L
725 _GL_WARN_ON_USE (exp2l
, "exp2l is unportable - "
726 "use gnulib module exp2l for portability");
732 # if @REPLACE_EXPM1F@
733 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
735 # define expm1f rpl_expm1f
737 _GL_FUNCDECL_RPL (expm1f
, float, (float x
));
738 _GL_CXXALIAS_RPL (expm1f
, float, (float x
));
741 _GL_FUNCDECL_SYS (expm1f
, float, (float x
));
743 _GL_CXXALIAS_SYS (expm1f
, float, (float x
));
745 _GL_CXXALIASWARN (expm1f
);
746 #elif defined GNULIB_POSIXCHECK
748 # if HAVE_RAW_DECL_EXPM1F
749 _GL_WARN_ON_USE (expm1f
, "expm1f is unportable - "
750 "use gnulib module expm1f for portability");
756 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
758 # define expm1 rpl_expm1
760 _GL_FUNCDECL_RPL (expm1
, double, (double x
));
761 _GL_CXXALIAS_RPL (expm1
, double, (double x
));
764 _GL_FUNCDECL_SYS (expm1
, double, (double x
));
766 _GL_CXXALIAS_SYS (expm1
, double, (double x
));
769 _GL_CXXALIASWARN (expm1
);
771 #elif defined GNULIB_POSIXCHECK
773 # if HAVE_RAW_DECL_EXPM1
774 _GL_WARN_ON_USE (expm1
, "expm1 is unportable - "
775 "use gnulib module expm1 for portability");
780 # if @REPLACE_EXPM1L@
781 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
783 # define expm1l rpl_expm1l
785 _GL_FUNCDECL_RPL (expm1l
, long double, (long double x
));
786 _GL_CXXALIAS_RPL (expm1l
, long double, (long double x
));
788 # if !@HAVE_DECL_EXPM1L@
790 # if !(defined __cplusplus && defined _AIX)
791 _GL_FUNCDECL_SYS (expm1l
, long double, (long double x
));
794 _GL_CXXALIAS_SYS (expm1l
, long double, (long double x
));
796 _GL_CXXALIASWARN (expm1l
);
797 #elif defined GNULIB_POSIXCHECK
799 # if HAVE_RAW_DECL_EXPM1L
800 _GL_WARN_ON_USE (expm1l
, "expm1l is unportable - "
801 "use gnulib module expm1l for portability");
809 _GL_FUNCDECL_SYS (fabsf
, float, (float x
));
811 _GL_CXXALIAS_SYS (fabsf
, float, (float x
));
812 _GL_CXXALIASWARN (fabsf
);
813 #elif defined GNULIB_POSIXCHECK
815 # if HAVE_RAW_DECL_FABSF
816 _GL_WARN_ON_USE (fabsf
, "fabsf is unportable - "
817 "use gnulib module fabsf for portability");
823 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
825 # define fabsl rpl_fabsl
827 _GL_FUNCDECL_RPL (fabsl
, long double, (long double x
));
828 _GL_CXXALIAS_RPL (fabsl
, long double, (long double x
));
832 _GL_FUNCDECL_SYS (fabsl
, long double, (long double x
));
834 _GL_CXXALIAS_SYS (fabsl
, long double, (long double x
));
836 _GL_CXXALIASWARN (fabsl
);
837 #elif defined GNULIB_POSIXCHECK
839 # if HAVE_RAW_DECL_FABSL
840 _GL_WARN_ON_USE (fabsl
, "fabsl is unportable - "
841 "use gnulib module fabsl for portability");
847 # if @REPLACE_FLOORF@
848 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
850 # define floorf rpl_floorf
852 _GL_FUNCDECL_RPL (floorf
, float, (float x
));
853 _GL_CXXALIAS_RPL (floorf
, float, (float x
));
855 # if !@HAVE_DECL_FLOORF@
857 _GL_FUNCDECL_SYS (floorf
, float, (float x
));
859 _GL_CXXALIAS_SYS (floorf
, float, (float x
));
861 _GL_CXXALIASWARN (floorf
);
862 #elif defined GNULIB_POSIXCHECK
864 # if HAVE_RAW_DECL_FLOORF
865 _GL_WARN_ON_USE (floorf
, "floorf is unportable - "
866 "use gnulib module floorf for portability");
872 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
874 # define floor rpl_floor
876 _GL_FUNCDECL_RPL (floor
, double, (double x
));
877 _GL_CXXALIAS_RPL (floor
, double, (double x
));
879 _GL_CXXALIAS_SYS (floor
, double, (double x
));
882 _GL_CXXALIASWARN (floor
);
887 # if @REPLACE_FLOORL@
888 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
890 # define floorl rpl_floorl
892 _GL_FUNCDECL_RPL (floorl
, long double, (long double x
));
893 _GL_CXXALIAS_RPL (floorl
, long double, (long double x
));
895 # if !@HAVE_DECL_FLOORL@
897 _GL_FUNCDECL_SYS (floorl
, long double, (long double x
));
899 _GL_CXXALIAS_SYS (floorl
, long double, (long double x
));
901 _GL_CXXALIASWARN (floorl
);
902 #elif defined GNULIB_POSIXCHECK
904 # if HAVE_RAW_DECL_FLOORL
905 _GL_WARN_ON_USE (floorl
, "floorl is unportable - "
906 "use gnulib module floorl for portability");
913 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
915 # define fmaf rpl_fmaf
917 _GL_FUNCDECL_RPL (fmaf
, float, (float x
, float y
, float z
));
918 _GL_CXXALIAS_RPL (fmaf
, float, (float x
, float y
, float z
));
922 _GL_FUNCDECL_SYS (fmaf
, float, (float x
, float y
, float z
));
924 _GL_CXXALIAS_SYS (fmaf
, float, (float x
, float y
, float z
));
926 _GL_CXXALIASWARN (fmaf
);
927 #elif defined GNULIB_POSIXCHECK
929 # if HAVE_RAW_DECL_FMAF
930 _GL_WARN_ON_USE (fmaf
, "fmaf is unportable - "
931 "use gnulib module fmaf for portability");
937 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
941 _GL_FUNCDECL_RPL (fma
, double, (double x
, double y
, double z
));
942 _GL_CXXALIAS_RPL (fma
, double, (double x
, double y
, double z
));
946 _GL_FUNCDECL_SYS (fma
, double, (double x
, double y
, double z
));
948 _GL_CXXALIAS_SYS (fma
, double, (double x
, double y
, double z
));
951 _GL_CXXALIASWARN (fma
);
953 #elif defined GNULIB_POSIXCHECK
955 # if HAVE_RAW_DECL_FMA
956 _GL_WARN_ON_USE (fma
, "fma is unportable - "
957 "use gnulib module fma for portability");
963 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
965 # define fmal rpl_fmal
967 _GL_FUNCDECL_RPL (fmal
, long double,
968 (long double x
, long double y
, long double z
));
969 _GL_CXXALIAS_RPL (fmal
, long double,
970 (long double x
, long double y
, long double z
));
974 # if !(defined __cplusplus && defined _AIX)
975 _GL_FUNCDECL_SYS (fmal
, long double,
976 (long double x
, long double y
, long double z
));
979 _GL_CXXALIAS_SYS (fmal
, long double,
980 (long double x
, long double y
, long double z
));
982 _GL_CXXALIASWARN (fmal
);
983 #elif defined GNULIB_POSIXCHECK
985 # if HAVE_RAW_DECL_FMAL
986 _GL_WARN_ON_USE (fmal
, "fmal is unportable - "
987 "use gnulib module fmal for portability");
994 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
996 # define fmodf rpl_fmodf
998 _GL_FUNCDECL_RPL (fmodf
, float, (float x
, float y
));
999 _GL_CXXALIAS_RPL (fmodf
, float, (float x
, float y
));
1003 _GL_FUNCDECL_SYS (fmodf
, float, (float x
, float y
));
1005 _GL_CXXALIAS_SYS (fmodf
, float, (float x
, float y
));
1007 _GL_CXXALIASWARN (fmodf
);
1008 #elif defined GNULIB_POSIXCHECK
1010 # if HAVE_RAW_DECL_FMODF
1011 _GL_WARN_ON_USE (fmodf
, "fmodf is unportable - "
1012 "use gnulib module fmodf for portability");
1018 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1020 # define fmod rpl_fmod
1022 _GL_FUNCDECL_RPL (fmod
, double, (double x
, double y
));
1023 _GL_CXXALIAS_RPL (fmod
, double, (double x
, double y
));
1025 _GL_CXXALIAS_SYS (fmod
, double, (double x
, double y
));
1028 _GL_CXXALIASWARN (fmod
);
1030 #elif defined GNULIB_POSIXCHECK
1032 # if HAVE_RAW_DECL_FMOD
1033 _GL_WARN_ON_USE (fmod
, "fmod has portability problems - "
1034 "use gnulib module fmod for portability");
1039 # if @REPLACE_FMODL@
1040 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1042 # define fmodl rpl_fmodl
1044 _GL_FUNCDECL_RPL (fmodl
, long double, (long double x
, long double y
));
1045 _GL_CXXALIAS_RPL (fmodl
, long double, (long double x
, long double y
));
1049 _GL_FUNCDECL_SYS (fmodl
, long double, (long double x
, long double y
));
1051 _GL_CXXALIAS_SYS (fmodl
, long double, (long double x
, long double y
));
1053 _GL_CXXALIASWARN (fmodl
);
1054 #elif defined GNULIB_POSIXCHECK
1056 # if HAVE_RAW_DECL_FMODL
1057 _GL_WARN_ON_USE (fmodl
, "fmodl is unportable - "
1058 "use gnulib module fmodl for portability");
1064 x = mantissa * 2^exp
1066 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1067 If x is zero: mantissa = x, exp = 0.
1068 If x is infinite or NaN: mantissa = x, exp unspecified.
1069 Store exp in *EXPPTR and return mantissa. */
1071 # if @REPLACE_FREXPF@
1072 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1074 # define frexpf rpl_frexpf
1076 _GL_FUNCDECL_RPL (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1077 _GL_CXXALIAS_RPL (frexpf
, float, (float x
, int *expptr
));
1081 _GL_FUNCDECL_SYS (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1083 _GL_CXXALIAS_SYS (frexpf
, float, (float x
, int *expptr
));
1085 _GL_CXXALIASWARN (frexpf
);
1086 #elif defined GNULIB_POSIXCHECK
1088 # if HAVE_RAW_DECL_FREXPF
1089 _GL_WARN_ON_USE (frexpf
, "frexpf is unportable - "
1090 "use gnulib module frexpf for portability");
1095 x = mantissa * 2^exp
1097 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1098 If x is zero: mantissa = x, exp = 0.
1099 If x is infinite or NaN: mantissa = x, exp unspecified.
1100 Store exp in *EXPPTR and return mantissa. */
1102 # if @REPLACE_FREXP@
1103 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1105 # define frexp rpl_frexp
1107 _GL_FUNCDECL_RPL (frexp
, double, (double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1108 _GL_CXXALIAS_RPL (frexp
, double, (double x
, int *expptr
));
1110 _GL_CXXALIAS_SYS (frexp
, double, (double x
, int *expptr
));
1113 _GL_CXXALIASWARN1 (frexp
, double, (double x
, int *expptr
));
1115 #elif defined GNULIB_POSIXCHECK
1117 /* Assume frexp is always declared. */
1118 _GL_WARN_ON_USE (frexp
, "frexp is unportable - "
1119 "use gnulib module frexp for portability");
1123 x = mantissa * 2^exp
1125 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1126 If x is zero: mantissa = x, exp = 0.
1127 If x is infinite or NaN: mantissa = x, exp unspecified.
1128 Store exp in *EXPPTR and return mantissa. */
1129 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
1130 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1132 # define frexpl rpl_frexpl
1134 _GL_FUNCDECL_RPL (frexpl
, long double,
1135 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1136 _GL_CXXALIAS_RPL (frexpl
, long double, (long double x
, int *expptr
));
1138 # if !@HAVE_DECL_FREXPL@
1139 _GL_FUNCDECL_SYS (frexpl
, long double,
1140 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1142 # if @GNULIB_FREXPL@
1143 _GL_CXXALIAS_SYS (frexpl
, long double, (long double x
, int *expptr
));
1146 #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
1147 _GL_CXXALIASWARN (frexpl
);
1149 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
1151 # if HAVE_RAW_DECL_FREXPL
1152 _GL_WARN_ON_USE (frexpl
, "frexpl is unportable - "
1153 "use gnulib module frexpl for portability");
1158 /* Return sqrt(x^2+y^2). */
1160 # if @REPLACE_HYPOTF@
1161 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1163 # define hypotf rpl_hypotf
1165 _GL_FUNCDECL_RPL (hypotf
, float, (float x
, float y
));
1166 _GL_CXXALIAS_RPL (hypotf
, float, (float x
, float y
));
1169 _GL_FUNCDECL_SYS (hypotf
, float, (float x
, float y
));
1171 _GL_CXXALIAS_SYS (hypotf
, float, (float x
, float y
));
1173 _GL_CXXALIASWARN (hypotf
);
1174 #elif defined GNULIB_POSIXCHECK
1176 # if HAVE_RAW_DECL_HYPOTF
1177 _GL_WARN_ON_USE (hypotf
, "hypotf is unportable - "
1178 "use gnulib module hypotf for portability");
1182 /* Return sqrt(x^2+y^2). */
1184 # if @REPLACE_HYPOT@
1185 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1187 # define hypot rpl_hypot
1189 _GL_FUNCDECL_RPL (hypot
, double, (double x
, double y
));
1190 _GL_CXXALIAS_RPL (hypot
, double, (double x
, double y
));
1192 _GL_CXXALIAS_SYS (hypot
, double, (double x
, double y
));
1195 _GL_CXXALIASWARN (hypot
);
1197 #elif defined GNULIB_POSIXCHECK
1199 # if HAVE_RAW_DECL_HYPOT
1200 _GL_WARN_ON_USE (hypotf
, "hypot has portability problems - "
1201 "use gnulib module hypot for portability");
1205 /* Return sqrt(x^2+y^2). */
1207 # if @REPLACE_HYPOTL@
1208 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1210 # define hypotl rpl_hypotl
1212 _GL_FUNCDECL_RPL (hypotl
, long double, (long double x
, long double y
));
1213 _GL_CXXALIAS_RPL (hypotl
, long double, (long double x
, long double y
));
1216 _GL_FUNCDECL_SYS (hypotl
, long double, (long double x
, long double y
));
1218 _GL_CXXALIAS_SYS (hypotl
, long double, (long double x
, long double y
));
1220 _GL_CXXALIASWARN (hypotl
);
1221 #elif defined GNULIB_POSIXCHECK
1223 # if HAVE_RAW_DECL_HYPOTL
1224 _GL_WARN_ON_USE (hypotl
, "hypotl is unportable - "
1225 "use gnulib module hypotl for portability");
1231 # if @REPLACE_ILOGBF@
1232 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1234 # define ilogbf rpl_ilogbf
1236 _GL_FUNCDECL_RPL (ilogbf
, int, (float x
));
1237 _GL_CXXALIAS_RPL (ilogbf
, int, (float x
));
1240 _GL_FUNCDECL_SYS (ilogbf
, int, (float x
));
1242 _GL_CXXALIAS_SYS (ilogbf
, int, (float x
));
1244 _GL_CXXALIASWARN (ilogbf
);
1245 #elif defined GNULIB_POSIXCHECK
1247 # if HAVE_RAW_DECL_ILOGBF
1248 _GL_WARN_ON_USE (ilogbf
, "ilogbf is unportable - "
1249 "use gnulib module ilogbf for portability");
1254 # if @REPLACE_ILOGB@
1255 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1257 # define ilogb rpl_ilogb
1259 _GL_FUNCDECL_RPL (ilogb
, int, (double x
));
1260 _GL_CXXALIAS_RPL (ilogb
, int, (double x
));
1263 _GL_FUNCDECL_SYS (ilogb
, int, (double x
));
1265 _GL_CXXALIAS_SYS (ilogb
, int, (double x
));
1268 _GL_CXXALIASWARN (ilogb
);
1270 #elif defined GNULIB_POSIXCHECK
1272 # if HAVE_RAW_DECL_ILOGB
1273 _GL_WARN_ON_USE (ilogb
, "ilogb is unportable - "
1274 "use gnulib module ilogb for portability");
1279 # if @REPLACE_ILOGBL@
1280 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1282 # define ilogbl rpl_ilogbl
1284 _GL_FUNCDECL_RPL (ilogbl
, int, (long double x
));
1285 _GL_CXXALIAS_RPL (ilogbl
, int, (long double x
));
1288 _GL_FUNCDECL_SYS (ilogbl
, int, (long double x
));
1290 _GL_CXXALIAS_SYS (ilogbl
, int, (long double x
));
1292 _GL_CXXALIASWARN (ilogbl
);
1293 #elif defined GNULIB_POSIXCHECK
1295 # if HAVE_RAW_DECL_ILOGBL
1296 _GL_WARN_ON_USE (ilogbl
, "ilogbl is unportable - "
1297 "use gnulib module ilogbl for portability");
1302 /* Return x * 2^exp. */
1306 _GL_FUNCDECL_SYS (ldexpf
, float, (float x
, int exp
));
1308 _GL_CXXALIAS_SYS (ldexpf
, float, (float x
, int exp
));
1309 _GL_CXXALIASWARN (ldexpf
);
1310 #elif defined GNULIB_POSIXCHECK
1312 # if HAVE_RAW_DECL_LDEXPF
1313 _GL_WARN_ON_USE (ldexpf
, "ldexpf is unportable - "
1314 "use gnulib module ldexpf for portability");
1318 /* Return x * 2^exp. */
1319 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
1320 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1322 # define ldexpl rpl_ldexpl
1324 _GL_FUNCDECL_RPL (ldexpl
, long double, (long double x
, int exp
));
1325 _GL_CXXALIAS_RPL (ldexpl
, long double, (long double x
, int exp
));
1327 # if !@HAVE_DECL_LDEXPL@
1328 _GL_FUNCDECL_SYS (ldexpl
, long double, (long double x
, int exp
));
1330 # if @GNULIB_LDEXPL@
1331 _GL_CXXALIAS_SYS (ldexpl
, long double, (long double x
, int exp
));
1335 _GL_CXXALIASWARN (ldexpl
);
1337 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
1339 # if HAVE_RAW_DECL_LDEXPL
1340 _GL_WARN_ON_USE (ldexpl
, "ldexpl is unportable - "
1341 "use gnulib module ldexpl for portability");
1348 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1350 # define logf rpl_logf
1352 _GL_FUNCDECL_RPL (logf
, float, (float x
));
1353 _GL_CXXALIAS_RPL (logf
, float, (float x
));
1357 _GL_FUNCDECL_SYS (logf
, float, (float x
));
1359 _GL_CXXALIAS_SYS (logf
, float, (float x
));
1361 _GL_CXXALIASWARN (logf
);
1362 #elif defined GNULIB_POSIXCHECK
1364 # if HAVE_RAW_DECL_LOGF
1365 _GL_WARN_ON_USE (logf
, "logf is unportable - "
1366 "use gnulib module logf for portability");
1372 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1374 # define log rpl_log
1376 _GL_FUNCDECL_RPL (log
, double, (double x
));
1377 _GL_CXXALIAS_RPL (log
, double, (double x
));
1379 _GL_CXXALIAS_SYS (log
, double, (double x
));
1382 _GL_CXXALIASWARN (log
);
1384 #elif defined GNULIB_POSIXCHECK
1386 # if HAVE_RAW_DECL_LOG
1387 _GL_WARN_ON_USE (log
, "log has portability problems - "
1388 "use gnulib module log for portability");
1394 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1396 # define logl rpl_logl
1398 _GL_FUNCDECL_RPL (logl
, long double, (long double x
));
1399 _GL_CXXALIAS_RPL (logl
, long double, (long double x
));
1401 # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
1403 _GL_FUNCDECL_SYS (logl
, long double, (long double x
));
1405 _GL_CXXALIAS_SYS (logl
, long double, (long double x
));
1407 _GL_CXXALIASWARN (logl
);
1408 #elif defined GNULIB_POSIXCHECK
1410 # if HAVE_RAW_DECL_LOGL
1411 _GL_WARN_ON_USE (logl
, "logl is unportable - "
1412 "use gnulib module logl for portability");
1418 # if @REPLACE_LOG10F@
1419 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1421 # define log10f rpl_log10f
1423 _GL_FUNCDECL_RPL (log10f
, float, (float x
));
1424 _GL_CXXALIAS_RPL (log10f
, float, (float x
));
1428 _GL_FUNCDECL_SYS (log10f
, float, (float x
));
1430 _GL_CXXALIAS_SYS (log10f
, float, (float x
));
1432 _GL_CXXALIASWARN (log10f
);
1433 #elif defined GNULIB_POSIXCHECK
1435 # if HAVE_RAW_DECL_LOG10F
1436 _GL_WARN_ON_USE (log10f
, "log10f is unportable - "
1437 "use gnulib module log10f for portability");
1442 # if @REPLACE_LOG10@
1443 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1445 # define log10 rpl_log10
1447 _GL_FUNCDECL_RPL (log10
, double, (double x
));
1448 _GL_CXXALIAS_RPL (log10
, double, (double x
));
1450 _GL_CXXALIAS_SYS (log10
, double, (double x
));
1453 _GL_CXXALIASWARN (log10
);
1455 #elif defined GNULIB_POSIXCHECK
1457 # if HAVE_RAW_DECL_LOG10
1458 _GL_WARN_ON_USE (log10
, "log10 has portability problems - "
1459 "use gnulib module log10 for portability");
1464 # if @REPLACE_LOG10L@
1465 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1467 # define log10l rpl_log10l
1469 _GL_FUNCDECL_RPL (log10l
, long double, (long double x
));
1470 _GL_CXXALIAS_RPL (log10l
, long double, (long double x
));
1472 # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
1474 _GL_FUNCDECL_SYS (log10l
, long double, (long double x
));
1476 _GL_CXXALIAS_SYS (log10l
, long double, (long double x
));
1478 _GL_CXXALIASWARN (log10l
);
1479 #elif defined GNULIB_POSIXCHECK
1481 # if HAVE_RAW_DECL_LOG10L
1482 _GL_WARN_ON_USE (log10l
, "log10l is unportable - "
1483 "use gnulib module log10l for portability");
1489 # if @REPLACE_LOG1PF@
1490 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1492 # define log1pf rpl_log1pf
1494 _GL_FUNCDECL_RPL (log1pf
, float, (float x
));
1495 _GL_CXXALIAS_RPL (log1pf
, float, (float x
));
1498 _GL_FUNCDECL_SYS (log1pf
, float, (float x
));
1500 _GL_CXXALIAS_SYS (log1pf
, float, (float x
));
1502 _GL_CXXALIASWARN (log1pf
);
1503 #elif defined GNULIB_POSIXCHECK
1505 # if HAVE_RAW_DECL_LOG1PF
1506 _GL_WARN_ON_USE (log1pf
, "log1pf is unportable - "
1507 "use gnulib module log1pf for portability");
1512 # if @REPLACE_LOG1P@
1513 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1515 # define log1p rpl_log1p
1517 _GL_FUNCDECL_RPL (log1p
, double, (double x
));
1518 _GL_CXXALIAS_RPL (log1p
, double, (double x
));
1521 _GL_FUNCDECL_SYS (log1p
, double, (double x
));
1523 _GL_CXXALIAS_SYS (log1p
, double, (double x
));
1526 _GL_CXXALIASWARN (log1p
);
1528 #elif defined GNULIB_POSIXCHECK
1530 # if HAVE_RAW_DECL_LOG1P
1531 _GL_WARN_ON_USE (log1p
, "log1p has portability problems - "
1532 "use gnulib module log1p for portability");
1537 # if @REPLACE_LOG1PL@
1538 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1540 # define log1pl rpl_log1pl
1542 _GL_FUNCDECL_RPL (log1pl
, long double, (long double x
));
1543 _GL_CXXALIAS_RPL (log1pl
, long double, (long double x
));
1546 _GL_FUNCDECL_SYS (log1pl
, long double, (long double x
));
1548 _GL_CXXALIAS_SYS (log1pl
, long double, (long double x
));
1550 _GL_CXXALIASWARN (log1pl
);
1551 #elif defined GNULIB_POSIXCHECK
1553 # if HAVE_RAW_DECL_LOG1PL
1554 _GL_WARN_ON_USE (log1pl
, "log1pl has portability problems - "
1555 "use gnulib module log1pl for portability");
1561 # if @REPLACE_LOG2F@
1562 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1564 # define log2f rpl_log2f
1566 _GL_FUNCDECL_RPL (log2f
, float, (float x
));
1567 _GL_CXXALIAS_RPL (log2f
, float, (float x
));
1569 # if !@HAVE_DECL_LOG2F@
1571 _GL_FUNCDECL_SYS (log2f
, float, (float x
));
1573 _GL_CXXALIAS_SYS (log2f
, float, (float x
));
1575 _GL_CXXALIASWARN (log2f
);
1576 #elif defined GNULIB_POSIXCHECK
1578 # if HAVE_RAW_DECL_LOG2F
1579 _GL_WARN_ON_USE (log2f
, "log2f is unportable - "
1580 "use gnulib module log2f for portability");
1586 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1588 # define log2 rpl_log2
1590 _GL_FUNCDECL_RPL (log2
, double, (double x
));
1591 _GL_CXXALIAS_RPL (log2
, double, (double x
));
1593 # if !@HAVE_DECL_LOG2@
1595 _GL_FUNCDECL_SYS (log2
, double, (double x
));
1597 _GL_CXXALIAS_SYS (log2
, double, (double x
));
1600 _GL_CXXALIASWARN (log2
);
1602 #elif defined GNULIB_POSIXCHECK
1604 # if HAVE_RAW_DECL_LOG2
1605 _GL_WARN_ON_USE (log2
, "log2 is unportable - "
1606 "use gnulib module log2 for portability");
1611 # if @REPLACE_LOG2L@
1612 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1614 # define log2l rpl_log2l
1616 _GL_FUNCDECL_RPL (log2l
, long double, (long double x
));
1617 _GL_CXXALIAS_RPL (log2l
, long double, (long double x
));
1619 # if !@HAVE_DECL_LOG2L@
1620 _GL_FUNCDECL_SYS (log2l
, long double, (long double x
));
1622 _GL_CXXALIAS_SYS (log2l
, long double, (long double x
));
1624 _GL_CXXALIASWARN (log2l
);
1625 #elif defined GNULIB_POSIXCHECK
1627 # if HAVE_RAW_DECL_LOG2L
1628 _GL_WARN_ON_USE (log2l
, "log2l is unportable - "
1629 "use gnulib module log2l for portability");
1635 # if @REPLACE_LOGBF@
1636 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1638 # define logbf rpl_logbf
1640 _GL_FUNCDECL_RPL (logbf
, float, (float x
));
1641 _GL_CXXALIAS_RPL (logbf
, float, (float x
));
1644 _GL_FUNCDECL_SYS (logbf
, float, (float x
));
1646 _GL_CXXALIAS_SYS (logbf
, float, (float x
));
1648 _GL_CXXALIASWARN (logbf
);
1649 #elif defined GNULIB_POSIXCHECK
1651 # if HAVE_RAW_DECL_LOGBF
1652 _GL_WARN_ON_USE (logbf
, "logbf is unportable - "
1653 "use gnulib module logbf for portability");
1659 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1661 # define logb rpl_logb
1663 _GL_FUNCDECL_RPL (logb
, double, (double x
));
1664 _GL_CXXALIAS_RPL (logb
, double, (double x
));
1666 # if !@HAVE_DECL_LOGB@
1667 _GL_FUNCDECL_SYS (logb
, double, (double x
));
1669 _GL_CXXALIAS_SYS (logb
, double, (double x
));
1672 _GL_CXXALIASWARN (logb
);
1674 #elif defined GNULIB_POSIXCHECK
1676 # if HAVE_RAW_DECL_LOGB
1677 _GL_WARN_ON_USE (logb
, "logb is unportable - "
1678 "use gnulib module logb for portability");
1683 # if @REPLACE_LOGBL@
1684 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1686 # define logbl rpl_logbl
1688 _GL_FUNCDECL_RPL (logbl
, long double, (long double x
));
1689 _GL_CXXALIAS_RPL (logbl
, long double, (long double x
));
1692 _GL_FUNCDECL_SYS (logbl
, long double, (long double x
));
1694 _GL_CXXALIAS_SYS (logbl
, long double, (long double x
));
1696 _GL_CXXALIASWARN (logbl
);
1697 #elif defined GNULIB_POSIXCHECK
1699 # if HAVE_RAW_DECL_LOGBL
1700 _GL_WARN_ON_USE (logbl
, "logbl is unportable - "
1701 "use gnulib module logbl for portability");
1707 # if @REPLACE_MODFF@
1708 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1710 # define modff rpl_modff
1712 _GL_FUNCDECL_RPL (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1713 _GL_CXXALIAS_RPL (modff
, float, (float x
, float *iptr
));
1717 _GL_FUNCDECL_SYS (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1719 _GL_CXXALIAS_SYS (modff
, float, (float x
, float *iptr
));
1721 _GL_CXXALIASWARN (modff
);
1722 #elif defined GNULIB_POSIXCHECK
1724 # if HAVE_RAW_DECL_MODFF
1725 _GL_WARN_ON_USE (modff
, "modff is unportable - "
1726 "use gnulib module modff for portability");
1732 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1734 # define modf rpl_modf
1736 _GL_FUNCDECL_RPL (modf
, double, (double x
, double *iptr
) _GL_ARG_NONNULL ((2)));
1737 _GL_CXXALIAS_RPL (modf
, double, (double x
, double *iptr
));
1739 _GL_CXXALIAS_SYS (modf
, double, (double x
, double *iptr
));
1742 _GL_CXXALIASWARN (modf
);
1744 #elif defined GNULIB_POSIXCHECK
1746 # if HAVE_RAW_DECL_MODF
1747 _GL_WARN_ON_USE (modf
, "modf has portability problems - "
1748 "use gnulib module modf for portability");
1753 # if @REPLACE_MODFL@
1754 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1756 # define modfl rpl_modfl
1758 _GL_FUNCDECL_RPL (modfl
, long double, (long double x
, long double *iptr
)
1759 _GL_ARG_NONNULL ((2)));
1760 _GL_CXXALIAS_RPL (modfl
, long double, (long double x
, long double *iptr
));
1764 _GL_FUNCDECL_SYS (modfl
, long double, (long double x
, long double *iptr
)
1765 _GL_ARG_NONNULL ((2)));
1767 _GL_CXXALIAS_SYS (modfl
, long double, (long double x
, long double *iptr
));
1769 _GL_CXXALIASWARN (modfl
);
1770 #elif defined GNULIB_POSIXCHECK
1772 # if HAVE_RAW_DECL_MODFL
1773 _GL_WARN_ON_USE (modfl
, "modfl is unportable - "
1774 "use gnulib module modfl for portability");
1782 _GL_FUNCDECL_SYS (powf
, float, (float x
, float y
));
1784 _GL_CXXALIAS_SYS (powf
, float, (float x
, float y
));
1785 _GL_CXXALIASWARN (powf
);
1786 #elif defined GNULIB_POSIXCHECK
1788 # if HAVE_RAW_DECL_POWF
1789 _GL_WARN_ON_USE (powf
, "powf is unportable - "
1790 "use gnulib module powf for portability");
1795 #if @GNULIB_REMAINDERF@
1796 # if @REPLACE_REMAINDERF@
1797 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1799 # define remainderf rpl_remainderf
1801 _GL_FUNCDECL_RPL (remainderf
, float, (float x
, float y
));
1802 _GL_CXXALIAS_RPL (remainderf
, float, (float x
, float y
));
1804 # if !@HAVE_REMAINDERF@
1805 _GL_FUNCDECL_SYS (remainderf
, float, (float x
, float y
));
1807 _GL_CXXALIAS_SYS (remainderf
, float, (float x
, float y
));
1809 _GL_CXXALIASWARN (remainderf
);
1810 #elif defined GNULIB_POSIXCHECK
1812 # if HAVE_RAW_DECL_REMAINDERF
1813 _GL_WARN_ON_USE (remainderf
, "remainderf is unportable - "
1814 "use gnulib module remainderf for portability");
1818 #if @GNULIB_REMAINDER@
1819 # if @REPLACE_REMAINDER@
1820 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1822 # define remainder rpl_remainder
1824 _GL_FUNCDECL_RPL (remainder
, double, (double x
, double y
));
1825 _GL_CXXALIAS_RPL (remainder
, double, (double x
, double y
));
1827 # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
1828 _GL_FUNCDECL_SYS (remainder
, double, (double x
, double y
));
1830 _GL_CXXALIAS_SYS (remainder
, double, (double x
, double y
));
1833 _GL_CXXALIASWARN (remainder
);
1835 #elif defined GNULIB_POSIXCHECK
1837 # if HAVE_RAW_DECL_REMAINDER
1838 _GL_WARN_ON_USE (remainder
, "remainder is unportable - "
1839 "use gnulib module remainder for portability");
1843 #if @GNULIB_REMAINDERL@
1844 # if @REPLACE_REMAINDERL@
1845 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1847 # define remainderl rpl_remainderl
1849 _GL_FUNCDECL_RPL (remainderl
, long double, (long double x
, long double y
));
1850 _GL_CXXALIAS_RPL (remainderl
, long double, (long double x
, long double y
));
1852 # if !@HAVE_DECL_REMAINDERL@
1854 # if !(defined __cplusplus && defined _AIX)
1855 _GL_FUNCDECL_SYS (remainderl
, long double, (long double x
, long double y
));
1858 _GL_CXXALIAS_SYS (remainderl
, long double, (long double x
, long double y
));
1860 _GL_CXXALIASWARN (remainderl
);
1861 #elif defined GNULIB_POSIXCHECK
1863 # if HAVE_RAW_DECL_REMAINDERL
1864 _GL_WARN_ON_USE (remainderl
, "remainderl is unportable - "
1865 "use gnulib module remainderl for portability");
1871 # if !@HAVE_DECL_RINTF@
1872 _GL_FUNCDECL_SYS (rintf
, float, (float x
));
1874 _GL_CXXALIAS_SYS (rintf
, float, (float x
));
1875 _GL_CXXALIASWARN (rintf
);
1876 #elif defined GNULIB_POSIXCHECK
1878 # if HAVE_RAW_DECL_RINTF
1879 _GL_WARN_ON_USE (rintf
, "rintf is unportable - "
1880 "use gnulib module rintf for portability");
1886 _GL_FUNCDECL_SYS (rint
, double, (double x
));
1888 _GL_CXXALIAS_SYS (rint
, double, (double x
));
1890 _GL_CXXALIASWARN (rint
);
1892 #elif defined GNULIB_POSIXCHECK
1894 # if HAVE_RAW_DECL_RINT
1895 _GL_WARN_ON_USE (rint
, "rint is unportable - "
1896 "use gnulib module rint for portability");
1901 # if @REPLACE_RINTL@
1902 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1904 # define rintl rpl_rintl
1906 _GL_FUNCDECL_RPL (rintl
, long double, (long double x
));
1907 _GL_CXXALIAS_RPL (rintl
, long double, (long double x
));
1910 _GL_FUNCDECL_SYS (rintl
, long double, (long double x
));
1912 _GL_CXXALIAS_SYS (rintl
, long double, (long double x
));
1914 _GL_CXXALIASWARN (rintl
);
1915 #elif defined GNULIB_POSIXCHECK
1917 # if HAVE_RAW_DECL_RINTL
1918 _GL_WARN_ON_USE (rintl
, "rintl is unportable - "
1919 "use gnulib module rintl for portability");
1925 # if @REPLACE_ROUNDF@
1926 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1928 # define roundf rpl_roundf
1930 _GL_FUNCDECL_RPL (roundf
, float, (float x
));
1931 _GL_CXXALIAS_RPL (roundf
, float, (float x
));
1933 # if !@HAVE_DECL_ROUNDF@
1934 _GL_FUNCDECL_SYS (roundf
, float, (float x
));
1936 _GL_CXXALIAS_SYS (roundf
, float, (float x
));
1938 _GL_CXXALIASWARN (roundf
);
1939 #elif defined GNULIB_POSIXCHECK
1941 # if HAVE_RAW_DECL_ROUNDF
1942 _GL_WARN_ON_USE (roundf
, "roundf is unportable - "
1943 "use gnulib module roundf for portability");
1948 # if @REPLACE_ROUND@
1949 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1951 # define round rpl_round
1953 _GL_FUNCDECL_RPL (round
, double, (double x
));
1954 _GL_CXXALIAS_RPL (round
, double, (double x
));
1956 # if !@HAVE_DECL_ROUND@
1957 _GL_FUNCDECL_SYS (round
, double, (double x
));
1959 _GL_CXXALIAS_SYS (round
, double, (double x
));
1962 _GL_CXXALIASWARN (round
);
1964 #elif defined GNULIB_POSIXCHECK
1966 # if HAVE_RAW_DECL_ROUND
1967 _GL_WARN_ON_USE (round
, "round is unportable - "
1968 "use gnulib module round for portability");
1973 # if @REPLACE_ROUNDL@
1974 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1976 # define roundl rpl_roundl
1978 _GL_FUNCDECL_RPL (roundl
, long double, (long double x
));
1979 _GL_CXXALIAS_RPL (roundl
, long double, (long double x
));
1981 # if !@HAVE_DECL_ROUNDL@
1983 # if !(defined __cplusplus && defined _AIX)
1984 _GL_FUNCDECL_SYS (roundl
, long double, (long double x
));
1987 _GL_CXXALIAS_SYS (roundl
, long double, (long double x
));
1989 _GL_CXXALIASWARN (roundl
);
1990 #elif defined GNULIB_POSIXCHECK
1992 # if HAVE_RAW_DECL_ROUNDL
1993 _GL_WARN_ON_USE (roundl
, "roundl is unportable - "
1994 "use gnulib module roundl for portability");
2001 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2003 # define sinf rpl_sinf
2005 _GL_FUNCDECL_RPL (sinf
, float, (float x
));
2006 _GL_CXXALIAS_RPL (sinf
, float, (float x
));
2010 _GL_FUNCDECL_SYS (sinf
, float, (float x
));
2012 _GL_CXXALIAS_SYS (sinf
, float, (float x
));
2014 _GL_CXXALIASWARN (sinf
);
2015 #elif defined GNULIB_POSIXCHECK
2017 # if HAVE_RAW_DECL_SINF
2018 _GL_WARN_ON_USE (sinf
, "sinf is unportable - "
2019 "use gnulib module sinf for portability");
2024 # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
2026 _GL_FUNCDECL_SYS (sinl
, long double, (long double x
));
2028 _GL_CXXALIAS_SYS (sinl
, long double, (long double x
));
2029 _GL_CXXALIASWARN (sinl
);
2030 #elif defined GNULIB_POSIXCHECK
2032 # if HAVE_RAW_DECL_SINL
2033 _GL_WARN_ON_USE (sinl
, "sinl is unportable - "
2034 "use gnulib module sinl for portability");
2040 # if @REPLACE_SINHF@
2041 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2043 # define sinhf rpl_sinhf
2045 _GL_FUNCDECL_RPL (sinhf
, float, (float x
));
2046 _GL_CXXALIAS_RPL (sinhf
, float, (float x
));
2050 _GL_FUNCDECL_SYS (sinhf
, float, (float x
));
2052 _GL_CXXALIAS_SYS (sinhf
, float, (float x
));
2054 _GL_CXXALIASWARN (sinhf
);
2055 #elif defined GNULIB_POSIXCHECK
2057 # if HAVE_RAW_DECL_SINHF
2058 _GL_WARN_ON_USE (sinhf
, "sinhf is unportable - "
2059 "use gnulib module sinhf for portability");
2065 # if @REPLACE_SQRTF@
2066 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2068 # define sqrtf rpl_sqrtf
2070 _GL_FUNCDECL_RPL (sqrtf
, float, (float x
));
2071 _GL_CXXALIAS_RPL (sqrtf
, float, (float x
));
2075 _GL_FUNCDECL_SYS (sqrtf
, float, (float x
));
2077 _GL_CXXALIAS_SYS (sqrtf
, float, (float x
));
2079 _GL_CXXALIASWARN (sqrtf
);
2080 #elif defined GNULIB_POSIXCHECK
2082 # if HAVE_RAW_DECL_SQRTF
2083 _GL_WARN_ON_USE (sqrtf
, "sqrtf is unportable - "
2084 "use gnulib module sqrtf for portability");
2089 # if @REPLACE_SQRTL@
2090 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2092 # define sqrtl rpl_sqrtl
2094 _GL_FUNCDECL_RPL (sqrtl
, long double, (long double x
));
2095 _GL_CXXALIAS_RPL (sqrtl
, long double, (long double x
));
2097 # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
2099 _GL_FUNCDECL_SYS (sqrtl
, long double, (long double x
));
2101 _GL_CXXALIAS_SYS (sqrtl
, long double, (long double x
));
2103 _GL_CXXALIASWARN (sqrtl
);
2104 #elif defined GNULIB_POSIXCHECK
2106 # if HAVE_RAW_DECL_SQRTL
2107 _GL_WARN_ON_USE (sqrtl
, "sqrtl is unportable - "
2108 "use gnulib module sqrtl for portability");
2115 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2117 # define tanf rpl_tanf
2119 _GL_FUNCDECL_RPL (tanf
, float, (float x
));
2120 _GL_CXXALIAS_RPL (tanf
, float, (float x
));
2124 _GL_FUNCDECL_SYS (tanf
, float, (float x
));
2126 _GL_CXXALIAS_SYS (tanf
, float, (float x
));
2128 _GL_CXXALIASWARN (tanf
);
2129 #elif defined GNULIB_POSIXCHECK
2131 # if HAVE_RAW_DECL_TANF
2132 _GL_WARN_ON_USE (tanf
, "tanf is unportable - "
2133 "use gnulib module tanf for portability");
2138 # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
2140 _GL_FUNCDECL_SYS (tanl
, long double, (long double x
));
2142 _GL_CXXALIAS_SYS (tanl
, long double, (long double x
));
2143 _GL_CXXALIASWARN (tanl
);
2144 #elif defined GNULIB_POSIXCHECK
2146 # if HAVE_RAW_DECL_TANL
2147 _GL_WARN_ON_USE (tanl
, "tanl is unportable - "
2148 "use gnulib module tanl for portability");
2154 # if @REPLACE_TANHF@
2155 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2157 # define tanhf rpl_tanhf
2159 _GL_FUNCDECL_RPL (tanhf
, float, (float x
));
2160 _GL_CXXALIAS_RPL (tanhf
, float, (float x
));
2164 _GL_FUNCDECL_SYS (tanhf
, float, (float x
));
2166 _GL_CXXALIAS_SYS (tanhf
, float, (float x
));
2168 _GL_CXXALIASWARN (tanhf
);
2169 #elif defined GNULIB_POSIXCHECK
2171 # if HAVE_RAW_DECL_TANHF
2172 _GL_WARN_ON_USE (tanhf
, "tanhf is unportable - "
2173 "use gnulib module tanhf for portability");
2179 # if @REPLACE_TRUNCF@
2180 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2182 # define truncf rpl_truncf
2184 _GL_FUNCDECL_RPL (truncf
, float, (float x
));
2185 _GL_CXXALIAS_RPL (truncf
, float, (float x
));
2187 # if !@HAVE_DECL_TRUNCF@
2188 _GL_FUNCDECL_SYS (truncf
, float, (float x
));
2190 _GL_CXXALIAS_SYS (truncf
, float, (float x
));
2192 _GL_CXXALIASWARN (truncf
);
2193 #elif defined GNULIB_POSIXCHECK
2195 # if HAVE_RAW_DECL_TRUNCF
2196 _GL_WARN_ON_USE (truncf
, "truncf is unportable - "
2197 "use gnulib module truncf for portability");
2202 # if @REPLACE_TRUNC@
2203 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2205 # define trunc rpl_trunc
2207 _GL_FUNCDECL_RPL (trunc
, double, (double x
));
2208 _GL_CXXALIAS_RPL (trunc
, double, (double x
));
2210 # if !@HAVE_DECL_TRUNC@
2211 _GL_FUNCDECL_SYS (trunc
, double, (double x
));
2213 _GL_CXXALIAS_SYS (trunc
, double, (double x
));
2216 _GL_CXXALIASWARN (trunc
);
2218 #elif defined GNULIB_POSIXCHECK
2220 # if HAVE_RAW_DECL_TRUNC
2221 _GL_WARN_ON_USE (trunc
, "trunc is unportable - "
2222 "use gnulib module trunc for portability");
2227 # if @REPLACE_TRUNCL@
2228 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2230 # define truncl rpl_truncl
2232 _GL_FUNCDECL_RPL (truncl
, long double, (long double x
));
2233 _GL_CXXALIAS_RPL (truncl
, long double, (long double x
));
2235 # if !@HAVE_DECL_TRUNCL@
2236 _GL_FUNCDECL_SYS (truncl
, long double, (long double x
));
2238 _GL_CXXALIAS_SYS (truncl
, long double, (long double x
));
2240 _GL_CXXALIASWARN (truncl
);
2241 #elif defined GNULIB_POSIXCHECK
2243 # if HAVE_RAW_DECL_TRUNCL
2244 _GL_WARN_ON_USE (truncl
, "truncl is unportable - "
2245 "use gnulib module truncl for portability");
2250 /* Definitions of function-like macros come here, after the function
2254 #if @GNULIB_ISFINITE@
2255 # if @REPLACE_ISFINITE@
2256 _GL_EXTERN_C
int gl_isfinitef (float x
);
2257 _GL_EXTERN_C
int gl_isfinited (double x
);
2258 _GL_EXTERN_C
int gl_isfinitel (long double x
);
2260 # define isfinite(x) \
2261 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
2262 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
2266 # if defined isfinite || defined GNULIB_NAMESPACE
2267 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite
)
2269 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX))
2270 /* This platform's <cmath> possibly defines isfinite through a set of inline
2272 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
, rpl_isfinite
, bool)
2273 # define isfinite rpl_isfinite
2275 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
, isfinite
, bool)
2279 #elif defined GNULIB_POSIXCHECK
2280 # if defined isfinite
2281 _GL_WARN_REAL_FLOATING_DECL (isfinite
);
2283 # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
2289 # if @REPLACE_ISINF@
2290 _GL_EXTERN_C
int gl_isinff (float x
);
2291 _GL_EXTERN_C
int gl_isinfd (double x
);
2292 _GL_EXTERN_C
int gl_isinfl (long double x
);
2295 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
2296 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
2300 # if defined isinf || defined GNULIB_NAMESPACE
2301 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf
)
2303 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__))
2304 /* This platform's <cmath> possibly defines isinf through a set of inline
2306 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
, rpl_isinf
, bool)
2307 # define isinf rpl_isinf
2309 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
, isinf
, bool)
2313 #elif defined GNULIB_POSIXCHECK
2315 _GL_WARN_REAL_FLOATING_DECL (isinf
);
2317 # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
2323 /* Test for NaN for 'float' numbers. */
2325 /* The original <math.h> included above provides a declaration of isnan macro
2326 or (older) isnanf function. */
2327 # if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf))
2328 /* GCC 4.0 and newer provides three built-ins for isnan. */
2330 # define isnanf(x) __builtin_isnanf ((float)(x))
2331 # elif defined isnan
2333 # define isnanf(x) isnan ((float)(x))
2336 /* Test whether X is a NaN. */
2338 # define isnanf rpl_isnanf
2339 _GL_EXTERN_C
int isnanf (float x
);
2344 /* Test for NaN for 'double' numbers.
2345 This function is a gnulib extension, unlike isnan() which applied only
2346 to 'double' numbers earlier but now is a type-generic macro. */
2348 /* The original <math.h> included above provides a declaration of isnan
2351 /* GCC 4.0 and newer provides three built-ins for isnan. */
2353 # define isnand(x) __builtin_isnan ((double)(x))
2356 # define isnand(x) isnan ((double)(x))
2359 /* Test whether X is a NaN. */
2361 # define isnand rpl_isnand
2362 _GL_EXTERN_C
int isnand (double x
);
2367 /* Test for NaN for 'long double' numbers. */
2369 /* The original <math.h> included above provides a declaration of isnan
2370 macro or (older) isnanl function. */
2371 # if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
2372 /* GCC 4.0 and newer provides three built-ins for isnan. */
2374 # define isnanl(x) __builtin_isnanl ((long double)(x))
2375 # elif defined isnan
2377 # define isnanl(x) isnan ((long double)(x))
2380 /* Test whether X is a NaN. */
2382 # define isnanl rpl_isnanl
2383 _GL_EXTERN_C
int isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2387 /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
2389 # if @REPLACE_ISNAN@
2390 /* We can't just use the isnanf macro (e.g.) as exposed by
2391 isnanf.h (e.g.) here, because those may end up being macros
2392 that recursively expand back to isnan. So use the gnulib
2393 replacements for them directly. */
2394 # if @HAVE_ISNANF@ && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanf))
2395 # define gl_isnan_f(x) __builtin_isnanf ((float)(x))
2397 _GL_EXTERN_C
int rpl_isnanf (float x
);
2398 # define gl_isnan_f(x) rpl_isnanf (x)
2400 # if @HAVE_ISNAND@ && __GNUC__ >= 4
2401 # define gl_isnan_d(x) __builtin_isnan ((double)(x))
2403 _GL_EXTERN_C
int rpl_isnand (double x
);
2404 # define gl_isnan_d(x) rpl_isnand (x)
2406 # if @HAVE_ISNANL@ && __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
2407 # define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
2409 _GL_EXTERN_C
int rpl_isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2410 # define gl_isnan_l(x) rpl_isnanl (x)
2414 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
2415 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
2417 # elif __GNUC__ >= 4 && (!defined __clang__ || (__has_builtin (__builtin_isnanf) && __has_builtin (__builtin_isnanl)))
2420 (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \
2421 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
2422 __builtin_isnanf ((float)(x)))
2425 # if defined isnan || defined GNULIB_NAMESPACE
2426 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan
)
2428 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__))
2429 /* This platform's <cmath> possibly defines isnan through a set of inline
2431 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
, rpl_isnan
, bool)
2432 # define isnan rpl_isnan
2434 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
, isnan
, bool)
2438 /* Ensure isnan is a macro. */
2440 # define isnan isnan
2443 #elif defined GNULIB_POSIXCHECK
2445 _GL_WARN_REAL_FLOATING_DECL (isnan
);
2447 # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
2452 #if @GNULIB_SIGNBIT@
2453 # if (@REPLACE_SIGNBIT_USING_GCC@ \
2454 && (!defined __cplusplus || __cplusplus < 201103))
2456 /* GCC 4.0 and newer provides three built-ins for signbit. */
2457 # define signbit(x) \
2458 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
2459 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
2460 __builtin_signbitf (x))
2462 # if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit
2464 _GL_EXTERN_C
int gl_signbitf (float arg
);
2465 _GL_EXTERN_C
int gl_signbitd (double arg
);
2466 _GL_EXTERN_C
int gl_signbitl (long double arg
);
2467 # if __GNUC__ >= 2 && !defined __STRICT_ANSI__
2468 # define _GL_NUM_UINT_WORDS(type) \
2469 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
2470 # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
2471 # define gl_signbitf_OPTIMIZED_MACRO
2472 # define gl_signbitf(arg) \
2473 ({ union { float _value; \
2474 unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
2476 _m._value = (arg); \
2477 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
2480 # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
2481 # define gl_signbitd_OPTIMIZED_MACRO
2482 # define gl_signbitd(arg) \
2483 ({ union { double _value; \
2484 unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
2486 _m._value = (arg); \
2487 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
2490 # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
2491 # define gl_signbitl_OPTIMIZED_MACRO
2492 # define gl_signbitl(arg) \
2493 ({ union { long double _value; \
2494 unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
2496 _m._value = (arg); \
2497 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
2501 # define signbit(x) \
2502 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
2503 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
2505 # define GNULIB_defined_signbit 1
2508 # if defined signbit || defined GNULIB_NAMESPACE
2509 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit
)
2511 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX))
2512 /* This platform's <cmath> possibly defines signbit through a set of inline
2514 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
, rpl_signbit
, bool)
2515 # define signbit rpl_signbit
2517 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
, signbit
, bool)
2521 #elif defined GNULIB_POSIXCHECK
2522 # if defined signbit
2523 _GL_WARN_REAL_FLOATING_DECL (signbit
);
2525 # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
2529 _GL_INLINE_HEADER_END
2531 #endif /* _@GUARD_PREFIX@_MATH_H */
2532 #endif /* _@GUARD_PREFIX@_MATH_H */