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 /* 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
));
259 _GL_CXXALIASWARN (acosl
);
261 #elif defined GNULIB_POSIXCHECK
263 # if HAVE_RAW_DECL_ACOSL
264 _GL_WARN_ON_USE (acosl
, "acosl is unportable - "
265 "use gnulib module acosl for portability");
272 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
274 # define asinf rpl_asinf
276 _GL_FUNCDECL_RPL (asinf
, float, (float x
));
277 _GL_CXXALIAS_RPL (asinf
, float, (float x
));
281 _GL_FUNCDECL_SYS (asinf
, float, (float x
));
283 _GL_CXXALIAS_SYS (asinf
, float, (float x
));
285 _GL_CXXALIASWARN (asinf
);
286 #elif defined GNULIB_POSIXCHECK
288 # if HAVE_RAW_DECL_ASINF
289 _GL_WARN_ON_USE (asinf
, "asinf is unportable - "
290 "use gnulib module asinf for portability");
295 # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
297 _GL_FUNCDECL_SYS (asinl
, long double, (long double x
));
299 _GL_CXXALIAS_SYS (asinl
, long double, (long double x
));
301 _GL_CXXALIASWARN (asinl
);
303 #elif defined GNULIB_POSIXCHECK
305 # if HAVE_RAW_DECL_ASINL
306 _GL_WARN_ON_USE (asinl
, "asinl is unportable - "
307 "use gnulib module asinl for portability");
314 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
316 # define atanf rpl_atanf
318 _GL_FUNCDECL_RPL (atanf
, float, (float x
));
319 _GL_CXXALIAS_RPL (atanf
, float, (float x
));
323 _GL_FUNCDECL_SYS (atanf
, float, (float x
));
325 _GL_CXXALIAS_SYS (atanf
, float, (float x
));
327 _GL_CXXALIASWARN (atanf
);
328 #elif defined GNULIB_POSIXCHECK
330 # if HAVE_RAW_DECL_ATANF
331 _GL_WARN_ON_USE (atanf
, "atanf is unportable - "
332 "use gnulib module atanf for portability");
337 # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
339 _GL_FUNCDECL_SYS (atanl
, long double, (long double x
));
341 _GL_CXXALIAS_SYS (atanl
, long double, (long double x
));
343 _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_CXXALIASWARN1 (cbrt
, double, (double x
));
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_CXXALIASWARN1 (ceil
, double, (double x
));
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
));
498 _GL_CXXALIASWARN (ceill
);
500 #elif defined GNULIB_POSIXCHECK
502 # if HAVE_RAW_DECL_CEILL
503 _GL_WARN_ON_USE (ceill
, "ceill is unportable - "
504 "use gnulib module ceill for portability");
509 #if @GNULIB_COPYSIGNF@
510 # if !@HAVE_DECL_COPYSIGNF@
512 _GL_FUNCDECL_SYS (copysignf
, float, (float x
, float y
));
514 _GL_CXXALIAS_SYS (copysignf
, float, (float x
, float y
));
515 _GL_CXXALIASWARN (copysignf
);
516 #elif defined GNULIB_POSIXCHECK
518 # if HAVE_RAW_DECL_COPYSIGNF
519 _GL_WARN_ON_USE (copysignf
, "copysignf is unportable - "
520 "use gnulib module copysignf for portability");
524 #if @GNULIB_COPYSIGN@
525 # if !@HAVE_COPYSIGN@
526 _GL_FUNCDECL_SYS (copysign
, double, (double x
, double y
));
528 _GL_CXXALIAS_SYS (copysign
, double, (double x
, double y
));
530 _GL_CXXALIASWARN1 (copysign
, double, (double x
, double y
));
532 #elif defined GNULIB_POSIXCHECK
534 # if HAVE_RAW_DECL_COPYSIGN
535 _GL_WARN_ON_USE (copysign
, "copysign is unportable - "
536 "use gnulib module copysign for portability");
540 #if @GNULIB_COPYSIGNL@
541 # if !@HAVE_COPYSIGNL@
542 _GL_FUNCDECL_SYS (copysignl
, long double, (long double x
, long double y
));
544 _GL_CXXALIAS_SYS (copysignl
, long double, (long double x
, long double y
));
545 _GL_CXXALIASWARN (copysignl
);
546 #elif defined GNULIB_POSIXCHECK
548 # if HAVE_RAW_DECL_COPYSIGNL
549 _GL_WARN_ON_USE (copysign
, "copysignl is unportable - "
550 "use gnulib module copysignl for portability");
557 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
559 # define cosf rpl_cosf
561 _GL_FUNCDECL_RPL (cosf
, float, (float x
));
562 _GL_CXXALIAS_RPL (cosf
, float, (float x
));
566 _GL_FUNCDECL_SYS (cosf
, float, (float x
));
568 _GL_CXXALIAS_SYS (cosf
, float, (float x
));
570 _GL_CXXALIASWARN (cosf
);
571 #elif defined GNULIB_POSIXCHECK
573 # if HAVE_RAW_DECL_COSF
574 _GL_WARN_ON_USE (cosf
, "cosf is unportable - "
575 "use gnulib module cosf for portability");
580 # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
582 _GL_FUNCDECL_SYS (cosl
, long double, (long double x
));
584 _GL_CXXALIAS_SYS (cosl
, long double, (long double x
));
586 _GL_CXXALIASWARN (cosl
);
588 #elif defined GNULIB_POSIXCHECK
590 # if HAVE_RAW_DECL_COSL
591 _GL_WARN_ON_USE (cosl
, "cosl is unportable - "
592 "use gnulib module cosl for portability");
599 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
601 # define coshf rpl_coshf
603 _GL_FUNCDECL_RPL (coshf
, float, (float x
));
604 _GL_CXXALIAS_RPL (coshf
, float, (float x
));
608 _GL_FUNCDECL_SYS (coshf
, float, (float x
));
610 _GL_CXXALIAS_SYS (coshf
, float, (float x
));
612 _GL_CXXALIASWARN (coshf
);
613 #elif defined GNULIB_POSIXCHECK
615 # if HAVE_RAW_DECL_COSHF
616 _GL_WARN_ON_USE (coshf
, "coshf is unportable - "
617 "use gnulib module coshf for portability");
624 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
626 # define expf rpl_expf
628 _GL_FUNCDECL_RPL (expf
, float, (float x
));
629 _GL_CXXALIAS_RPL (expf
, float, (float x
));
633 _GL_FUNCDECL_SYS (expf
, float, (float x
));
635 _GL_CXXALIAS_SYS (expf
, float, (float x
));
637 _GL_CXXALIASWARN (expf
);
638 #elif defined GNULIB_POSIXCHECK
640 # if HAVE_RAW_DECL_EXPF
641 _GL_WARN_ON_USE (expf
, "expf is unportable - "
642 "use gnulib module expf for portability");
648 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
650 # define expl rpl_expl
652 _GL_FUNCDECL_RPL (expl
, long double, (long double x
));
653 _GL_CXXALIAS_RPL (expl
, long double, (long double x
));
655 # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
657 _GL_FUNCDECL_SYS (expl
, long double, (long double x
));
659 _GL_CXXALIAS_SYS (expl
, long double, (long double x
));
662 _GL_CXXALIASWARN (expl
);
664 #elif defined GNULIB_POSIXCHECK
666 # if HAVE_RAW_DECL_EXPL
667 _GL_WARN_ON_USE (expl
, "expl is unportable - "
668 "use gnulib module expl for portability");
674 # if !@HAVE_DECL_EXP2F@
675 _GL_FUNCDECL_SYS (exp2f
, float, (float x
));
677 _GL_CXXALIAS_SYS (exp2f
, float, (float x
));
678 _GL_CXXALIASWARN (exp2f
);
679 #elif defined GNULIB_POSIXCHECK
681 # if HAVE_RAW_DECL_EXP2F
682 _GL_WARN_ON_USE (exp2f
, "exp2f is unportable - "
683 "use gnulib module exp2f for portability");
689 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
691 # define exp2 rpl_exp2
693 _GL_FUNCDECL_RPL (exp2
, double, (double x
));
694 _GL_CXXALIAS_RPL (exp2
, double, (double x
));
696 # if !@HAVE_DECL_EXP2@
697 _GL_FUNCDECL_SYS (exp2
, double, (double x
));
699 _GL_CXXALIAS_SYS (exp2
, double, (double x
));
702 _GL_CXXALIASWARN1 (exp2
, double, (double x
));
704 #elif defined GNULIB_POSIXCHECK
706 # if HAVE_RAW_DECL_EXP2
707 _GL_WARN_ON_USE (exp2
, "exp2 is unportable - "
708 "use gnulib module exp2 for portability");
714 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
716 # define exp2l rpl_exp2l
718 _GL_FUNCDECL_RPL (exp2l
, long double, (long double x
));
719 _GL_CXXALIAS_RPL (exp2l
, long double, (long double x
));
721 # if !@HAVE_DECL_EXP2L@
723 _GL_FUNCDECL_SYS (exp2l
, long double, (long double x
));
725 _GL_CXXALIAS_SYS (exp2l
, long double, (long double x
));
727 _GL_CXXALIASWARN (exp2l
);
728 #elif defined GNULIB_POSIXCHECK
730 # if HAVE_RAW_DECL_EXP2L
731 _GL_WARN_ON_USE (exp2l
, "exp2l is unportable - "
732 "use gnulib module exp2l for portability");
738 # if @REPLACE_EXPM1F@
739 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
741 # define expm1f rpl_expm1f
743 _GL_FUNCDECL_RPL (expm1f
, float, (float x
));
744 _GL_CXXALIAS_RPL (expm1f
, float, (float x
));
747 _GL_FUNCDECL_SYS (expm1f
, float, (float x
));
749 _GL_CXXALIAS_SYS (expm1f
, float, (float x
));
751 _GL_CXXALIASWARN (expm1f
);
752 #elif defined GNULIB_POSIXCHECK
754 # if HAVE_RAW_DECL_EXPM1F
755 _GL_WARN_ON_USE (expm1f
, "expm1f is unportable - "
756 "use gnulib module expm1f for portability");
762 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
764 # define expm1 rpl_expm1
766 _GL_FUNCDECL_RPL (expm1
, double, (double x
));
767 _GL_CXXALIAS_RPL (expm1
, double, (double x
));
770 _GL_FUNCDECL_SYS (expm1
, double, (double x
));
772 _GL_CXXALIAS_SYS (expm1
, double, (double x
));
775 _GL_CXXALIASWARN1 (expm1
, double, (double x
));
777 #elif defined GNULIB_POSIXCHECK
779 # if HAVE_RAW_DECL_EXPM1
780 _GL_WARN_ON_USE (expm1
, "expm1 is unportable - "
781 "use gnulib module expm1 for portability");
786 # if @REPLACE_EXPM1L@
787 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
789 # define expm1l rpl_expm1l
791 _GL_FUNCDECL_RPL (expm1l
, long double, (long double x
));
792 _GL_CXXALIAS_RPL (expm1l
, long double, (long double x
));
794 # if !@HAVE_DECL_EXPM1L@
796 # if !(defined __cplusplus && defined _AIX)
797 _GL_FUNCDECL_SYS (expm1l
, long double, (long double x
));
800 _GL_CXXALIAS_SYS (expm1l
, long double, (long double x
));
802 _GL_CXXALIASWARN (expm1l
);
803 #elif defined GNULIB_POSIXCHECK
805 # if HAVE_RAW_DECL_EXPM1L
806 _GL_WARN_ON_USE (expm1l
, "expm1l is unportable - "
807 "use gnulib module expm1l for portability");
815 _GL_FUNCDECL_SYS (fabsf
, float, (float x
));
817 _GL_CXXALIAS_SYS (fabsf
, float, (float x
));
819 _GL_CXXALIASWARN (fabsf
);
821 #elif defined GNULIB_POSIXCHECK
823 # if HAVE_RAW_DECL_FABSF
824 _GL_WARN_ON_USE (fabsf
, "fabsf is unportable - "
825 "use gnulib module fabsf for portability");
831 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
833 # define fabsl rpl_fabsl
835 _GL_FUNCDECL_RPL (fabsl
, long double, (long double x
));
836 _GL_CXXALIAS_RPL (fabsl
, long double, (long double x
));
840 _GL_FUNCDECL_SYS (fabsl
, long double, (long double x
));
842 _GL_CXXALIAS_SYS (fabsl
, long double, (long double x
));
845 _GL_CXXALIASWARN (fabsl
);
847 #elif defined GNULIB_POSIXCHECK
849 # if HAVE_RAW_DECL_FABSL
850 _GL_WARN_ON_USE (fabsl
, "fabsl is unportable - "
851 "use gnulib module fabsl for portability");
857 # if @REPLACE_FLOORF@
858 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
860 # define floorf rpl_floorf
862 _GL_FUNCDECL_RPL (floorf
, float, (float x
));
863 _GL_CXXALIAS_RPL (floorf
, float, (float x
));
865 # if !@HAVE_DECL_FLOORF@
867 _GL_FUNCDECL_SYS (floorf
, float, (float x
));
869 _GL_CXXALIAS_SYS (floorf
, float, (float x
));
871 _GL_CXXALIASWARN (floorf
);
872 #elif defined GNULIB_POSIXCHECK
874 # if HAVE_RAW_DECL_FLOORF
875 _GL_WARN_ON_USE (floorf
, "floorf is unportable - "
876 "use gnulib module floorf for portability");
882 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
884 # define floor rpl_floor
886 _GL_FUNCDECL_RPL (floor
, double, (double x
));
887 _GL_CXXALIAS_RPL (floor
, double, (double x
));
889 _GL_CXXALIAS_SYS (floor
, double, (double x
));
892 _GL_CXXALIASWARN1 (floor
, double, (double x
));
897 # if @REPLACE_FLOORL@
898 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
900 # define floorl rpl_floorl
902 _GL_FUNCDECL_RPL (floorl
, long double, (long double x
));
903 _GL_CXXALIAS_RPL (floorl
, long double, (long double x
));
905 # if !@HAVE_DECL_FLOORL@
907 _GL_FUNCDECL_SYS (floorl
, long double, (long double x
));
909 _GL_CXXALIAS_SYS (floorl
, long double, (long double x
));
912 _GL_CXXALIASWARN (floorl
);
914 #elif defined GNULIB_POSIXCHECK
916 # if HAVE_RAW_DECL_FLOORL
917 _GL_WARN_ON_USE (floorl
, "floorl is unportable - "
918 "use gnulib module floorl for portability");
925 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
927 # define fmaf rpl_fmaf
929 _GL_FUNCDECL_RPL (fmaf
, float, (float x
, float y
, float z
));
930 _GL_CXXALIAS_RPL (fmaf
, float, (float x
, float y
, float z
));
934 _GL_FUNCDECL_SYS (fmaf
, float, (float x
, float y
, float z
));
936 _GL_CXXALIAS_SYS (fmaf
, float, (float x
, float y
, float z
));
938 _GL_CXXALIASWARN (fmaf
);
939 #elif defined GNULIB_POSIXCHECK
941 # if HAVE_RAW_DECL_FMAF
942 _GL_WARN_ON_USE (fmaf
, "fmaf is unportable - "
943 "use gnulib module fmaf for portability");
949 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
953 _GL_FUNCDECL_RPL (fma
, double, (double x
, double y
, double z
));
954 _GL_CXXALIAS_RPL (fma
, double, (double x
, double y
, double z
));
958 _GL_FUNCDECL_SYS (fma
, double, (double x
, double y
, double z
));
960 _GL_CXXALIAS_SYS (fma
, double, (double x
, double y
, double z
));
963 _GL_CXXALIASWARN1 (fma
, double, (double x
, double y
, double z
));
965 #elif defined GNULIB_POSIXCHECK
967 # if HAVE_RAW_DECL_FMA
968 _GL_WARN_ON_USE (fma
, "fma is unportable - "
969 "use gnulib module fma for portability");
975 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
977 # define fmal rpl_fmal
979 _GL_FUNCDECL_RPL (fmal
, long double,
980 (long double x
, long double y
, long double z
));
981 _GL_CXXALIAS_RPL (fmal
, long double,
982 (long double x
, long double y
, long double z
));
986 # if !(defined __cplusplus && defined _AIX)
987 _GL_FUNCDECL_SYS (fmal
, long double,
988 (long double x
, long double y
, long double z
));
991 _GL_CXXALIAS_SYS (fmal
, long double,
992 (long double x
, long double y
, long double z
));
994 _GL_CXXALIASWARN (fmal
);
995 #elif defined GNULIB_POSIXCHECK
997 # if HAVE_RAW_DECL_FMAL
998 _GL_WARN_ON_USE (fmal
, "fmal is unportable - "
999 "use gnulib module fmal for portability");
1005 # if @REPLACE_FMODF@
1006 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1008 # define fmodf rpl_fmodf
1010 _GL_FUNCDECL_RPL (fmodf
, float, (float x
, float y
));
1011 _GL_CXXALIAS_RPL (fmodf
, float, (float x
, float y
));
1015 _GL_FUNCDECL_SYS (fmodf
, float, (float x
, float y
));
1017 _GL_CXXALIAS_SYS (fmodf
, float, (float x
, float y
));
1019 _GL_CXXALIASWARN (fmodf
);
1020 #elif defined GNULIB_POSIXCHECK
1022 # if HAVE_RAW_DECL_FMODF
1023 _GL_WARN_ON_USE (fmodf
, "fmodf is unportable - "
1024 "use gnulib module fmodf for portability");
1030 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1032 # define fmod rpl_fmod
1034 _GL_FUNCDECL_RPL (fmod
, double, (double x
, double y
));
1035 _GL_CXXALIAS_RPL (fmod
, double, (double x
, double y
));
1037 _GL_CXXALIAS_SYS (fmod
, double, (double x
, double y
));
1040 _GL_CXXALIASWARN1 (fmod
, double, (double x
, double y
));
1042 #elif defined GNULIB_POSIXCHECK
1044 # if HAVE_RAW_DECL_FMOD
1045 _GL_WARN_ON_USE (fmod
, "fmod has portability problems - "
1046 "use gnulib module fmod for portability");
1051 # if @REPLACE_FMODL@
1052 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1054 # define fmodl rpl_fmodl
1056 _GL_FUNCDECL_RPL (fmodl
, long double, (long double x
, long double y
));
1057 _GL_CXXALIAS_RPL (fmodl
, long double, (long double x
, long double y
));
1061 _GL_FUNCDECL_SYS (fmodl
, long double, (long double x
, long double y
));
1063 _GL_CXXALIAS_SYS (fmodl
, long double, (long double x
, long double y
));
1066 _GL_CXXALIASWARN (fmodl
);
1068 #elif defined GNULIB_POSIXCHECK
1070 # if HAVE_RAW_DECL_FMODL
1071 _GL_WARN_ON_USE (fmodl
, "fmodl is unportable - "
1072 "use gnulib module fmodl for portability");
1078 x = mantissa * 2^exp
1080 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1081 If x is zero: mantissa = x, exp = 0.
1082 If x is infinite or NaN: mantissa = x, exp unspecified.
1083 Store exp in *EXPPTR and return mantissa. */
1085 # if @REPLACE_FREXPF@
1086 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1088 # define frexpf rpl_frexpf
1090 _GL_FUNCDECL_RPL (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1091 _GL_CXXALIAS_RPL (frexpf
, float, (float x
, int *expptr
));
1095 _GL_FUNCDECL_SYS (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1097 _GL_CXXALIAS_SYS (frexpf
, float, (float x
, int *expptr
));
1100 _GL_CXXALIASWARN (frexpf
);
1102 #elif defined GNULIB_POSIXCHECK
1104 # if HAVE_RAW_DECL_FREXPF
1105 _GL_WARN_ON_USE (frexpf
, "frexpf is unportable - "
1106 "use gnulib module frexpf for portability");
1111 x = mantissa * 2^exp
1113 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1114 If x is zero: mantissa = x, exp = 0.
1115 If x is infinite or NaN: mantissa = x, exp unspecified.
1116 Store exp in *EXPPTR and return mantissa. */
1118 # if @REPLACE_FREXP@
1119 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1121 # define frexp rpl_frexp
1123 _GL_FUNCDECL_RPL (frexp
, double, (double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1124 _GL_CXXALIAS_RPL (frexp
, double, (double x
, int *expptr
));
1126 _GL_CXXALIAS_SYS (frexp
, double, (double x
, int *expptr
));
1129 _GL_CXXALIASWARN1 (frexp
, double, (double x
, int *expptr
));
1131 #elif defined GNULIB_POSIXCHECK
1133 /* Assume frexp is always declared. */
1134 _GL_WARN_ON_USE (frexp
, "frexp is unportable - "
1135 "use gnulib module frexp for portability");
1139 x = mantissa * 2^exp
1141 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1142 If x is zero: mantissa = x, exp = 0.
1143 If x is infinite or NaN: mantissa = x, exp unspecified.
1144 Store exp in *EXPPTR and return mantissa. */
1145 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
1146 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1148 # define frexpl rpl_frexpl
1150 _GL_FUNCDECL_RPL (frexpl
, long double,
1151 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1152 _GL_CXXALIAS_RPL (frexpl
, long double, (long double x
, int *expptr
));
1154 # if !@HAVE_DECL_FREXPL@
1155 _GL_FUNCDECL_SYS (frexpl
, long double,
1156 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1158 # if @GNULIB_FREXPL@
1159 _GL_CXXALIAS_SYS (frexpl
, long double, (long double x
, int *expptr
));
1162 #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
1164 _GL_CXXALIASWARN (frexpl
);
1167 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
1169 # if HAVE_RAW_DECL_FREXPL
1170 _GL_WARN_ON_USE (frexpl
, "frexpl is unportable - "
1171 "use gnulib module frexpl for portability");
1176 /* Return sqrt(x^2+y^2). */
1178 # if @REPLACE_HYPOTF@
1179 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1181 # define hypotf rpl_hypotf
1183 _GL_FUNCDECL_RPL (hypotf
, float, (float x
, float y
));
1184 _GL_CXXALIAS_RPL (hypotf
, float, (float x
, float y
));
1187 _GL_FUNCDECL_SYS (hypotf
, float, (float x
, float y
));
1189 _GL_CXXALIAS_SYS (hypotf
, float, (float x
, float y
));
1192 _GL_CXXALIASWARN (hypotf
);
1194 #elif defined GNULIB_POSIXCHECK
1196 # if HAVE_RAW_DECL_HYPOTF
1197 _GL_WARN_ON_USE (hypotf
, "hypotf is unportable - "
1198 "use gnulib module hypotf for portability");
1202 /* Return sqrt(x^2+y^2). */
1204 # if @REPLACE_HYPOT@
1205 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1207 # define hypot rpl_hypot
1209 _GL_FUNCDECL_RPL (hypot
, double, (double x
, double y
));
1210 _GL_CXXALIAS_RPL (hypot
, double, (double x
, double y
));
1212 _GL_CXXALIAS_SYS (hypot
, double, (double x
, double y
));
1215 _GL_CXXALIASWARN1 (hypot
, double, (double x
, double y
));
1217 #elif defined GNULIB_POSIXCHECK
1219 # if HAVE_RAW_DECL_HYPOT
1220 _GL_WARN_ON_USE (hypotf
, "hypot has portability problems - "
1221 "use gnulib module hypot for portability");
1225 /* Return sqrt(x^2+y^2). */
1227 # if @REPLACE_HYPOTL@
1228 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1230 # define hypotl rpl_hypotl
1232 _GL_FUNCDECL_RPL (hypotl
, long double, (long double x
, long double y
));
1233 _GL_CXXALIAS_RPL (hypotl
, long double, (long double x
, long double y
));
1236 _GL_FUNCDECL_SYS (hypotl
, long double, (long double x
, long double y
));
1238 _GL_CXXALIAS_SYS (hypotl
, long double, (long double x
, long double y
));
1241 _GL_CXXALIASWARN (hypotl
);
1243 #elif defined GNULIB_POSIXCHECK
1245 # if HAVE_RAW_DECL_HYPOTL
1246 _GL_WARN_ON_USE (hypotl
, "hypotl is unportable - "
1247 "use gnulib module hypotl for portability");
1253 # if @REPLACE_ILOGBF@
1254 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1256 # define ilogbf rpl_ilogbf
1258 _GL_FUNCDECL_RPL (ilogbf
, int, (float x
));
1259 _GL_CXXALIAS_RPL (ilogbf
, int, (float x
));
1262 _GL_FUNCDECL_SYS (ilogbf
, int, (float x
));
1264 _GL_CXXALIAS_SYS (ilogbf
, int, (float x
));
1266 _GL_CXXALIASWARN (ilogbf
);
1267 #elif defined GNULIB_POSIXCHECK
1269 # if HAVE_RAW_DECL_ILOGBF
1270 _GL_WARN_ON_USE (ilogbf
, "ilogbf is unportable - "
1271 "use gnulib module ilogbf for portability");
1276 # if @REPLACE_ILOGB@
1277 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1279 # define ilogb rpl_ilogb
1281 _GL_FUNCDECL_RPL (ilogb
, int, (double x
));
1282 _GL_CXXALIAS_RPL (ilogb
, int, (double x
));
1285 _GL_FUNCDECL_SYS (ilogb
, int, (double x
));
1287 _GL_CXXALIAS_SYS (ilogb
, int, (double x
));
1290 _GL_CXXALIASWARN1 (ilogb
, int, (double x
));
1292 #elif defined GNULIB_POSIXCHECK
1294 # if HAVE_RAW_DECL_ILOGB
1295 _GL_WARN_ON_USE (ilogb
, "ilogb is unportable - "
1296 "use gnulib module ilogb for portability");
1301 # if @REPLACE_ILOGBL@
1302 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1304 # define ilogbl rpl_ilogbl
1306 _GL_FUNCDECL_RPL (ilogbl
, int, (long double x
));
1307 _GL_CXXALIAS_RPL (ilogbl
, int, (long double x
));
1310 _GL_FUNCDECL_SYS (ilogbl
, int, (long double x
));
1312 _GL_CXXALIAS_SYS (ilogbl
, int, (long double x
));
1314 _GL_CXXALIASWARN (ilogbl
);
1315 #elif defined GNULIB_POSIXCHECK
1317 # if HAVE_RAW_DECL_ILOGBL
1318 _GL_WARN_ON_USE (ilogbl
, "ilogbl is unportable - "
1319 "use gnulib module ilogbl for portability");
1324 #if defined _WIN32 && !defined __CYGWIN__
1329 #if defined _WIN32 && !defined __CYGWIN__
1334 #if defined _WIN32 && !defined __CYGWIN__
1340 /* Return x * 2^exp. */
1344 _GL_FUNCDECL_SYS (ldexpf
, float, (float x
, int exp
));
1346 _GL_CXXALIAS_SYS (ldexpf
, float, (float x
, int exp
));
1348 _GL_CXXALIASWARN (ldexpf
);
1350 #elif defined GNULIB_POSIXCHECK
1352 # if HAVE_RAW_DECL_LDEXPF
1353 _GL_WARN_ON_USE (ldexpf
, "ldexpf is unportable - "
1354 "use gnulib module ldexpf for portability");
1358 /* Return x * 2^exp. */
1359 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
1360 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1362 # define ldexpl rpl_ldexpl
1364 _GL_FUNCDECL_RPL (ldexpl
, long double, (long double x
, int exp
));
1365 _GL_CXXALIAS_RPL (ldexpl
, long double, (long double x
, int exp
));
1367 # if !@HAVE_DECL_LDEXPL@
1368 _GL_FUNCDECL_SYS (ldexpl
, long double, (long double x
, int exp
));
1370 # if @GNULIB_LDEXPL@
1371 _GL_CXXALIAS_SYS (ldexpl
, long double, (long double x
, int exp
));
1376 _GL_CXXALIASWARN (ldexpl
);
1379 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
1381 # if HAVE_RAW_DECL_LDEXPL
1382 _GL_WARN_ON_USE (ldexpl
, "ldexpl is unportable - "
1383 "use gnulib module ldexpl for portability");
1390 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1392 # define logf rpl_logf
1394 _GL_FUNCDECL_RPL (logf
, float, (float x
));
1395 _GL_CXXALIAS_RPL (logf
, float, (float x
));
1399 _GL_FUNCDECL_SYS (logf
, float, (float x
));
1401 _GL_CXXALIAS_SYS (logf
, float, (float x
));
1403 _GL_CXXALIASWARN (logf
);
1404 #elif defined GNULIB_POSIXCHECK
1406 # if HAVE_RAW_DECL_LOGF
1407 _GL_WARN_ON_USE (logf
, "logf is unportable - "
1408 "use gnulib module logf for portability");
1414 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1416 # define log rpl_log
1418 _GL_FUNCDECL_RPL (log
, double, (double x
));
1419 _GL_CXXALIAS_RPL (log
, double, (double x
));
1421 _GL_CXXALIAS_SYS (log
, double, (double x
));
1424 _GL_CXXALIASWARN1 (log
, double, (double x
));
1426 #elif defined GNULIB_POSIXCHECK
1428 # if HAVE_RAW_DECL_LOG
1429 _GL_WARN_ON_USE (log
, "log has portability problems - "
1430 "use gnulib module log for portability");
1436 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1438 # define logl rpl_logl
1440 _GL_FUNCDECL_RPL (logl
, long double, (long double x
));
1441 _GL_CXXALIAS_RPL (logl
, long double, (long double x
));
1443 # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
1445 _GL_FUNCDECL_SYS (logl
, long double, (long double x
));
1447 _GL_CXXALIAS_SYS (logl
, long double, (long double x
));
1450 _GL_CXXALIASWARN (logl
);
1452 #elif defined GNULIB_POSIXCHECK
1454 # if HAVE_RAW_DECL_LOGL
1455 _GL_WARN_ON_USE (logl
, "logl is unportable - "
1456 "use gnulib module logl for portability");
1462 # if @REPLACE_LOG10F@
1463 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1465 # define log10f rpl_log10f
1467 _GL_FUNCDECL_RPL (log10f
, float, (float x
));
1468 _GL_CXXALIAS_RPL (log10f
, float, (float x
));
1472 _GL_FUNCDECL_SYS (log10f
, float, (float x
));
1474 _GL_CXXALIAS_SYS (log10f
, float, (float x
));
1476 _GL_CXXALIASWARN (log10f
);
1477 #elif defined GNULIB_POSIXCHECK
1479 # if HAVE_RAW_DECL_LOG10F
1480 _GL_WARN_ON_USE (log10f
, "log10f is unportable - "
1481 "use gnulib module log10f for portability");
1486 # if @REPLACE_LOG10@
1487 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1489 # define log10 rpl_log10
1491 _GL_FUNCDECL_RPL (log10
, double, (double x
));
1492 _GL_CXXALIAS_RPL (log10
, double, (double x
));
1494 _GL_CXXALIAS_SYS (log10
, double, (double x
));
1497 _GL_CXXALIASWARN1 (log10
, double, (double x
));
1499 #elif defined GNULIB_POSIXCHECK
1501 # if HAVE_RAW_DECL_LOG10
1502 _GL_WARN_ON_USE (log10
, "log10 has portability problems - "
1503 "use gnulib module log10 for portability");
1508 # if @REPLACE_LOG10L@
1509 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1511 # define log10l rpl_log10l
1513 _GL_FUNCDECL_RPL (log10l
, long double, (long double x
));
1514 _GL_CXXALIAS_RPL (log10l
, long double, (long double x
));
1516 # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
1518 _GL_FUNCDECL_SYS (log10l
, long double, (long double x
));
1520 _GL_CXXALIAS_SYS (log10l
, long double, (long double x
));
1523 _GL_CXXALIASWARN (log10l
);
1525 #elif defined GNULIB_POSIXCHECK
1527 # if HAVE_RAW_DECL_LOG10L
1528 _GL_WARN_ON_USE (log10l
, "log10l is unportable - "
1529 "use gnulib module log10l for portability");
1535 # if @REPLACE_LOG1PF@
1536 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1538 # define log1pf rpl_log1pf
1540 _GL_FUNCDECL_RPL (log1pf
, float, (float x
));
1541 _GL_CXXALIAS_RPL (log1pf
, float, (float x
));
1544 _GL_FUNCDECL_SYS (log1pf
, float, (float x
));
1546 _GL_CXXALIAS_SYS (log1pf
, float, (float x
));
1548 _GL_CXXALIASWARN (log1pf
);
1549 #elif defined GNULIB_POSIXCHECK
1551 # if HAVE_RAW_DECL_LOG1PF
1552 _GL_WARN_ON_USE (log1pf
, "log1pf is unportable - "
1553 "use gnulib module log1pf for portability");
1558 # if @REPLACE_LOG1P@
1559 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1561 # define log1p rpl_log1p
1563 _GL_FUNCDECL_RPL (log1p
, double, (double x
));
1564 _GL_CXXALIAS_RPL (log1p
, double, (double x
));
1567 _GL_FUNCDECL_SYS (log1p
, double, (double x
));
1569 _GL_CXXALIAS_SYS (log1p
, double, (double x
));
1572 _GL_CXXALIASWARN1 (log1p
, double, (double x
));
1574 #elif defined GNULIB_POSIXCHECK
1576 # if HAVE_RAW_DECL_LOG1P
1577 _GL_WARN_ON_USE (log1p
, "log1p has portability problems - "
1578 "use gnulib module log1p for portability");
1583 # if @REPLACE_LOG1PL@
1584 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1586 # define log1pl rpl_log1pl
1588 _GL_FUNCDECL_RPL (log1pl
, long double, (long double x
));
1589 _GL_CXXALIAS_RPL (log1pl
, long double, (long double x
));
1592 _GL_FUNCDECL_SYS (log1pl
, long double, (long double x
));
1594 _GL_CXXALIAS_SYS (log1pl
, long double, (long double x
));
1596 _GL_CXXALIASWARN (log1pl
);
1597 #elif defined GNULIB_POSIXCHECK
1599 # if HAVE_RAW_DECL_LOG1PL
1600 _GL_WARN_ON_USE (log1pl
, "log1pl has portability problems - "
1601 "use gnulib module log1pl for portability");
1607 # if @REPLACE_LOG2F@
1608 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1610 # define log2f rpl_log2f
1612 _GL_FUNCDECL_RPL (log2f
, float, (float x
));
1613 _GL_CXXALIAS_RPL (log2f
, float, (float x
));
1615 # if !@HAVE_DECL_LOG2F@
1617 _GL_FUNCDECL_SYS (log2f
, float, (float x
));
1619 _GL_CXXALIAS_SYS (log2f
, float, (float x
));
1621 _GL_CXXALIASWARN (log2f
);
1622 #elif defined GNULIB_POSIXCHECK
1624 # if HAVE_RAW_DECL_LOG2F
1625 _GL_WARN_ON_USE (log2f
, "log2f is unportable - "
1626 "use gnulib module log2f for portability");
1632 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1634 # define log2 rpl_log2
1636 _GL_FUNCDECL_RPL (log2
, double, (double x
));
1637 _GL_CXXALIAS_RPL (log2
, double, (double x
));
1639 # if !@HAVE_DECL_LOG2@
1641 _GL_FUNCDECL_SYS (log2
, double, (double x
));
1643 _GL_CXXALIAS_SYS (log2
, double, (double x
));
1646 _GL_CXXALIASWARN1 (log2
, double, (double x
));
1648 #elif defined GNULIB_POSIXCHECK
1650 # if HAVE_RAW_DECL_LOG2
1651 _GL_WARN_ON_USE (log2
, "log2 is unportable - "
1652 "use gnulib module log2 for portability");
1657 # if @REPLACE_LOG2L@
1658 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1660 # define log2l rpl_log2l
1662 _GL_FUNCDECL_RPL (log2l
, long double, (long double x
));
1663 _GL_CXXALIAS_RPL (log2l
, long double, (long double x
));
1665 # if !@HAVE_DECL_LOG2L@
1666 _GL_FUNCDECL_SYS (log2l
, long double, (long double x
));
1668 _GL_CXXALIAS_SYS (log2l
, long double, (long double x
));
1670 _GL_CXXALIASWARN (log2l
);
1671 #elif defined GNULIB_POSIXCHECK
1673 # if HAVE_RAW_DECL_LOG2L
1674 _GL_WARN_ON_USE (log2l
, "log2l is unportable - "
1675 "use gnulib module log2l for portability");
1681 # if @REPLACE_LOGBF@
1682 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1684 # define logbf rpl_logbf
1686 _GL_FUNCDECL_RPL (logbf
, float, (float x
));
1687 _GL_CXXALIAS_RPL (logbf
, float, (float x
));
1690 _GL_FUNCDECL_SYS (logbf
, float, (float x
));
1692 _GL_CXXALIAS_SYS (logbf
, float, (float x
));
1694 _GL_CXXALIASWARN (logbf
);
1695 #elif defined GNULIB_POSIXCHECK
1697 # if HAVE_RAW_DECL_LOGBF
1698 _GL_WARN_ON_USE (logbf
, "logbf is unportable - "
1699 "use gnulib module logbf for portability");
1705 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1707 # define logb rpl_logb
1709 _GL_FUNCDECL_RPL (logb
, double, (double x
));
1710 _GL_CXXALIAS_RPL (logb
, double, (double x
));
1712 # if !@HAVE_DECL_LOGB@
1713 _GL_FUNCDECL_SYS (logb
, double, (double x
));
1715 _GL_CXXALIAS_SYS (logb
, double, (double x
));
1718 _GL_CXXALIASWARN1 (logb
, double, (double x
));
1720 #elif defined GNULIB_POSIXCHECK
1722 # if HAVE_RAW_DECL_LOGB
1723 _GL_WARN_ON_USE (logb
, "logb is unportable - "
1724 "use gnulib module logb for portability");
1729 # if @REPLACE_LOGBL@
1730 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1732 # define logbl rpl_logbl
1734 _GL_FUNCDECL_RPL (logbl
, long double, (long double x
));
1735 _GL_CXXALIAS_RPL (logbl
, long double, (long double x
));
1738 _GL_FUNCDECL_SYS (logbl
, long double, (long double x
));
1740 _GL_CXXALIAS_SYS (logbl
, long double, (long double x
));
1742 _GL_CXXALIASWARN (logbl
);
1743 #elif defined GNULIB_POSIXCHECK
1745 # if HAVE_RAW_DECL_LOGBL
1746 _GL_WARN_ON_USE (logbl
, "logbl is unportable - "
1747 "use gnulib module logbl for portability");
1753 # if @REPLACE_MODFF@
1754 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1756 # define modff rpl_modff
1758 _GL_FUNCDECL_RPL (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1759 _GL_CXXALIAS_RPL (modff
, float, (float x
, float *iptr
));
1763 _GL_FUNCDECL_SYS (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1765 _GL_CXXALIAS_SYS (modff
, float, (float x
, float *iptr
));
1767 _GL_CXXALIASWARN (modff
);
1768 #elif defined GNULIB_POSIXCHECK
1770 # if HAVE_RAW_DECL_MODFF
1771 _GL_WARN_ON_USE (modff
, "modff is unportable - "
1772 "use gnulib module modff for portability");
1778 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1780 # define modf rpl_modf
1782 _GL_FUNCDECL_RPL (modf
, double, (double x
, double *iptr
) _GL_ARG_NONNULL ((2)));
1783 _GL_CXXALIAS_RPL (modf
, double, (double x
, double *iptr
));
1785 _GL_CXXALIAS_SYS (modf
, double, (double x
, double *iptr
));
1788 _GL_CXXALIASWARN1 (modf
, double, (double x
, double *iptr
));
1790 #elif defined GNULIB_POSIXCHECK
1792 # if HAVE_RAW_DECL_MODF
1793 _GL_WARN_ON_USE (modf
, "modf has portability problems - "
1794 "use gnulib module modf for portability");
1799 # if @REPLACE_MODFL@
1800 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1802 # define modfl rpl_modfl
1804 _GL_FUNCDECL_RPL (modfl
, long double, (long double x
, long double *iptr
)
1805 _GL_ARG_NONNULL ((2)));
1806 _GL_CXXALIAS_RPL (modfl
, long double, (long double x
, long double *iptr
));
1810 _GL_FUNCDECL_SYS (modfl
, long double, (long double x
, long double *iptr
)
1811 _GL_ARG_NONNULL ((2)));
1813 _GL_CXXALIAS_SYS (modfl
, long double, (long double x
, long double *iptr
));
1816 _GL_CXXALIASWARN (modfl
);
1818 #elif defined GNULIB_POSIXCHECK
1820 # if HAVE_RAW_DECL_MODFL
1821 _GL_WARN_ON_USE (modfl
, "modfl is unportable - "
1822 "use gnulib module modfl for portability");
1830 _GL_FUNCDECL_SYS (powf
, float, (float x
, float y
));
1832 _GL_CXXALIAS_SYS (powf
, float, (float x
, float y
));
1833 _GL_CXXALIASWARN (powf
);
1834 #elif defined GNULIB_POSIXCHECK
1836 # if HAVE_RAW_DECL_POWF
1837 _GL_WARN_ON_USE (powf
, "powf is unportable - "
1838 "use gnulib module powf for portability");
1843 #if @GNULIB_REMAINDERF@
1844 # if @REPLACE_REMAINDERF@
1845 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1847 # define remainderf rpl_remainderf
1849 _GL_FUNCDECL_RPL (remainderf
, float, (float x
, float y
));
1850 _GL_CXXALIAS_RPL (remainderf
, float, (float x
, float y
));
1852 # if !@HAVE_REMAINDERF@
1853 _GL_FUNCDECL_SYS (remainderf
, float, (float x
, float y
));
1855 _GL_CXXALIAS_SYS (remainderf
, float, (float x
, float y
));
1857 _GL_CXXALIASWARN (remainderf
);
1858 #elif defined GNULIB_POSIXCHECK
1860 # if HAVE_RAW_DECL_REMAINDERF
1861 _GL_WARN_ON_USE (remainderf
, "remainderf is unportable - "
1862 "use gnulib module remainderf for portability");
1866 #if @GNULIB_REMAINDER@
1867 # if @REPLACE_REMAINDER@
1868 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1870 # define remainder rpl_remainder
1872 _GL_FUNCDECL_RPL (remainder
, double, (double x
, double y
));
1873 _GL_CXXALIAS_RPL (remainder
, double, (double x
, double y
));
1875 # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
1876 _GL_FUNCDECL_SYS (remainder
, double, (double x
, double y
));
1878 _GL_CXXALIAS_SYS (remainder
, double, (double x
, double y
));
1881 _GL_CXXALIASWARN1 (remainder
, double, (double x
, double y
));
1883 #elif defined GNULIB_POSIXCHECK
1885 # if HAVE_RAW_DECL_REMAINDER
1886 _GL_WARN_ON_USE (remainder
, "remainder is unportable - "
1887 "use gnulib module remainder for portability");
1891 #if @GNULIB_REMAINDERL@
1892 # if @REPLACE_REMAINDERL@
1893 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1895 # define remainderl rpl_remainderl
1897 _GL_FUNCDECL_RPL (remainderl
, long double, (long double x
, long double y
));
1898 _GL_CXXALIAS_RPL (remainderl
, long double, (long double x
, long double y
));
1900 # if !@HAVE_DECL_REMAINDERL@
1902 # if !(defined __cplusplus && defined _AIX)
1903 _GL_FUNCDECL_SYS (remainderl
, long double, (long double x
, long double y
));
1906 _GL_CXXALIAS_SYS (remainderl
, long double, (long double x
, long double y
));
1908 _GL_CXXALIASWARN (remainderl
);
1909 #elif defined GNULIB_POSIXCHECK
1911 # if HAVE_RAW_DECL_REMAINDERL
1912 _GL_WARN_ON_USE (remainderl
, "remainderl is unportable - "
1913 "use gnulib module remainderl for portability");
1919 # if !@HAVE_DECL_RINTF@
1920 _GL_FUNCDECL_SYS (rintf
, float, (float x
));
1922 _GL_CXXALIAS_SYS (rintf
, float, (float x
));
1923 _GL_CXXALIASWARN (rintf
);
1924 #elif defined GNULIB_POSIXCHECK
1926 # if HAVE_RAW_DECL_RINTF
1927 _GL_WARN_ON_USE (rintf
, "rintf is unportable - "
1928 "use gnulib module rintf for portability");
1934 _GL_FUNCDECL_SYS (rint
, double, (double x
));
1936 _GL_CXXALIAS_SYS (rint
, double, (double x
));
1938 _GL_CXXALIASWARN1 (rint
, double, (double x
));
1940 #elif defined GNULIB_POSIXCHECK
1942 # if HAVE_RAW_DECL_RINT
1943 _GL_WARN_ON_USE (rint
, "rint is unportable - "
1944 "use gnulib module rint for portability");
1949 # if @REPLACE_RINTL@
1950 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1952 # define rintl rpl_rintl
1954 _GL_FUNCDECL_RPL (rintl
, long double, (long double x
));
1955 _GL_CXXALIAS_RPL (rintl
, long double, (long double x
));
1958 _GL_FUNCDECL_SYS (rintl
, long double, (long double x
));
1960 _GL_CXXALIAS_SYS (rintl
, long double, (long double x
));
1962 _GL_CXXALIASWARN (rintl
);
1963 #elif defined GNULIB_POSIXCHECK
1965 # if HAVE_RAW_DECL_RINTL
1966 _GL_WARN_ON_USE (rintl
, "rintl is unportable - "
1967 "use gnulib module rintl for portability");
1973 # if @REPLACE_ROUNDF@
1974 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1976 # define roundf rpl_roundf
1978 _GL_FUNCDECL_RPL (roundf
, float, (float x
));
1979 _GL_CXXALIAS_RPL (roundf
, float, (float x
));
1981 # if !@HAVE_DECL_ROUNDF@
1982 _GL_FUNCDECL_SYS (roundf
, float, (float x
));
1984 _GL_CXXALIAS_SYS (roundf
, float, (float x
));
1986 _GL_CXXALIASWARN (roundf
);
1987 #elif defined GNULIB_POSIXCHECK
1989 # if HAVE_RAW_DECL_ROUNDF
1990 _GL_WARN_ON_USE (roundf
, "roundf is unportable - "
1991 "use gnulib module roundf for portability");
1996 # if @REPLACE_ROUND@
1997 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1999 # define round rpl_round
2001 _GL_FUNCDECL_RPL (round
, double, (double x
));
2002 _GL_CXXALIAS_RPL (round
, double, (double x
));
2004 # if !@HAVE_DECL_ROUND@
2005 _GL_FUNCDECL_SYS (round
, double, (double x
));
2007 _GL_CXXALIAS_SYS (round
, double, (double x
));
2010 _GL_CXXALIASWARN1 (round
, double, (double x
));
2012 #elif defined GNULIB_POSIXCHECK
2014 # if HAVE_RAW_DECL_ROUND
2015 _GL_WARN_ON_USE (round
, "round is unportable - "
2016 "use gnulib module round for portability");
2021 # if @REPLACE_ROUNDL@
2022 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2024 # define roundl rpl_roundl
2026 _GL_FUNCDECL_RPL (roundl
, long double, (long double x
));
2027 _GL_CXXALIAS_RPL (roundl
, long double, (long double x
));
2029 # if !@HAVE_DECL_ROUNDL@
2031 # if !(defined __cplusplus && defined _AIX)
2032 _GL_FUNCDECL_SYS (roundl
, long double, (long double x
));
2035 _GL_CXXALIAS_SYS (roundl
, long double, (long double x
));
2037 _GL_CXXALIASWARN (roundl
);
2038 #elif defined GNULIB_POSIXCHECK
2040 # if HAVE_RAW_DECL_ROUNDL
2041 _GL_WARN_ON_USE (roundl
, "roundl is unportable - "
2042 "use gnulib module roundl for portability");
2049 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2051 # define sinf rpl_sinf
2053 _GL_FUNCDECL_RPL (sinf
, float, (float x
));
2054 _GL_CXXALIAS_RPL (sinf
, float, (float x
));
2058 _GL_FUNCDECL_SYS (sinf
, float, (float x
));
2060 _GL_CXXALIAS_SYS (sinf
, float, (float x
));
2062 _GL_CXXALIASWARN (sinf
);
2063 #elif defined GNULIB_POSIXCHECK
2065 # if HAVE_RAW_DECL_SINF
2066 _GL_WARN_ON_USE (sinf
, "sinf is unportable - "
2067 "use gnulib module sinf for portability");
2072 # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
2074 _GL_FUNCDECL_SYS (sinl
, long double, (long double x
));
2076 _GL_CXXALIAS_SYS (sinl
, long double, (long double x
));
2078 _GL_CXXALIASWARN (sinl
);
2080 #elif defined GNULIB_POSIXCHECK
2082 # if HAVE_RAW_DECL_SINL
2083 _GL_WARN_ON_USE (sinl
, "sinl is unportable - "
2084 "use gnulib module sinl for portability");
2090 # if @REPLACE_SINHF@
2091 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2093 # define sinhf rpl_sinhf
2095 _GL_FUNCDECL_RPL (sinhf
, float, (float x
));
2096 _GL_CXXALIAS_RPL (sinhf
, float, (float x
));
2100 _GL_FUNCDECL_SYS (sinhf
, float, (float x
));
2102 _GL_CXXALIAS_SYS (sinhf
, float, (float x
));
2104 _GL_CXXALIASWARN (sinhf
);
2105 #elif defined GNULIB_POSIXCHECK
2107 # if HAVE_RAW_DECL_SINHF
2108 _GL_WARN_ON_USE (sinhf
, "sinhf is unportable - "
2109 "use gnulib module sinhf for portability");
2115 # if @REPLACE_SQRTF@
2116 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2118 # define sqrtf rpl_sqrtf
2120 _GL_FUNCDECL_RPL (sqrtf
, float, (float x
));
2121 _GL_CXXALIAS_RPL (sqrtf
, float, (float x
));
2125 _GL_FUNCDECL_SYS (sqrtf
, float, (float x
));
2127 _GL_CXXALIAS_SYS (sqrtf
, float, (float x
));
2129 _GL_CXXALIASWARN (sqrtf
);
2130 #elif defined GNULIB_POSIXCHECK
2132 # if HAVE_RAW_DECL_SQRTF
2133 _GL_WARN_ON_USE (sqrtf
, "sqrtf is unportable - "
2134 "use gnulib module sqrtf for portability");
2139 # if @REPLACE_SQRTL@
2140 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2142 # define sqrtl rpl_sqrtl
2144 _GL_FUNCDECL_RPL (sqrtl
, long double, (long double x
));
2145 _GL_CXXALIAS_RPL (sqrtl
, long double, (long double x
));
2147 # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
2149 _GL_FUNCDECL_SYS (sqrtl
, long double, (long double x
));
2151 _GL_CXXALIAS_SYS (sqrtl
, long double, (long double x
));
2154 _GL_CXXALIASWARN (sqrtl
);
2156 #elif defined GNULIB_POSIXCHECK
2158 # if HAVE_RAW_DECL_SQRTL
2159 _GL_WARN_ON_USE (sqrtl
, "sqrtl is unportable - "
2160 "use gnulib module sqrtl for portability");
2167 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2169 # define tanf rpl_tanf
2171 _GL_FUNCDECL_RPL (tanf
, float, (float x
));
2172 _GL_CXXALIAS_RPL (tanf
, float, (float x
));
2176 _GL_FUNCDECL_SYS (tanf
, float, (float x
));
2178 _GL_CXXALIAS_SYS (tanf
, float, (float x
));
2180 _GL_CXXALIASWARN (tanf
);
2181 #elif defined GNULIB_POSIXCHECK
2183 # if HAVE_RAW_DECL_TANF
2184 _GL_WARN_ON_USE (tanf
, "tanf is unportable - "
2185 "use gnulib module tanf for portability");
2190 # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
2192 _GL_FUNCDECL_SYS (tanl
, long double, (long double x
));
2194 _GL_CXXALIAS_SYS (tanl
, long double, (long double x
));
2196 _GL_CXXALIASWARN (tanl
);
2198 #elif defined GNULIB_POSIXCHECK
2200 # if HAVE_RAW_DECL_TANL
2201 _GL_WARN_ON_USE (tanl
, "tanl is unportable - "
2202 "use gnulib module tanl for portability");
2208 # if @REPLACE_TANHF@
2209 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2211 # define tanhf rpl_tanhf
2213 _GL_FUNCDECL_RPL (tanhf
, float, (float x
));
2214 _GL_CXXALIAS_RPL (tanhf
, float, (float x
));
2218 _GL_FUNCDECL_SYS (tanhf
, float, (float x
));
2220 _GL_CXXALIAS_SYS (tanhf
, float, (float x
));
2222 _GL_CXXALIASWARN (tanhf
);
2223 #elif defined GNULIB_POSIXCHECK
2225 # if HAVE_RAW_DECL_TANHF
2226 _GL_WARN_ON_USE (tanhf
, "tanhf is unportable - "
2227 "use gnulib module tanhf for portability");
2233 # if @REPLACE_TRUNCF@
2234 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2236 # define truncf rpl_truncf
2238 _GL_FUNCDECL_RPL (truncf
, float, (float x
));
2239 _GL_CXXALIAS_RPL (truncf
, float, (float x
));
2241 # if !@HAVE_DECL_TRUNCF@
2242 _GL_FUNCDECL_SYS (truncf
, float, (float x
));
2244 _GL_CXXALIAS_SYS (truncf
, float, (float x
));
2246 _GL_CXXALIASWARN (truncf
);
2247 #elif defined GNULIB_POSIXCHECK
2249 # if HAVE_RAW_DECL_TRUNCF
2250 _GL_WARN_ON_USE (truncf
, "truncf is unportable - "
2251 "use gnulib module truncf for portability");
2256 # if @REPLACE_TRUNC@
2257 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2259 # define trunc rpl_trunc
2261 _GL_FUNCDECL_RPL (trunc
, double, (double x
));
2262 _GL_CXXALIAS_RPL (trunc
, double, (double x
));
2264 # if !@HAVE_DECL_TRUNC@
2265 _GL_FUNCDECL_SYS (trunc
, double, (double x
));
2267 _GL_CXXALIAS_SYS (trunc
, double, (double x
));
2270 _GL_CXXALIASWARN1 (trunc
, double, (double x
));
2272 #elif defined GNULIB_POSIXCHECK
2274 # if HAVE_RAW_DECL_TRUNC
2275 _GL_WARN_ON_USE (trunc
, "trunc is unportable - "
2276 "use gnulib module trunc for portability");
2281 # if @REPLACE_TRUNCL@
2282 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2284 # define truncl rpl_truncl
2286 _GL_FUNCDECL_RPL (truncl
, long double, (long double x
));
2287 _GL_CXXALIAS_RPL (truncl
, long double, (long double x
));
2289 # if !@HAVE_DECL_TRUNCL@
2290 _GL_FUNCDECL_SYS (truncl
, long double, (long double x
));
2292 _GL_CXXALIAS_SYS (truncl
, long double, (long double x
));
2294 _GL_CXXALIASWARN (truncl
);
2295 #elif defined GNULIB_POSIXCHECK
2297 # if HAVE_RAW_DECL_TRUNCL
2298 _GL_WARN_ON_USE (truncl
, "truncl is unportable - "
2299 "use gnulib module truncl for portability");
2304 #if defined _WIN32 && !defined __CYGWIN__
2309 #if defined _WIN32 && !defined __CYGWIN__
2314 #if defined _WIN32 && !defined __CYGWIN__
2320 /* Definitions of function-like macros come here, after the function
2324 #if @GNULIB_ISFINITE@
2325 # if @REPLACE_ISFINITE@
2326 _GL_EXTERN_C
int gl_isfinitef (float x
);
2327 _GL_EXTERN_C
int gl_isfinited (double x
);
2328 _GL_EXTERN_C
int gl_isfinitel (long double x
);
2330 # define isfinite(x) \
2331 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
2332 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
2336 # if defined isfinite || defined GNULIB_NAMESPACE
2337 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite
)
2339 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__)))
2340 /* This platform's <cmath> possibly defines isfinite through a set of inline
2342 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
, rpl_isfinite
, bool)
2343 # define isfinite rpl_isfinite
2345 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
, isfinite
, bool)
2349 #elif defined GNULIB_POSIXCHECK
2350 # if defined isfinite
2351 _GL_WARN_REAL_FLOATING_DECL (isfinite
);
2353 # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
2359 # if @REPLACE_ISINF@
2360 _GL_EXTERN_C
int gl_isinff (float x
);
2361 _GL_EXTERN_C
int gl_isinfd (double x
);
2362 _GL_EXTERN_C
int gl_isinfl (long double x
);
2365 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
2366 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
2370 # if defined isinf || defined GNULIB_NAMESPACE
2371 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf
)
2373 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__)))
2374 /* This platform's <cmath> possibly defines isinf through a set of inline
2376 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
, rpl_isinf
, bool)
2377 # define isinf rpl_isinf
2379 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
, isinf
, bool)
2383 #elif defined GNULIB_POSIXCHECK
2385 _GL_WARN_REAL_FLOATING_DECL (isinf
);
2387 # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
2393 /* Test for NaN for 'float' numbers. */
2395 /* The original <math.h> included above provides a declaration of isnan macro
2396 or (older) isnanf function. */
2397 # if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2398 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.
2399 GCC >= 4.0 also provides __builtin_isnanf, but clang doesn't. */
2401 # define isnanf(x) __builtin_isnan ((float)(x))
2402 # elif defined isnan
2404 # define isnanf(x) isnan ((float)(x))
2407 /* Test whether X is a NaN. */
2409 # define isnanf rpl_isnanf
2410 _GL_EXTERN_C
int isnanf (float x
);
2415 /* Test for NaN for 'double' numbers.
2416 This function is a gnulib extension, unlike isnan() which applied only
2417 to 'double' numbers earlier but now is a type-generic macro. */
2419 /* The original <math.h> included above provides a declaration of isnan
2421 # if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2422 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. */
2424 # define isnand(x) __builtin_isnan ((double)(x))
2427 # define isnand(x) isnan ((double)(x))
2430 /* Test whether X is a NaN. */
2432 # define isnand rpl_isnand
2433 _GL_EXTERN_C
int isnand (double x
);
2438 /* Test for NaN for 'long double' numbers. */
2440 /* The original <math.h> included above provides a declaration of isnan
2441 macro or (older) isnanl function. */
2442 # if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2443 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.
2444 GCC >= 4.0 also provides __builtin_isnanl, but clang doesn't. */
2446 # define isnanl(x) __builtin_isnan ((long double)(x))
2447 # elif defined isnan
2449 # define isnanl(x) isnan ((long double)(x))
2452 /* Test whether X is a NaN. */
2454 # define isnanl rpl_isnanl
2455 _GL_EXTERN_C
int isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2459 /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
2461 # if @REPLACE_ISNAN@
2462 /* We can't just use the isnanf macro (e.g.) as exposed by
2463 isnanf.h (e.g.) here, because those may end up being macros
2464 that recursively expand back to isnan. So use the gnulib
2465 replacements for them directly. */
2466 # if @HAVE_ISNANF@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2467 # define gl_isnan_f(x) __builtin_isnan ((float)(x))
2469 _GL_EXTERN_C
int rpl_isnanf (float x
);
2470 # define gl_isnan_f(x) rpl_isnanf (x)
2472 # if @HAVE_ISNAND@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2473 # define gl_isnan_d(x) __builtin_isnan ((double)(x))
2475 _GL_EXTERN_C
int rpl_isnand (double x
);
2476 # define gl_isnan_d(x) rpl_isnand (x)
2478 # if @HAVE_ISNANL@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2479 # define gl_isnan_l(x) __builtin_isnan ((long double)(x))
2481 _GL_EXTERN_C
int rpl_isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2482 # define gl_isnan_l(x) rpl_isnanl (x)
2486 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
2487 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
2489 # elif (__GNUC__ >= 4) || (__clang_major__ >= 4)
2492 (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \
2493 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
2494 __builtin_isnan ((float)(x)))
2497 # if defined isnan || defined GNULIB_NAMESPACE
2498 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan
)
2500 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__)))
2501 /* This platform's <cmath> possibly defines isnan through a set of inline
2503 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
, rpl_isnan
, bool)
2504 # define isnan rpl_isnan
2506 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
, isnan
, bool)
2510 /* Ensure isnan is a macro. */
2512 # define isnan isnan
2515 #elif defined GNULIB_POSIXCHECK
2517 _GL_WARN_REAL_FLOATING_DECL (isnan
);
2519 # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
2524 #if @GNULIB_SIGNBIT@
2525 # if (@REPLACE_SIGNBIT_USING_BUILTINS@ \
2526 && (!defined __cplusplus || __cplusplus < 201103))
2528 /* GCC >= 4.0 and clang provide three built-ins for signbit. */
2529 # define signbit(x) \
2530 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
2531 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
2532 __builtin_signbitf (x))
2534 # if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit
2536 _GL_EXTERN_C
int gl_signbitf (float arg
);
2537 _GL_EXTERN_C
int gl_signbitd (double arg
);
2538 _GL_EXTERN_C
int gl_signbitl (long double arg
);
2539 # if (__GNUC__ >= 2 || defined __clang__) && !defined __STRICT_ANSI__
2540 # define _GL_NUM_UINT_WORDS(type) \
2541 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
2542 # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
2543 # define gl_signbitf_OPTIMIZED_MACRO
2544 # define gl_signbitf(arg) \
2545 ({ union { float _value; \
2546 unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
2548 _m._value = (arg); \
2549 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
2552 # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
2553 # define gl_signbitd_OPTIMIZED_MACRO
2554 # define gl_signbitd(arg) \
2555 ({ union { double _value; \
2556 unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
2558 _m._value = (arg); \
2559 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
2562 # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
2563 # define gl_signbitl_OPTIMIZED_MACRO
2564 # define gl_signbitl(arg) \
2565 ({ union { long double _value; \
2566 unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
2568 _m._value = (arg); \
2569 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
2573 # define signbit(x) \
2574 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
2575 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
2577 # define GNULIB_defined_signbit 1
2580 # if defined signbit || defined GNULIB_NAMESPACE
2581 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit
)
2583 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__)))
2584 /* This platform's <cmath> possibly defines signbit through a set of inline
2586 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
, rpl_signbit
, bool)
2587 # define signbit rpl_signbit
2589 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
, signbit
, bool)
2593 #elif defined GNULIB_POSIXCHECK
2594 # if defined signbit
2595 _GL_WARN_REAL_FLOATING_DECL (signbit
);
2597 # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
2601 _GL_INLINE_HEADER_END
2603 #endif /* _@GUARD_PREFIX@_MATH_H */
2604 #endif /* _@GUARD_PREFIX@_MATH_H */