1 /* A GNU-like <math.h>.
3 Copyright (C) 2002-2003, 2007-2021 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 #if defined _GL_INCLUDING_MATH_H
26 /* Special invocation convention:
27 - On FreeBSD 12.2 we have a sequence of nested includes
28 <math.h> -> <stdlib.h> -> <sys/wait.h> -> <sys/types.h> -> <sys/select.h>
29 -> <signal.h> -> <pthread.h> -> <stdlib.h> -> <math.h>
30 In this situation, the functions are not yet declared, therefore we cannot
31 provide the C++ aliases. */
33 #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
36 /* Normal invocation convention. */
38 /* The include_next requires a split double-inclusion guard. */
39 #define _GL_INCLUDING_MATH_H
40 #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
41 #undef _GL_INCLUDING_MATH_H
43 #ifndef _@GUARD_PREFIX@_MATH_H
44 #define _@GUARD_PREFIX@_MATH_H
46 /* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in <fp.h>. */
47 #if defined __VMS && ! defined NAN
51 #ifndef _GL_INLINE_HEADER_BEGIN
52 #error "Please include config.h first."
54 _GL_INLINE_HEADER_BEGIN
55 #ifndef _GL_MATH_INLINE
56 # define _GL_MATH_INLINE _GL_INLINE
59 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
61 /* The definition of _GL_ARG_NONNULL is copied here. */
63 /* The definition of _GL_WARN_ON_USE is copied here. */
66 /* Helper macros to define type-generic function FUNC as overloaded functions,
67 rather than as macros like in C. POSIX declares these with an argument of
68 real-floating (that is, one of float, double, or long double). */
69 # define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \
71 _gl_cxx_ ## func ## f (float f) \
76 _gl_cxx_ ## func ## d (double d) \
81 _gl_cxx_ ## func ## l (long double l) \
85 # define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \
90 return _gl_cxx_ ## func ## f (f); \
95 return _gl_cxx_ ## func ## d (d); \
98 rpl_func (long double l) \
100 return _gl_cxx_ ## func ## l (l); \
105 /* Helper macros to define a portability warning for the
106 classification macro FUNC called with VALUE. POSIX declares the
107 classification macros with an argument of real-floating (that is,
108 one of float, double, or long double). */
109 #define _GL_WARN_REAL_FLOATING_DECL(func) \
110 _GL_MATH_INLINE int \
111 _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
112 "use gnulib module " #func " for portability") \
113 rpl_ ## func ## f (float f) \
117 _GL_MATH_INLINE int \
118 _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
119 "use gnulib module " #func " for portability") \
120 rpl_ ## func ## d (double d) \
124 _GL_MATH_INLINE int \
125 _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
126 "use gnulib module " #func " for portability") \
127 rpl_ ## func ## l (long double l) \
131 #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
132 (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \
133 : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \
134 : rpl_ ## func ## l (value))
138 /* Pull in a function that fixes the 'int' to 'long double' conversion
140 _GL_EXTERN_C
void _Qp_itoq (long double *, int);
141 static void (*_gl_math_fix_itold
) (long double *, int) = _Qp_itoq
;
145 /* POSIX allows platforms that don't support NAN. But all major
146 machines in the past 15 years have supported something close to
147 IEEE NaN, so we define this unconditionally. We also must define
148 it on platforms like Solaris 10, where NAN is present but defined
149 as a function pointer rather than a floating point constant. */
150 #if !defined NAN || @REPLACE_NAN@
151 # if !GNULIB_defined_NAN
153 /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
154 choke on the expression 0.0 / 0.0. */
155 # if defined __DECC || defined _MSC_VER
156 _GL_MATH_INLINE
float
159 static float zero
= 0.0f
;
162 # define NAN (_NaN())
164 # define NAN (0.0f / 0.0f)
166 # define GNULIB_defined_NAN 1
170 /* Solaris 10 defines HUGE_VAL, but as a function pointer rather
171 than a floating point constant. */
172 #if @REPLACE_HUGE_VAL@
174 # define HUGE_VALF (1.0f / 0.0f)
176 # define HUGE_VAL (1.0 / 0.0)
178 # define HUGE_VALL (1.0L / 0.0L)
181 /* HUGE_VALF is a 'float' Infinity. */
183 # if defined _MSC_VER
184 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
185 # define HUGE_VALF (1e25f * 1e25f)
187 # define HUGE_VALF (1.0f / 0.0f)
191 /* HUGE_VAL is a 'double' Infinity. */
193 # if defined _MSC_VER
194 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
195 # define HUGE_VAL (1e250 * 1e250)
197 # define HUGE_VAL (1.0 / 0.0)
201 /* HUGE_VALL is a 'long double' Infinity. */
203 # if defined _MSC_VER
204 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
205 # define HUGE_VALL (1e250L * 1e250L)
207 # define HUGE_VALL (1.0L / 0.0L)
212 #if defined FP_ILOGB0 && defined FP_ILOGBNAN
213 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */
214 # if defined __HAIKU__
215 /* Haiku: match what ilogb() does */
218 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
219 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
222 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
223 # if defined __NetBSD__ || defined __sgi
224 /* NetBSD, IRIX 6.5: match what ilogb() does */
225 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
226 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
228 /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
229 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
230 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
232 /* Solaris 9: match what ilogb() does */
233 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
234 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
236 /* Gnulib defined values. */
237 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
238 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
245 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
247 # define acosf rpl_acosf
249 _GL_FUNCDECL_RPL (acosf
, float, (float x
));
250 _GL_CXXALIAS_RPL (acosf
, float, (float x
));
254 _GL_FUNCDECL_SYS (acosf
, float, (float x
));
256 _GL_CXXALIAS_SYS (acosf
, float, (float x
));
258 _GL_CXXALIASWARN (acosf
);
259 #elif defined GNULIB_POSIXCHECK
261 # if HAVE_RAW_DECL_ACOSF
262 _GL_WARN_ON_USE (acosf
, "acosf is unportable - "
263 "use gnulib module acosf for portability");
268 # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
270 _GL_FUNCDECL_SYS (acosl
, long double, (long double x
));
272 _GL_CXXALIAS_SYS (acosl
, long double, (long double x
));
274 _GL_CXXALIASWARN (acosl
);
276 #elif defined GNULIB_POSIXCHECK
278 # if HAVE_RAW_DECL_ACOSL
279 _GL_WARN_ON_USE (acosl
, "acosl is unportable - "
280 "use gnulib module acosl for portability");
287 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
289 # define asinf rpl_asinf
291 _GL_FUNCDECL_RPL (asinf
, float, (float x
));
292 _GL_CXXALIAS_RPL (asinf
, float, (float x
));
296 _GL_FUNCDECL_SYS (asinf
, float, (float x
));
298 _GL_CXXALIAS_SYS (asinf
, float, (float x
));
300 _GL_CXXALIASWARN (asinf
);
301 #elif defined GNULIB_POSIXCHECK
303 # if HAVE_RAW_DECL_ASINF
304 _GL_WARN_ON_USE (asinf
, "asinf is unportable - "
305 "use gnulib module asinf for portability");
310 # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
312 _GL_FUNCDECL_SYS (asinl
, long double, (long double x
));
314 _GL_CXXALIAS_SYS (asinl
, long double, (long double x
));
316 _GL_CXXALIASWARN (asinl
);
318 #elif defined GNULIB_POSIXCHECK
320 # if HAVE_RAW_DECL_ASINL
321 _GL_WARN_ON_USE (asinl
, "asinl is unportable - "
322 "use gnulib module asinl for portability");
329 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
331 # define atanf rpl_atanf
333 _GL_FUNCDECL_RPL (atanf
, float, (float x
));
334 _GL_CXXALIAS_RPL (atanf
, float, (float x
));
338 _GL_FUNCDECL_SYS (atanf
, float, (float x
));
340 _GL_CXXALIAS_SYS (atanf
, float, (float x
));
342 _GL_CXXALIASWARN (atanf
);
343 #elif defined GNULIB_POSIXCHECK
345 # if HAVE_RAW_DECL_ATANF
346 _GL_WARN_ON_USE (atanf
, "atanf is unportable - "
347 "use gnulib module atanf for portability");
352 # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
354 _GL_FUNCDECL_SYS (atanl
, long double, (long double x
));
356 _GL_CXXALIAS_SYS (atanl
, long double, (long double x
));
358 _GL_CXXALIASWARN (atanl
);
360 #elif defined GNULIB_POSIXCHECK
362 # if HAVE_RAW_DECL_ATANL
363 _GL_WARN_ON_USE (atanl
, "atanl is unportable - "
364 "use gnulib module atanl for portability");
370 # if @REPLACE_ATAN2F@
371 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
373 # define atan2f rpl_atan2f
375 _GL_FUNCDECL_RPL (atan2f
, float, (float y
, float x
));
376 _GL_CXXALIAS_RPL (atan2f
, float, (float y
, float x
));
380 _GL_FUNCDECL_SYS (atan2f
, float, (float y
, float x
));
382 _GL_CXXALIAS_SYS (atan2f
, float, (float y
, float x
));
384 _GL_CXXALIASWARN (atan2f
);
385 #elif defined GNULIB_POSIXCHECK
387 # if HAVE_RAW_DECL_ATAN2F
388 _GL_WARN_ON_USE (atan2f
, "atan2f is unportable - "
389 "use gnulib module atan2f for portability");
396 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
398 # define cbrtf rpl_cbrtf
400 _GL_FUNCDECL_RPL (cbrtf
, float, (float x
));
401 _GL_CXXALIAS_RPL (cbrtf
, float, (float x
));
403 # if !@HAVE_DECL_CBRTF@
404 _GL_FUNCDECL_SYS (cbrtf
, float, (float x
));
406 _GL_CXXALIAS_SYS (cbrtf
, float, (float x
));
408 _GL_CXXALIASWARN (cbrtf
);
409 #elif defined GNULIB_POSIXCHECK
411 # if HAVE_RAW_DECL_CBRTF
412 _GL_WARN_ON_USE (cbrtf
, "cbrtf is unportable - "
413 "use gnulib module cbrtf for portability");
419 _GL_FUNCDECL_SYS (cbrt
, double, (double x
));
421 _GL_CXXALIAS_SYS (cbrt
, double, (double x
));
423 _GL_CXXALIASWARN1 (cbrt
, double, (double x
));
425 #elif defined GNULIB_POSIXCHECK
427 # if HAVE_RAW_DECL_CBRT
428 _GL_WARN_ON_USE (cbrt
, "cbrt is unportable - "
429 "use gnulib module cbrt for portability");
435 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
437 # define cbrtl rpl_cbrtl
439 _GL_FUNCDECL_RPL (cbrtl
, long double, (long double x
));
440 _GL_CXXALIAS_RPL (cbrtl
, long double, (long double x
));
442 # if !@HAVE_DECL_CBRTL@
443 _GL_FUNCDECL_SYS (cbrtl
, long double, (long double x
));
445 _GL_CXXALIAS_SYS (cbrtl
, long double, (long double x
));
447 _GL_CXXALIASWARN (cbrtl
);
448 #elif defined GNULIB_POSIXCHECK
450 # if HAVE_RAW_DECL_CBRTL
451 _GL_WARN_ON_USE (cbrtl
, "cbrtl is unportable - "
452 "use gnulib module cbrtl for portability");
459 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
461 # define ceilf rpl_ceilf
463 _GL_FUNCDECL_RPL (ceilf
, float, (float x
));
464 _GL_CXXALIAS_RPL (ceilf
, float, (float x
));
466 # if !@HAVE_DECL_CEILF@
468 _GL_FUNCDECL_SYS (ceilf
, float, (float x
));
470 _GL_CXXALIAS_SYS (ceilf
, float, (float x
));
472 _GL_CXXALIASWARN (ceilf
);
473 #elif defined GNULIB_POSIXCHECK
475 # if HAVE_RAW_DECL_CEILF
476 _GL_WARN_ON_USE (ceilf
, "ceilf is unportable - "
477 "use gnulib module ceilf for portability");
483 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
485 # define ceil rpl_ceil
487 _GL_FUNCDECL_RPL (ceil
, double, (double x
));
488 _GL_CXXALIAS_RPL (ceil
, double, (double x
));
490 _GL_CXXALIAS_SYS (ceil
, double, (double x
));
493 _GL_CXXALIASWARN1 (ceil
, double, (double x
));
499 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
501 # define ceill rpl_ceill
503 _GL_FUNCDECL_RPL (ceill
, long double, (long double x
));
504 _GL_CXXALIAS_RPL (ceill
, long double, (long double x
));
506 # if !@HAVE_DECL_CEILL@
508 _GL_FUNCDECL_SYS (ceill
, long double, (long double x
));
510 _GL_CXXALIAS_SYS (ceill
, long double, (long double x
));
513 _GL_CXXALIASWARN (ceill
);
515 #elif defined GNULIB_POSIXCHECK
517 # if HAVE_RAW_DECL_CEILL
518 _GL_WARN_ON_USE (ceill
, "ceill is unportable - "
519 "use gnulib module ceill for portability");
524 #if @GNULIB_COPYSIGNF@
525 # if !@HAVE_DECL_COPYSIGNF@
527 _GL_FUNCDECL_SYS (copysignf
, float, (float x
, float y
));
529 _GL_CXXALIAS_SYS (copysignf
, float, (float x
, float y
));
530 _GL_CXXALIASWARN (copysignf
);
531 #elif defined GNULIB_POSIXCHECK
533 # if HAVE_RAW_DECL_COPYSIGNF
534 _GL_WARN_ON_USE (copysignf
, "copysignf is unportable - "
535 "use gnulib module copysignf for portability");
539 #if @GNULIB_COPYSIGN@
540 # if !@HAVE_COPYSIGN@
541 _GL_FUNCDECL_SYS (copysign
, double, (double x
, double y
));
543 _GL_CXXALIAS_SYS (copysign
, double, (double x
, double y
));
545 _GL_CXXALIASWARN1 (copysign
, double, (double x
, double y
));
547 #elif defined GNULIB_POSIXCHECK
549 # if HAVE_RAW_DECL_COPYSIGN
550 _GL_WARN_ON_USE (copysign
, "copysign is unportable - "
551 "use gnulib module copysign for portability");
555 #if @GNULIB_COPYSIGNL@
556 # if !@HAVE_COPYSIGNL@
557 _GL_FUNCDECL_SYS (copysignl
, long double, (long double x
, long double y
));
559 _GL_CXXALIAS_SYS (copysignl
, long double, (long double x
, long double y
));
560 _GL_CXXALIASWARN (copysignl
);
561 #elif defined GNULIB_POSIXCHECK
563 # if HAVE_RAW_DECL_COPYSIGNL
564 _GL_WARN_ON_USE (copysign
, "copysignl is unportable - "
565 "use gnulib module copysignl for portability");
572 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
574 # define cosf rpl_cosf
576 _GL_FUNCDECL_RPL (cosf
, float, (float x
));
577 _GL_CXXALIAS_RPL (cosf
, float, (float x
));
581 _GL_FUNCDECL_SYS (cosf
, float, (float x
));
583 _GL_CXXALIAS_SYS (cosf
, float, (float x
));
585 _GL_CXXALIASWARN (cosf
);
586 #elif defined GNULIB_POSIXCHECK
588 # if HAVE_RAW_DECL_COSF
589 _GL_WARN_ON_USE (cosf
, "cosf is unportable - "
590 "use gnulib module cosf for portability");
595 # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
597 _GL_FUNCDECL_SYS (cosl
, long double, (long double x
));
599 _GL_CXXALIAS_SYS (cosl
, long double, (long double x
));
601 _GL_CXXALIASWARN (cosl
);
603 #elif defined GNULIB_POSIXCHECK
605 # if HAVE_RAW_DECL_COSL
606 _GL_WARN_ON_USE (cosl
, "cosl is unportable - "
607 "use gnulib module cosl for portability");
614 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
616 # define coshf rpl_coshf
618 _GL_FUNCDECL_RPL (coshf
, float, (float x
));
619 _GL_CXXALIAS_RPL (coshf
, float, (float x
));
623 _GL_FUNCDECL_SYS (coshf
, float, (float x
));
625 _GL_CXXALIAS_SYS (coshf
, float, (float x
));
627 _GL_CXXALIASWARN (coshf
);
628 #elif defined GNULIB_POSIXCHECK
630 # if HAVE_RAW_DECL_COSHF
631 _GL_WARN_ON_USE (coshf
, "coshf is unportable - "
632 "use gnulib module coshf for portability");
639 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
641 # define expf rpl_expf
643 _GL_FUNCDECL_RPL (expf
, float, (float x
));
644 _GL_CXXALIAS_RPL (expf
, float, (float x
));
648 _GL_FUNCDECL_SYS (expf
, float, (float x
));
650 _GL_CXXALIAS_SYS (expf
, float, (float x
));
652 _GL_CXXALIASWARN (expf
);
653 #elif defined GNULIB_POSIXCHECK
655 # if HAVE_RAW_DECL_EXPF
656 _GL_WARN_ON_USE (expf
, "expf is unportable - "
657 "use gnulib module expf for portability");
663 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
665 # define expl rpl_expl
667 _GL_FUNCDECL_RPL (expl
, long double, (long double x
));
668 _GL_CXXALIAS_RPL (expl
, long double, (long double x
));
670 # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
672 _GL_FUNCDECL_SYS (expl
, long double, (long double x
));
674 _GL_CXXALIAS_SYS (expl
, long double, (long double x
));
677 _GL_CXXALIASWARN (expl
);
679 #elif defined GNULIB_POSIXCHECK
681 # if HAVE_RAW_DECL_EXPL
682 _GL_WARN_ON_USE (expl
, "expl is unportable - "
683 "use gnulib module expl for portability");
689 # if !@HAVE_DECL_EXP2F@
690 _GL_FUNCDECL_SYS (exp2f
, float, (float x
));
692 _GL_CXXALIAS_SYS (exp2f
, float, (float x
));
693 _GL_CXXALIASWARN (exp2f
);
694 #elif defined GNULIB_POSIXCHECK
696 # if HAVE_RAW_DECL_EXP2F
697 _GL_WARN_ON_USE (exp2f
, "exp2f is unportable - "
698 "use gnulib module exp2f for portability");
704 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
706 # define exp2 rpl_exp2
708 _GL_FUNCDECL_RPL (exp2
, double, (double x
));
709 _GL_CXXALIAS_RPL (exp2
, double, (double x
));
711 # if !@HAVE_DECL_EXP2@
712 _GL_FUNCDECL_SYS (exp2
, double, (double x
));
714 _GL_CXXALIAS_SYS (exp2
, double, (double x
));
717 _GL_CXXALIASWARN1 (exp2
, double, (double x
));
719 #elif defined GNULIB_POSIXCHECK
721 # if HAVE_RAW_DECL_EXP2
722 _GL_WARN_ON_USE (exp2
, "exp2 is unportable - "
723 "use gnulib module exp2 for portability");
729 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
731 # define exp2l rpl_exp2l
733 _GL_FUNCDECL_RPL (exp2l
, long double, (long double x
));
734 _GL_CXXALIAS_RPL (exp2l
, long double, (long double x
));
736 # if !@HAVE_DECL_EXP2L@
738 _GL_FUNCDECL_SYS (exp2l
, long double, (long double x
));
740 _GL_CXXALIAS_SYS (exp2l
, long double, (long double x
));
742 _GL_CXXALIASWARN (exp2l
);
743 #elif defined GNULIB_POSIXCHECK
745 # if HAVE_RAW_DECL_EXP2L
746 _GL_WARN_ON_USE (exp2l
, "exp2l is unportable - "
747 "use gnulib module exp2l for portability");
753 # if @REPLACE_EXPM1F@
754 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
756 # define expm1f rpl_expm1f
758 _GL_FUNCDECL_RPL (expm1f
, float, (float x
));
759 _GL_CXXALIAS_RPL (expm1f
, float, (float x
));
762 _GL_FUNCDECL_SYS (expm1f
, float, (float x
));
764 _GL_CXXALIAS_SYS (expm1f
, float, (float x
));
766 _GL_CXXALIASWARN (expm1f
);
767 #elif defined GNULIB_POSIXCHECK
769 # if HAVE_RAW_DECL_EXPM1F
770 _GL_WARN_ON_USE (expm1f
, "expm1f is unportable - "
771 "use gnulib module expm1f for portability");
777 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
779 # define expm1 rpl_expm1
781 _GL_FUNCDECL_RPL (expm1
, double, (double x
));
782 _GL_CXXALIAS_RPL (expm1
, double, (double x
));
785 _GL_FUNCDECL_SYS (expm1
, double, (double x
));
787 _GL_CXXALIAS_SYS (expm1
, double, (double x
));
790 _GL_CXXALIASWARN1 (expm1
, double, (double x
));
792 #elif defined GNULIB_POSIXCHECK
794 # if HAVE_RAW_DECL_EXPM1
795 _GL_WARN_ON_USE (expm1
, "expm1 is unportable - "
796 "use gnulib module expm1 for portability");
801 # if @REPLACE_EXPM1L@
802 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
804 # define expm1l rpl_expm1l
806 _GL_FUNCDECL_RPL (expm1l
, long double, (long double x
));
807 _GL_CXXALIAS_RPL (expm1l
, long double, (long double x
));
809 # if !@HAVE_DECL_EXPM1L@
811 # if !(defined __cplusplus && defined _AIX)
812 _GL_FUNCDECL_SYS (expm1l
, long double, (long double x
));
815 _GL_CXXALIAS_SYS (expm1l
, long double, (long double x
));
817 _GL_CXXALIASWARN (expm1l
);
818 #elif defined GNULIB_POSIXCHECK
820 # if HAVE_RAW_DECL_EXPM1L
821 _GL_WARN_ON_USE (expm1l
, "expm1l is unportable - "
822 "use gnulib module expm1l for portability");
830 _GL_FUNCDECL_SYS (fabsf
, float, (float x
));
832 _GL_CXXALIAS_SYS (fabsf
, float, (float x
));
834 _GL_CXXALIASWARN (fabsf
);
836 #elif defined GNULIB_POSIXCHECK
838 # if HAVE_RAW_DECL_FABSF
839 _GL_WARN_ON_USE (fabsf
, "fabsf is unportable - "
840 "use gnulib module fabsf for portability");
846 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
848 # define fabsl rpl_fabsl
850 _GL_FUNCDECL_RPL (fabsl
, long double, (long double x
));
851 _GL_CXXALIAS_RPL (fabsl
, long double, (long double x
));
855 _GL_FUNCDECL_SYS (fabsl
, long double, (long double x
));
857 _GL_CXXALIAS_SYS (fabsl
, long double, (long double x
));
860 _GL_CXXALIASWARN (fabsl
);
862 #elif defined GNULIB_POSIXCHECK
864 # if HAVE_RAW_DECL_FABSL
865 _GL_WARN_ON_USE (fabsl
, "fabsl is unportable - "
866 "use gnulib module fabsl for portability");
872 # if @REPLACE_FLOORF@
873 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
875 # define floorf rpl_floorf
877 _GL_FUNCDECL_RPL (floorf
, float, (float x
));
878 _GL_CXXALIAS_RPL (floorf
, float, (float x
));
880 # if !@HAVE_DECL_FLOORF@
882 _GL_FUNCDECL_SYS (floorf
, float, (float x
));
884 _GL_CXXALIAS_SYS (floorf
, float, (float x
));
886 _GL_CXXALIASWARN (floorf
);
887 #elif defined GNULIB_POSIXCHECK
889 # if HAVE_RAW_DECL_FLOORF
890 _GL_WARN_ON_USE (floorf
, "floorf is unportable - "
891 "use gnulib module floorf for portability");
897 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
899 # define floor rpl_floor
901 _GL_FUNCDECL_RPL (floor
, double, (double x
));
902 _GL_CXXALIAS_RPL (floor
, double, (double x
));
904 _GL_CXXALIAS_SYS (floor
, double, (double x
));
907 _GL_CXXALIASWARN1 (floor
, double, (double x
));
912 # if @REPLACE_FLOORL@
913 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
915 # define floorl rpl_floorl
917 _GL_FUNCDECL_RPL (floorl
, long double, (long double x
));
918 _GL_CXXALIAS_RPL (floorl
, long double, (long double x
));
920 # if !@HAVE_DECL_FLOORL@
922 _GL_FUNCDECL_SYS (floorl
, long double, (long double x
));
924 _GL_CXXALIAS_SYS (floorl
, long double, (long double x
));
927 _GL_CXXALIASWARN (floorl
);
929 #elif defined GNULIB_POSIXCHECK
931 # if HAVE_RAW_DECL_FLOORL
932 _GL_WARN_ON_USE (floorl
, "floorl is unportable - "
933 "use gnulib module floorl for portability");
940 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
942 # define fmaf rpl_fmaf
944 _GL_FUNCDECL_RPL (fmaf
, float, (float x
, float y
, float z
));
945 _GL_CXXALIAS_RPL (fmaf
, float, (float x
, float y
, float z
));
949 _GL_FUNCDECL_SYS (fmaf
, float, (float x
, float y
, float z
));
951 _GL_CXXALIAS_SYS (fmaf
, float, (float x
, float y
, float z
));
953 _GL_CXXALIASWARN (fmaf
);
954 #elif defined GNULIB_POSIXCHECK
956 # if HAVE_RAW_DECL_FMAF
957 _GL_WARN_ON_USE (fmaf
, "fmaf is unportable - "
958 "use gnulib module fmaf for portability");
964 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
968 _GL_FUNCDECL_RPL (fma
, double, (double x
, double y
, double z
));
969 _GL_CXXALIAS_RPL (fma
, double, (double x
, double y
, double z
));
973 _GL_FUNCDECL_SYS (fma
, double, (double x
, double y
, double z
));
975 _GL_CXXALIAS_SYS (fma
, double, (double x
, double y
, double z
));
978 _GL_CXXALIASWARN1 (fma
, double, (double x
, double y
, double z
));
980 #elif defined GNULIB_POSIXCHECK
982 # if HAVE_RAW_DECL_FMA
983 _GL_WARN_ON_USE (fma
, "fma is unportable - "
984 "use gnulib module fma for portability");
990 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
992 # define fmal rpl_fmal
994 _GL_FUNCDECL_RPL (fmal
, long double,
995 (long double x
, long double y
, long double z
));
996 _GL_CXXALIAS_RPL (fmal
, long double,
997 (long double x
, long double y
, long double z
));
1001 # if !(defined __cplusplus && defined _AIX)
1002 _GL_FUNCDECL_SYS (fmal
, long double,
1003 (long double x
, long double y
, long double z
));
1006 _GL_CXXALIAS_SYS (fmal
, long double,
1007 (long double x
, long double y
, long double z
));
1009 _GL_CXXALIASWARN (fmal
);
1010 #elif defined GNULIB_POSIXCHECK
1012 # if HAVE_RAW_DECL_FMAL
1013 _GL_WARN_ON_USE (fmal
, "fmal is unportable - "
1014 "use gnulib module fmal for portability");
1020 # if @REPLACE_FMODF@
1021 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1023 # define fmodf rpl_fmodf
1025 _GL_FUNCDECL_RPL (fmodf
, float, (float x
, float y
));
1026 _GL_CXXALIAS_RPL (fmodf
, float, (float x
, float y
));
1030 _GL_FUNCDECL_SYS (fmodf
, float, (float x
, float y
));
1032 _GL_CXXALIAS_SYS (fmodf
, float, (float x
, float y
));
1034 _GL_CXXALIASWARN (fmodf
);
1035 #elif defined GNULIB_POSIXCHECK
1037 # if HAVE_RAW_DECL_FMODF
1038 _GL_WARN_ON_USE (fmodf
, "fmodf is unportable - "
1039 "use gnulib module fmodf for portability");
1045 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1047 # define fmod rpl_fmod
1049 _GL_FUNCDECL_RPL (fmod
, double, (double x
, double y
));
1050 _GL_CXXALIAS_RPL (fmod
, double, (double x
, double y
));
1052 _GL_CXXALIAS_SYS (fmod
, double, (double x
, double y
));
1055 _GL_CXXALIASWARN1 (fmod
, double, (double x
, double y
));
1057 #elif defined GNULIB_POSIXCHECK
1059 # if HAVE_RAW_DECL_FMOD
1060 _GL_WARN_ON_USE (fmod
, "fmod has portability problems - "
1061 "use gnulib module fmod for portability");
1066 # if @REPLACE_FMODL@
1067 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1069 # define fmodl rpl_fmodl
1071 _GL_FUNCDECL_RPL (fmodl
, long double, (long double x
, long double y
));
1072 _GL_CXXALIAS_RPL (fmodl
, long double, (long double x
, long double y
));
1076 _GL_FUNCDECL_SYS (fmodl
, long double, (long double x
, long double y
));
1078 _GL_CXXALIAS_SYS (fmodl
, long double, (long double x
, long double y
));
1081 _GL_CXXALIASWARN (fmodl
);
1083 #elif defined GNULIB_POSIXCHECK
1085 # if HAVE_RAW_DECL_FMODL
1086 _GL_WARN_ON_USE (fmodl
, "fmodl is unportable - "
1087 "use gnulib module fmodl for portability");
1093 x = mantissa * 2^exp
1095 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1096 If x is zero: mantissa = x, exp = 0.
1097 If x is infinite or NaN: mantissa = x, exp unspecified.
1098 Store exp in *EXPPTR and return mantissa. */
1100 # if @REPLACE_FREXPF@
1101 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1103 # define frexpf rpl_frexpf
1105 _GL_FUNCDECL_RPL (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1106 _GL_CXXALIAS_RPL (frexpf
, float, (float x
, int *expptr
));
1110 _GL_FUNCDECL_SYS (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1112 _GL_CXXALIAS_SYS (frexpf
, float, (float x
, int *expptr
));
1115 _GL_CXXALIASWARN (frexpf
);
1117 #elif defined GNULIB_POSIXCHECK
1119 # if HAVE_RAW_DECL_FREXPF
1120 _GL_WARN_ON_USE (frexpf
, "frexpf is unportable - "
1121 "use gnulib module frexpf for portability");
1126 x = mantissa * 2^exp
1128 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1129 If x is zero: mantissa = x, exp = 0.
1130 If x is infinite or NaN: mantissa = x, exp unspecified.
1131 Store exp in *EXPPTR and return mantissa. */
1133 # if @REPLACE_FREXP@
1134 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1136 # define frexp rpl_frexp
1138 _GL_FUNCDECL_RPL (frexp
, double, (double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1139 _GL_CXXALIAS_RPL (frexp
, double, (double x
, int *expptr
));
1141 _GL_CXXALIAS_SYS (frexp
, double, (double x
, int *expptr
));
1144 _GL_CXXALIASWARN1 (frexp
, double, (double x
, int *expptr
));
1146 #elif defined GNULIB_POSIXCHECK
1148 /* Assume frexp is always declared. */
1149 _GL_WARN_ON_USE (frexp
, "frexp is unportable - "
1150 "use gnulib module frexp for portability");
1154 x = mantissa * 2^exp
1156 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1157 If x is zero: mantissa = x, exp = 0.
1158 If x is infinite or NaN: mantissa = x, exp unspecified.
1159 Store exp in *EXPPTR and return mantissa. */
1160 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
1161 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1163 # define frexpl rpl_frexpl
1165 _GL_FUNCDECL_RPL (frexpl
, long double,
1166 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1167 _GL_CXXALIAS_RPL (frexpl
, long double, (long double x
, int *expptr
));
1169 # if !@HAVE_DECL_FREXPL@
1170 _GL_FUNCDECL_SYS (frexpl
, long double,
1171 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1173 # if @GNULIB_FREXPL@
1174 _GL_CXXALIAS_SYS (frexpl
, long double, (long double x
, int *expptr
));
1177 #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
1179 _GL_CXXALIASWARN (frexpl
);
1182 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
1184 # if HAVE_RAW_DECL_FREXPL
1185 _GL_WARN_ON_USE (frexpl
, "frexpl is unportable - "
1186 "use gnulib module frexpl for portability");
1191 /* Return sqrt(x^2+y^2). */
1193 # if @REPLACE_HYPOTF@
1194 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1196 # define hypotf rpl_hypotf
1198 _GL_FUNCDECL_RPL (hypotf
, float, (float x
, float y
));
1199 _GL_CXXALIAS_RPL (hypotf
, float, (float x
, float y
));
1202 _GL_FUNCDECL_SYS (hypotf
, float, (float x
, float y
));
1204 _GL_CXXALIAS_SYS (hypotf
, float, (float x
, float y
));
1207 _GL_CXXALIASWARN (hypotf
);
1209 #elif defined GNULIB_POSIXCHECK
1211 # if HAVE_RAW_DECL_HYPOTF
1212 _GL_WARN_ON_USE (hypotf
, "hypotf is unportable - "
1213 "use gnulib module hypotf for portability");
1217 /* Return sqrt(x^2+y^2). */
1219 # if @REPLACE_HYPOT@
1220 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1222 # define hypot rpl_hypot
1224 _GL_FUNCDECL_RPL (hypot
, double, (double x
, double y
));
1225 _GL_CXXALIAS_RPL (hypot
, double, (double x
, double y
));
1227 _GL_CXXALIAS_SYS (hypot
, double, (double x
, double y
));
1230 _GL_CXXALIASWARN1 (hypot
, double, (double x
, double y
));
1232 #elif defined GNULIB_POSIXCHECK
1234 # if HAVE_RAW_DECL_HYPOT
1235 _GL_WARN_ON_USE (hypotf
, "hypot has portability problems - "
1236 "use gnulib module hypot for portability");
1240 /* Return sqrt(x^2+y^2). */
1242 # if @REPLACE_HYPOTL@
1243 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1245 # define hypotl rpl_hypotl
1247 _GL_FUNCDECL_RPL (hypotl
, long double, (long double x
, long double y
));
1248 _GL_CXXALIAS_RPL (hypotl
, long double, (long double x
, long double y
));
1251 _GL_FUNCDECL_SYS (hypotl
, long double, (long double x
, long double y
));
1253 _GL_CXXALIAS_SYS (hypotl
, long double, (long double x
, long double y
));
1256 _GL_CXXALIASWARN (hypotl
);
1258 #elif defined GNULIB_POSIXCHECK
1260 # if HAVE_RAW_DECL_HYPOTL
1261 _GL_WARN_ON_USE (hypotl
, "hypotl is unportable - "
1262 "use gnulib module hypotl for portability");
1268 # if @REPLACE_ILOGBF@
1269 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1271 # define ilogbf rpl_ilogbf
1273 _GL_FUNCDECL_RPL (ilogbf
, int, (float x
));
1274 _GL_CXXALIAS_RPL (ilogbf
, int, (float x
));
1277 _GL_FUNCDECL_SYS (ilogbf
, int, (float x
));
1279 _GL_CXXALIAS_SYS (ilogbf
, int, (float x
));
1281 _GL_CXXALIASWARN (ilogbf
);
1282 #elif defined GNULIB_POSIXCHECK
1284 # if HAVE_RAW_DECL_ILOGBF
1285 _GL_WARN_ON_USE (ilogbf
, "ilogbf is unportable - "
1286 "use gnulib module ilogbf for portability");
1291 # if @REPLACE_ILOGB@
1292 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1294 # define ilogb rpl_ilogb
1296 _GL_FUNCDECL_RPL (ilogb
, int, (double x
));
1297 _GL_CXXALIAS_RPL (ilogb
, int, (double x
));
1300 _GL_FUNCDECL_SYS (ilogb
, int, (double x
));
1302 _GL_CXXALIAS_SYS (ilogb
, int, (double x
));
1305 _GL_CXXALIASWARN1 (ilogb
, int, (double x
));
1307 #elif defined GNULIB_POSIXCHECK
1309 # if HAVE_RAW_DECL_ILOGB
1310 _GL_WARN_ON_USE (ilogb
, "ilogb is unportable - "
1311 "use gnulib module ilogb for portability");
1316 # if @REPLACE_ILOGBL@
1317 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1319 # define ilogbl rpl_ilogbl
1321 _GL_FUNCDECL_RPL (ilogbl
, int, (long double x
));
1322 _GL_CXXALIAS_RPL (ilogbl
, int, (long double x
));
1326 _GL_FUNCDECL_SYS (ilogbl
, int, (long double x
));
1328 _GL_CXXALIAS_SYS (ilogbl
, int, (long double x
));
1330 _GL_CXXALIASWARN (ilogbl
);
1331 #elif defined GNULIB_POSIXCHECK
1333 # if HAVE_RAW_DECL_ILOGBL
1334 _GL_WARN_ON_USE (ilogbl
, "ilogbl is unportable - "
1335 "use gnulib module ilogbl for portability");
1341 /* On native Windows, map 'j0' to '_j0', so that -loldnames is not
1342 required. In C++ with GNULIB_NAMESPACE, avoid differences between
1343 platforms by defining GNULIB_NAMESPACE::j0 always. */
1344 # if defined _WIN32 && !defined __CYGWIN__
1345 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1349 _GL_CXXALIAS_MDA (j0
, double, (double x
));
1351 _GL_CXXALIAS_SYS (j0
, double, (double x
));
1353 _GL_CXXALIASWARN (j0
);
1357 /* On native Windows, map 'j1' to '_j1', so that -loldnames is not
1358 required. In C++ with GNULIB_NAMESPACE, avoid differences between
1359 platforms by defining GNULIB_NAMESPACE::j1 always. */
1360 # if defined _WIN32 && !defined __CYGWIN__
1361 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1365 _GL_CXXALIAS_MDA (j1
, double, (double x
));
1367 _GL_CXXALIAS_SYS (j1
, double, (double x
));
1369 _GL_CXXALIASWARN (j1
);
1373 /* On native Windows, map 'jn' to '_jn', so that -loldnames is not
1374 required. In C++ with GNULIB_NAMESPACE, avoid differences between
1375 platforms by defining GNULIB_NAMESPACE::jn always. */
1376 # if defined _WIN32 && !defined __CYGWIN__
1377 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1381 _GL_CXXALIAS_MDA (jn
, double, (int n
, double x
));
1383 _GL_CXXALIAS_SYS (jn
, double, (int n
, double x
));
1385 _GL_CXXALIASWARN (jn
);
1389 /* Return x * 2^exp. */
1393 _GL_FUNCDECL_SYS (ldexpf
, float, (float x
, int exp
));
1395 _GL_CXXALIAS_SYS (ldexpf
, float, (float x
, int exp
));
1397 _GL_CXXALIASWARN (ldexpf
);
1399 #elif defined GNULIB_POSIXCHECK
1401 # if HAVE_RAW_DECL_LDEXPF
1402 _GL_WARN_ON_USE (ldexpf
, "ldexpf is unportable - "
1403 "use gnulib module ldexpf for portability");
1407 /* Return x * 2^exp. */
1408 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
1409 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1411 # define ldexpl rpl_ldexpl
1413 _GL_FUNCDECL_RPL (ldexpl
, long double, (long double x
, int exp
));
1414 _GL_CXXALIAS_RPL (ldexpl
, long double, (long double x
, int exp
));
1416 # if !@HAVE_DECL_LDEXPL@
1417 _GL_FUNCDECL_SYS (ldexpl
, long double, (long double x
, int exp
));
1419 # if @GNULIB_LDEXPL@
1420 _GL_CXXALIAS_SYS (ldexpl
, long double, (long double x
, int exp
));
1425 _GL_CXXALIASWARN (ldexpl
);
1428 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
1430 # if HAVE_RAW_DECL_LDEXPL
1431 _GL_WARN_ON_USE (ldexpl
, "ldexpl is unportable - "
1432 "use gnulib module ldexpl for portability");
1439 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1441 # define logf rpl_logf
1443 _GL_FUNCDECL_RPL (logf
, float, (float x
));
1444 _GL_CXXALIAS_RPL (logf
, float, (float x
));
1448 _GL_FUNCDECL_SYS (logf
, float, (float x
));
1450 _GL_CXXALIAS_SYS (logf
, float, (float x
));
1452 _GL_CXXALIASWARN (logf
);
1453 #elif defined GNULIB_POSIXCHECK
1455 # if HAVE_RAW_DECL_LOGF
1456 _GL_WARN_ON_USE (logf
, "logf is unportable - "
1457 "use gnulib module logf for portability");
1463 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1465 # define log rpl_log
1467 _GL_FUNCDECL_RPL (log
, double, (double x
));
1468 _GL_CXXALIAS_RPL (log
, double, (double x
));
1470 _GL_CXXALIAS_SYS (log
, double, (double x
));
1473 _GL_CXXALIASWARN1 (log
, double, (double x
));
1475 #elif defined GNULIB_POSIXCHECK
1477 # if HAVE_RAW_DECL_LOG
1478 _GL_WARN_ON_USE (log
, "log has portability problems - "
1479 "use gnulib module log for portability");
1485 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1487 # define logl rpl_logl
1489 _GL_FUNCDECL_RPL (logl
, long double, (long double x
));
1490 _GL_CXXALIAS_RPL (logl
, long double, (long double x
));
1492 # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
1494 _GL_FUNCDECL_SYS (logl
, long double, (long double x
));
1496 _GL_CXXALIAS_SYS (logl
, long double, (long double x
));
1499 _GL_CXXALIASWARN (logl
);
1501 #elif defined GNULIB_POSIXCHECK
1503 # if HAVE_RAW_DECL_LOGL
1504 _GL_WARN_ON_USE (logl
, "logl is unportable - "
1505 "use gnulib module logl for portability");
1511 # if @REPLACE_LOG10F@
1512 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1514 # define log10f rpl_log10f
1516 _GL_FUNCDECL_RPL (log10f
, float, (float x
));
1517 _GL_CXXALIAS_RPL (log10f
, float, (float x
));
1521 _GL_FUNCDECL_SYS (log10f
, float, (float x
));
1523 _GL_CXXALIAS_SYS (log10f
, float, (float x
));
1525 _GL_CXXALIASWARN (log10f
);
1526 #elif defined GNULIB_POSIXCHECK
1528 # if HAVE_RAW_DECL_LOG10F
1529 _GL_WARN_ON_USE (log10f
, "log10f is unportable - "
1530 "use gnulib module log10f for portability");
1535 # if @REPLACE_LOG10@
1536 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1538 # define log10 rpl_log10
1540 _GL_FUNCDECL_RPL (log10
, double, (double x
));
1541 _GL_CXXALIAS_RPL (log10
, double, (double x
));
1543 _GL_CXXALIAS_SYS (log10
, double, (double x
));
1546 _GL_CXXALIASWARN1 (log10
, double, (double x
));
1548 #elif defined GNULIB_POSIXCHECK
1550 # if HAVE_RAW_DECL_LOG10
1551 _GL_WARN_ON_USE (log10
, "log10 has portability problems - "
1552 "use gnulib module log10 for portability");
1557 # if @REPLACE_LOG10L@
1558 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1560 # define log10l rpl_log10l
1562 _GL_FUNCDECL_RPL (log10l
, long double, (long double x
));
1563 _GL_CXXALIAS_RPL (log10l
, long double, (long double x
));
1565 # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
1567 _GL_FUNCDECL_SYS (log10l
, long double, (long double x
));
1569 _GL_CXXALIAS_SYS (log10l
, long double, (long double x
));
1572 _GL_CXXALIASWARN (log10l
);
1574 #elif defined GNULIB_POSIXCHECK
1576 # if HAVE_RAW_DECL_LOG10L
1577 _GL_WARN_ON_USE (log10l
, "log10l is unportable - "
1578 "use gnulib module log10l for portability");
1584 # if @REPLACE_LOG1PF@
1585 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1587 # define log1pf rpl_log1pf
1589 _GL_FUNCDECL_RPL (log1pf
, float, (float x
));
1590 _GL_CXXALIAS_RPL (log1pf
, float, (float x
));
1593 _GL_FUNCDECL_SYS (log1pf
, float, (float x
));
1595 _GL_CXXALIAS_SYS (log1pf
, float, (float x
));
1597 _GL_CXXALIASWARN (log1pf
);
1598 #elif defined GNULIB_POSIXCHECK
1600 # if HAVE_RAW_DECL_LOG1PF
1601 _GL_WARN_ON_USE (log1pf
, "log1pf is unportable - "
1602 "use gnulib module log1pf for portability");
1607 # if @REPLACE_LOG1P@
1608 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1610 # define log1p rpl_log1p
1612 _GL_FUNCDECL_RPL (log1p
, double, (double x
));
1613 _GL_CXXALIAS_RPL (log1p
, double, (double x
));
1616 _GL_FUNCDECL_SYS (log1p
, double, (double x
));
1618 _GL_CXXALIAS_SYS (log1p
, double, (double x
));
1621 _GL_CXXALIASWARN1 (log1p
, double, (double x
));
1623 #elif defined GNULIB_POSIXCHECK
1625 # if HAVE_RAW_DECL_LOG1P
1626 _GL_WARN_ON_USE (log1p
, "log1p has portability problems - "
1627 "use gnulib module log1p for portability");
1632 # if @REPLACE_LOG1PL@
1633 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1635 # define log1pl rpl_log1pl
1637 _GL_FUNCDECL_RPL (log1pl
, long double, (long double x
));
1638 _GL_CXXALIAS_RPL (log1pl
, long double, (long double x
));
1641 _GL_FUNCDECL_SYS (log1pl
, long double, (long double x
));
1643 _GL_CXXALIAS_SYS (log1pl
, long double, (long double x
));
1645 _GL_CXXALIASWARN (log1pl
);
1646 #elif defined GNULIB_POSIXCHECK
1648 # if HAVE_RAW_DECL_LOG1PL
1649 _GL_WARN_ON_USE (log1pl
, "log1pl has portability problems - "
1650 "use gnulib module log1pl for portability");
1656 # if @REPLACE_LOG2F@
1657 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1659 # define log2f rpl_log2f
1661 _GL_FUNCDECL_RPL (log2f
, float, (float x
));
1662 _GL_CXXALIAS_RPL (log2f
, float, (float x
));
1664 # if !@HAVE_DECL_LOG2F@
1666 _GL_FUNCDECL_SYS (log2f
, float, (float x
));
1668 _GL_CXXALIAS_SYS (log2f
, float, (float x
));
1670 _GL_CXXALIASWARN (log2f
);
1671 #elif defined GNULIB_POSIXCHECK
1673 # if HAVE_RAW_DECL_LOG2F
1674 _GL_WARN_ON_USE (log2f
, "log2f is unportable - "
1675 "use gnulib module log2f for portability");
1681 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1683 # define log2 rpl_log2
1685 _GL_FUNCDECL_RPL (log2
, double, (double x
));
1686 _GL_CXXALIAS_RPL (log2
, double, (double x
));
1688 # if !@HAVE_DECL_LOG2@
1690 _GL_FUNCDECL_SYS (log2
, double, (double x
));
1692 _GL_CXXALIAS_SYS (log2
, double, (double x
));
1695 _GL_CXXALIASWARN1 (log2
, double, (double x
));
1697 #elif defined GNULIB_POSIXCHECK
1699 # if HAVE_RAW_DECL_LOG2
1700 _GL_WARN_ON_USE (log2
, "log2 is unportable - "
1701 "use gnulib module log2 for portability");
1706 # if @REPLACE_LOG2L@
1707 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1709 # define log2l rpl_log2l
1711 _GL_FUNCDECL_RPL (log2l
, long double, (long double x
));
1712 _GL_CXXALIAS_RPL (log2l
, long double, (long double x
));
1714 # if !@HAVE_DECL_LOG2L@
1715 _GL_FUNCDECL_SYS (log2l
, long double, (long double x
));
1717 _GL_CXXALIAS_SYS (log2l
, long double, (long double x
));
1719 _GL_CXXALIASWARN (log2l
);
1720 #elif defined GNULIB_POSIXCHECK
1722 # if HAVE_RAW_DECL_LOG2L
1723 _GL_WARN_ON_USE (log2l
, "log2l is unportable - "
1724 "use gnulib module log2l for portability");
1730 # if @REPLACE_LOGBF@
1731 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1733 # define logbf rpl_logbf
1735 _GL_FUNCDECL_RPL (logbf
, float, (float x
));
1736 _GL_CXXALIAS_RPL (logbf
, float, (float x
));
1739 _GL_FUNCDECL_SYS (logbf
, float, (float x
));
1741 _GL_CXXALIAS_SYS (logbf
, float, (float x
));
1743 _GL_CXXALIASWARN (logbf
);
1744 #elif defined GNULIB_POSIXCHECK
1746 # if HAVE_RAW_DECL_LOGBF
1747 _GL_WARN_ON_USE (logbf
, "logbf is unportable - "
1748 "use gnulib module logbf for portability");
1754 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1756 # define logb rpl_logb
1758 _GL_FUNCDECL_RPL (logb
, double, (double x
));
1759 _GL_CXXALIAS_RPL (logb
, double, (double x
));
1761 # if !@HAVE_DECL_LOGB@
1762 _GL_FUNCDECL_SYS (logb
, double, (double x
));
1764 _GL_CXXALIAS_SYS (logb
, double, (double x
));
1767 _GL_CXXALIASWARN1 (logb
, double, (double x
));
1769 #elif defined GNULIB_POSIXCHECK
1771 # if HAVE_RAW_DECL_LOGB
1772 _GL_WARN_ON_USE (logb
, "logb is unportable - "
1773 "use gnulib module logb for portability");
1778 # if @REPLACE_LOGBL@
1779 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1781 # define logbl rpl_logbl
1783 _GL_FUNCDECL_RPL (logbl
, long double, (long double x
));
1784 _GL_CXXALIAS_RPL (logbl
, long double, (long double x
));
1787 _GL_FUNCDECL_SYS (logbl
, long double, (long double x
));
1789 _GL_CXXALIAS_SYS (logbl
, long double, (long double x
));
1791 _GL_CXXALIASWARN (logbl
);
1792 #elif defined GNULIB_POSIXCHECK
1794 # if HAVE_RAW_DECL_LOGBL
1795 _GL_WARN_ON_USE (logbl
, "logbl is unportable - "
1796 "use gnulib module logbl for portability");
1802 # if @REPLACE_MODFF@
1803 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1805 # define modff rpl_modff
1807 _GL_FUNCDECL_RPL (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1808 _GL_CXXALIAS_RPL (modff
, float, (float x
, float *iptr
));
1812 _GL_FUNCDECL_SYS (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1814 _GL_CXXALIAS_SYS (modff
, float, (float x
, float *iptr
));
1816 _GL_CXXALIASWARN (modff
);
1817 #elif defined GNULIB_POSIXCHECK
1819 # if HAVE_RAW_DECL_MODFF
1820 _GL_WARN_ON_USE (modff
, "modff is unportable - "
1821 "use gnulib module modff for portability");
1827 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1829 # define modf rpl_modf
1831 _GL_FUNCDECL_RPL (modf
, double, (double x
, double *iptr
) _GL_ARG_NONNULL ((2)));
1832 _GL_CXXALIAS_RPL (modf
, double, (double x
, double *iptr
));
1834 _GL_CXXALIAS_SYS (modf
, double, (double x
, double *iptr
));
1837 _GL_CXXALIASWARN1 (modf
, double, (double x
, double *iptr
));
1839 #elif defined GNULIB_POSIXCHECK
1841 # if HAVE_RAW_DECL_MODF
1842 _GL_WARN_ON_USE (modf
, "modf has portability problems - "
1843 "use gnulib module modf for portability");
1848 # if @REPLACE_MODFL@
1849 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1851 # define modfl rpl_modfl
1853 _GL_FUNCDECL_RPL (modfl
, long double, (long double x
, long double *iptr
)
1854 _GL_ARG_NONNULL ((2)));
1855 _GL_CXXALIAS_RPL (modfl
, long double, (long double x
, long double *iptr
));
1859 _GL_FUNCDECL_SYS (modfl
, long double, (long double x
, long double *iptr
)
1860 _GL_ARG_NONNULL ((2)));
1862 _GL_CXXALIAS_SYS (modfl
, long double, (long double x
, long double *iptr
));
1865 _GL_CXXALIASWARN (modfl
);
1867 #elif defined GNULIB_POSIXCHECK
1869 # if HAVE_RAW_DECL_MODFL
1870 _GL_WARN_ON_USE (modfl
, "modfl is unportable - "
1871 "use gnulib module modfl for portability");
1879 _GL_FUNCDECL_SYS (powf
, float, (float x
, float y
));
1881 _GL_CXXALIAS_SYS (powf
, float, (float x
, float y
));
1882 _GL_CXXALIASWARN (powf
);
1883 #elif defined GNULIB_POSIXCHECK
1885 # if HAVE_RAW_DECL_POWF
1886 _GL_WARN_ON_USE (powf
, "powf is unportable - "
1887 "use gnulib module powf for portability");
1892 #if @GNULIB_REMAINDERF@
1893 # if @REPLACE_REMAINDERF@
1894 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1896 # define remainderf rpl_remainderf
1898 _GL_FUNCDECL_RPL (remainderf
, float, (float x
, float y
));
1899 _GL_CXXALIAS_RPL (remainderf
, float, (float x
, float y
));
1901 # if !@HAVE_REMAINDERF@
1902 _GL_FUNCDECL_SYS (remainderf
, float, (float x
, float y
));
1904 _GL_CXXALIAS_SYS (remainderf
, float, (float x
, float y
));
1906 _GL_CXXALIASWARN (remainderf
);
1907 #elif defined GNULIB_POSIXCHECK
1909 # if HAVE_RAW_DECL_REMAINDERF
1910 _GL_WARN_ON_USE (remainderf
, "remainderf is unportable - "
1911 "use gnulib module remainderf for portability");
1915 #if @GNULIB_REMAINDER@
1916 # if @REPLACE_REMAINDER@
1917 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1919 # define remainder rpl_remainder
1921 _GL_FUNCDECL_RPL (remainder
, double, (double x
, double y
));
1922 _GL_CXXALIAS_RPL (remainder
, double, (double x
, double y
));
1924 # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
1925 _GL_FUNCDECL_SYS (remainder
, double, (double x
, double y
));
1927 _GL_CXXALIAS_SYS (remainder
, double, (double x
, double y
));
1930 _GL_CXXALIASWARN1 (remainder
, double, (double x
, double y
));
1932 #elif defined GNULIB_POSIXCHECK
1934 # if HAVE_RAW_DECL_REMAINDER
1935 _GL_WARN_ON_USE (remainder
, "remainder is unportable - "
1936 "use gnulib module remainder for portability");
1940 #if @GNULIB_REMAINDERL@
1941 # if @REPLACE_REMAINDERL@
1942 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1944 # define remainderl rpl_remainderl
1946 _GL_FUNCDECL_RPL (remainderl
, long double, (long double x
, long double y
));
1947 _GL_CXXALIAS_RPL (remainderl
, long double, (long double x
, long double y
));
1949 # if !@HAVE_DECL_REMAINDERL@
1951 # if !(defined __cplusplus && defined _AIX)
1952 _GL_FUNCDECL_SYS (remainderl
, long double, (long double x
, long double y
));
1955 _GL_CXXALIAS_SYS (remainderl
, long double, (long double x
, long double y
));
1957 _GL_CXXALIASWARN (remainderl
);
1958 #elif defined GNULIB_POSIXCHECK
1960 # if HAVE_RAW_DECL_REMAINDERL
1961 _GL_WARN_ON_USE (remainderl
, "remainderl is unportable - "
1962 "use gnulib module remainderl for portability");
1968 # if !@HAVE_DECL_RINTF@
1969 _GL_FUNCDECL_SYS (rintf
, float, (float x
));
1971 _GL_CXXALIAS_SYS (rintf
, float, (float x
));
1972 _GL_CXXALIASWARN (rintf
);
1973 #elif defined GNULIB_POSIXCHECK
1975 # if HAVE_RAW_DECL_RINTF
1976 _GL_WARN_ON_USE (rintf
, "rintf is unportable - "
1977 "use gnulib module rintf for portability");
1983 _GL_FUNCDECL_SYS (rint
, double, (double x
));
1985 _GL_CXXALIAS_SYS (rint
, double, (double x
));
1987 _GL_CXXALIASWARN1 (rint
, double, (double x
));
1989 #elif defined GNULIB_POSIXCHECK
1991 # if HAVE_RAW_DECL_RINT
1992 _GL_WARN_ON_USE (rint
, "rint is unportable - "
1993 "use gnulib module rint for portability");
1998 # if @REPLACE_RINTL@
1999 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2001 # define rintl rpl_rintl
2003 _GL_FUNCDECL_RPL (rintl
, long double, (long double x
));
2004 _GL_CXXALIAS_RPL (rintl
, long double, (long double x
));
2007 _GL_FUNCDECL_SYS (rintl
, long double, (long double x
));
2009 _GL_CXXALIAS_SYS (rintl
, long double, (long double x
));
2011 _GL_CXXALIASWARN (rintl
);
2012 #elif defined GNULIB_POSIXCHECK
2014 # if HAVE_RAW_DECL_RINTL
2015 _GL_WARN_ON_USE (rintl
, "rintl is unportable - "
2016 "use gnulib module rintl for portability");
2022 # if @REPLACE_ROUNDF@
2023 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2025 # define roundf rpl_roundf
2027 _GL_FUNCDECL_RPL (roundf
, float, (float x
));
2028 _GL_CXXALIAS_RPL (roundf
, float, (float x
));
2030 # if !@HAVE_DECL_ROUNDF@
2031 _GL_FUNCDECL_SYS (roundf
, float, (float x
));
2033 _GL_CXXALIAS_SYS (roundf
, float, (float x
));
2035 _GL_CXXALIASWARN (roundf
);
2036 #elif defined GNULIB_POSIXCHECK
2038 # if HAVE_RAW_DECL_ROUNDF
2039 _GL_WARN_ON_USE (roundf
, "roundf is unportable - "
2040 "use gnulib module roundf for portability");
2045 # if @REPLACE_ROUND@
2046 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2048 # define round rpl_round
2050 _GL_FUNCDECL_RPL (round
, double, (double x
));
2051 _GL_CXXALIAS_RPL (round
, double, (double x
));
2053 # if !@HAVE_DECL_ROUND@
2054 _GL_FUNCDECL_SYS (round
, double, (double x
));
2056 _GL_CXXALIAS_SYS (round
, double, (double x
));
2059 _GL_CXXALIASWARN1 (round
, double, (double x
));
2061 #elif defined GNULIB_POSIXCHECK
2063 # if HAVE_RAW_DECL_ROUND
2064 _GL_WARN_ON_USE (round
, "round is unportable - "
2065 "use gnulib module round for portability");
2070 # if @REPLACE_ROUNDL@
2071 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2073 # define roundl rpl_roundl
2075 _GL_FUNCDECL_RPL (roundl
, long double, (long double x
));
2076 _GL_CXXALIAS_RPL (roundl
, long double, (long double x
));
2078 # if !@HAVE_DECL_ROUNDL@
2080 # if !(defined __cplusplus && defined _AIX)
2081 _GL_FUNCDECL_SYS (roundl
, long double, (long double x
));
2084 _GL_CXXALIAS_SYS (roundl
, long double, (long double x
));
2086 _GL_CXXALIASWARN (roundl
);
2087 #elif defined GNULIB_POSIXCHECK
2089 # if HAVE_RAW_DECL_ROUNDL
2090 _GL_WARN_ON_USE (roundl
, "roundl is unportable - "
2091 "use gnulib module roundl for portability");
2098 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2100 # define sinf rpl_sinf
2102 _GL_FUNCDECL_RPL (sinf
, float, (float x
));
2103 _GL_CXXALIAS_RPL (sinf
, float, (float x
));
2107 _GL_FUNCDECL_SYS (sinf
, float, (float x
));
2109 _GL_CXXALIAS_SYS (sinf
, float, (float x
));
2111 _GL_CXXALIASWARN (sinf
);
2112 #elif defined GNULIB_POSIXCHECK
2114 # if HAVE_RAW_DECL_SINF
2115 _GL_WARN_ON_USE (sinf
, "sinf is unportable - "
2116 "use gnulib module sinf for portability");
2121 # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
2123 _GL_FUNCDECL_SYS (sinl
, long double, (long double x
));
2125 _GL_CXXALIAS_SYS (sinl
, long double, (long double x
));
2127 _GL_CXXALIASWARN (sinl
);
2129 #elif defined GNULIB_POSIXCHECK
2131 # if HAVE_RAW_DECL_SINL
2132 _GL_WARN_ON_USE (sinl
, "sinl is unportable - "
2133 "use gnulib module sinl for portability");
2139 # if @REPLACE_SINHF@
2140 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2142 # define sinhf rpl_sinhf
2144 _GL_FUNCDECL_RPL (sinhf
, float, (float x
));
2145 _GL_CXXALIAS_RPL (sinhf
, float, (float x
));
2149 _GL_FUNCDECL_SYS (sinhf
, float, (float x
));
2151 _GL_CXXALIAS_SYS (sinhf
, float, (float x
));
2153 _GL_CXXALIASWARN (sinhf
);
2154 #elif defined GNULIB_POSIXCHECK
2156 # if HAVE_RAW_DECL_SINHF
2157 _GL_WARN_ON_USE (sinhf
, "sinhf is unportable - "
2158 "use gnulib module sinhf for portability");
2164 # if @REPLACE_SQRTF@
2165 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2167 # define sqrtf rpl_sqrtf
2169 _GL_FUNCDECL_RPL (sqrtf
, float, (float x
));
2170 _GL_CXXALIAS_RPL (sqrtf
, float, (float x
));
2174 _GL_FUNCDECL_SYS (sqrtf
, float, (float x
));
2176 _GL_CXXALIAS_SYS (sqrtf
, float, (float x
));
2178 _GL_CXXALIASWARN (sqrtf
);
2179 #elif defined GNULIB_POSIXCHECK
2181 # if HAVE_RAW_DECL_SQRTF
2182 _GL_WARN_ON_USE (sqrtf
, "sqrtf is unportable - "
2183 "use gnulib module sqrtf for portability");
2188 # if @REPLACE_SQRTL@
2189 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2191 # define sqrtl rpl_sqrtl
2193 _GL_FUNCDECL_RPL (sqrtl
, long double, (long double x
));
2194 _GL_CXXALIAS_RPL (sqrtl
, long double, (long double x
));
2196 # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
2198 _GL_FUNCDECL_SYS (sqrtl
, long double, (long double x
));
2200 _GL_CXXALIAS_SYS (sqrtl
, long double, (long double x
));
2203 _GL_CXXALIASWARN (sqrtl
);
2205 #elif defined GNULIB_POSIXCHECK
2207 # if HAVE_RAW_DECL_SQRTL
2208 _GL_WARN_ON_USE (sqrtl
, "sqrtl is unportable - "
2209 "use gnulib module sqrtl for portability");
2216 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2218 # define tanf rpl_tanf
2220 _GL_FUNCDECL_RPL (tanf
, float, (float x
));
2221 _GL_CXXALIAS_RPL (tanf
, float, (float x
));
2225 _GL_FUNCDECL_SYS (tanf
, float, (float x
));
2227 _GL_CXXALIAS_SYS (tanf
, float, (float x
));
2229 _GL_CXXALIASWARN (tanf
);
2230 #elif defined GNULIB_POSIXCHECK
2232 # if HAVE_RAW_DECL_TANF
2233 _GL_WARN_ON_USE (tanf
, "tanf is unportable - "
2234 "use gnulib module tanf for portability");
2239 # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
2241 _GL_FUNCDECL_SYS (tanl
, long double, (long double x
));
2243 _GL_CXXALIAS_SYS (tanl
, long double, (long double x
));
2245 _GL_CXXALIASWARN (tanl
);
2247 #elif defined GNULIB_POSIXCHECK
2249 # if HAVE_RAW_DECL_TANL
2250 _GL_WARN_ON_USE (tanl
, "tanl is unportable - "
2251 "use gnulib module tanl for portability");
2257 # if @REPLACE_TANHF@
2258 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2260 # define tanhf rpl_tanhf
2262 _GL_FUNCDECL_RPL (tanhf
, float, (float x
));
2263 _GL_CXXALIAS_RPL (tanhf
, float, (float x
));
2267 _GL_FUNCDECL_SYS (tanhf
, float, (float x
));
2269 _GL_CXXALIAS_SYS (tanhf
, float, (float x
));
2271 _GL_CXXALIASWARN (tanhf
);
2272 #elif defined GNULIB_POSIXCHECK
2274 # if HAVE_RAW_DECL_TANHF
2275 _GL_WARN_ON_USE (tanhf
, "tanhf is unportable - "
2276 "use gnulib module tanhf for portability");
2282 # if @REPLACE_TRUNCF@
2283 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2285 # define truncf rpl_truncf
2287 _GL_FUNCDECL_RPL (truncf
, float, (float x
));
2288 _GL_CXXALIAS_RPL (truncf
, float, (float x
));
2290 # if !@HAVE_DECL_TRUNCF@
2291 _GL_FUNCDECL_SYS (truncf
, float, (float x
));
2293 _GL_CXXALIAS_SYS (truncf
, float, (float x
));
2295 _GL_CXXALIASWARN (truncf
);
2296 #elif defined GNULIB_POSIXCHECK
2298 # if HAVE_RAW_DECL_TRUNCF
2299 _GL_WARN_ON_USE (truncf
, "truncf is unportable - "
2300 "use gnulib module truncf for portability");
2305 # if @REPLACE_TRUNC@
2306 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2308 # define trunc rpl_trunc
2310 _GL_FUNCDECL_RPL (trunc
, double, (double x
));
2311 _GL_CXXALIAS_RPL (trunc
, double, (double x
));
2313 # if !@HAVE_DECL_TRUNC@
2314 _GL_FUNCDECL_SYS (trunc
, double, (double x
));
2316 _GL_CXXALIAS_SYS (trunc
, double, (double x
));
2319 _GL_CXXALIASWARN1 (trunc
, double, (double x
));
2321 #elif defined GNULIB_POSIXCHECK
2323 # if HAVE_RAW_DECL_TRUNC
2324 _GL_WARN_ON_USE (trunc
, "trunc is unportable - "
2325 "use gnulib module trunc for portability");
2330 # if @REPLACE_TRUNCL@
2331 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2333 # define truncl rpl_truncl
2335 _GL_FUNCDECL_RPL (truncl
, long double, (long double x
));
2336 _GL_CXXALIAS_RPL (truncl
, long double, (long double x
));
2338 # if !@HAVE_DECL_TRUNCL@
2339 _GL_FUNCDECL_SYS (truncl
, long double, (long double x
));
2341 _GL_CXXALIAS_SYS (truncl
, long double, (long double x
));
2343 _GL_CXXALIASWARN (truncl
);
2344 #elif defined GNULIB_POSIXCHECK
2346 # if HAVE_RAW_DECL_TRUNCL
2347 _GL_WARN_ON_USE (truncl
, "truncl is unportable - "
2348 "use gnulib module truncl for portability");
2354 /* On native Windows, map 'y0' to '_y0', so that -loldnames is not
2355 required. In C++ with GNULIB_NAMESPACE, avoid differences between
2356 platforms by defining GNULIB_NAMESPACE::y0 always. */
2357 # if defined _WIN32 && !defined __CYGWIN__
2358 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2362 _GL_CXXALIAS_MDA (y0
, double, (double x
));
2364 _GL_CXXALIAS_SYS (y0
, double, (double x
));
2366 _GL_CXXALIASWARN (y0
);
2370 /* On native Windows, map 'y1' to '_y1', so that -loldnames is not
2371 required. In C++ with GNULIB_NAMESPACE, avoid differences between
2372 platforms by defining GNULIB_NAMESPACE::y1 always. */
2373 # if defined _WIN32 && !defined __CYGWIN__
2374 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2378 _GL_CXXALIAS_MDA (y1
, double, (double x
));
2380 _GL_CXXALIAS_SYS (y1
, double, (double x
));
2382 _GL_CXXALIASWARN (y1
);
2386 /* On native Windows, map 'yn' to '_yn', so that -loldnames is not
2387 required. In C++ with GNULIB_NAMESPACE, avoid differences between
2388 platforms by defining GNULIB_NAMESPACE::yn always. */
2389 # if defined _WIN32 && !defined __CYGWIN__
2390 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2394 _GL_CXXALIAS_MDA (yn
, double, (int n
, double x
));
2396 _GL_CXXALIAS_SYS (yn
, double, (int n
, double x
));
2398 _GL_CXXALIASWARN (yn
);
2402 /* Definitions of function-like macros come here, after the function
2406 #if @GNULIB_ISFINITE@
2407 # if @REPLACE_ISFINITE@
2408 _GL_EXTERN_C
int gl_isfinitef (float x
);
2409 _GL_EXTERN_C
int gl_isfinited (double x
);
2410 _GL_EXTERN_C
int gl_isfinitel (long double x
);
2412 # define isfinite(x) \
2413 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
2414 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
2418 # if defined isfinite || defined GNULIB_NAMESPACE
2419 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite
)
2421 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__)))
2422 /* This platform's <cmath> possibly defines isfinite through a set of inline
2424 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
, rpl_isfinite
, bool)
2425 # define isfinite rpl_isfinite
2427 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
, isfinite
, bool)
2431 #elif defined GNULIB_POSIXCHECK
2432 # if defined isfinite
2433 _GL_WARN_REAL_FLOATING_DECL (isfinite
);
2435 # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
2441 # if @REPLACE_ISINF@
2442 _GL_EXTERN_C
int gl_isinff (float x
);
2443 _GL_EXTERN_C
int gl_isinfd (double x
);
2444 _GL_EXTERN_C
int gl_isinfl (long double x
);
2447 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
2448 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
2452 # if defined isinf || defined GNULIB_NAMESPACE
2453 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf
)
2455 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__)))
2456 /* This platform's <cmath> possibly defines isinf through a set of inline
2458 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
, rpl_isinf
, bool)
2459 # define isinf rpl_isinf
2461 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
, isinf
, bool)
2465 #elif defined GNULIB_POSIXCHECK
2467 _GL_WARN_REAL_FLOATING_DECL (isinf
);
2469 # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
2475 /* Test for NaN for 'float' numbers. */
2477 /* The original <math.h> included above provides a declaration of isnan macro
2478 or (older) isnanf function. */
2479 # if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2480 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.
2481 GCC >= 4.0 also provides __builtin_isnanf, but clang doesn't. */
2483 # define isnanf(x) __builtin_isnan ((float)(x))
2484 # elif defined isnan
2486 # define isnanf(x) isnan ((float)(x))
2489 /* Test whether X is a NaN. */
2491 # define isnanf rpl_isnanf
2492 _GL_EXTERN_C
int isnanf (float x
);
2497 /* Test for NaN for 'double' numbers.
2498 This function is a gnulib extension, unlike isnan() which applied only
2499 to 'double' numbers earlier but now is a type-generic macro. */
2501 /* The original <math.h> included above provides a declaration of isnan
2503 # if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2504 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. */
2506 # define isnand(x) __builtin_isnan ((double)(x))
2509 # define isnand(x) isnan ((double)(x))
2512 /* Test whether X is a NaN. */
2514 # define isnand rpl_isnand
2515 _GL_EXTERN_C
int isnand (double x
);
2520 /* Test for NaN for 'long double' numbers. */
2522 /* The original <math.h> included above provides a declaration of isnan
2523 macro or (older) isnanl function. */
2524 # if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2525 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.
2526 GCC >= 4.0 also provides __builtin_isnanl, but clang doesn't. */
2528 # define isnanl(x) __builtin_isnan ((long double)(x))
2529 # elif defined isnan
2531 # define isnanl(x) isnan ((long double)(x))
2534 /* Test whether X is a NaN. */
2536 # define isnanl rpl_isnanl
2537 _GL_EXTERN_C
int isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2541 /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
2543 # if @REPLACE_ISNAN@
2544 /* We can't just use the isnanf macro (e.g.) as exposed by
2545 isnanf.h (e.g.) here, because those may end up being macros
2546 that recursively expand back to isnan. So use the gnulib
2547 replacements for them directly. */
2548 # if @HAVE_ISNANF@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2549 # define gl_isnan_f(x) __builtin_isnan ((float)(x))
2551 _GL_EXTERN_C
int rpl_isnanf (float x
);
2552 # define gl_isnan_f(x) rpl_isnanf (x)
2554 # if @HAVE_ISNAND@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2555 # define gl_isnan_d(x) __builtin_isnan ((double)(x))
2557 _GL_EXTERN_C
int rpl_isnand (double x
);
2558 # define gl_isnan_d(x) rpl_isnand (x)
2560 # if @HAVE_ISNANL@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2561 # define gl_isnan_l(x) __builtin_isnan ((long double)(x))
2563 _GL_EXTERN_C
int rpl_isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2564 # define gl_isnan_l(x) rpl_isnanl (x)
2568 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
2569 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
2571 # elif (__GNUC__ >= 4) || (__clang_major__ >= 4)
2574 (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \
2575 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
2576 __builtin_isnan ((float)(x)))
2579 # if defined isnan || defined GNULIB_NAMESPACE
2580 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan
)
2582 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || (defined __FreeBSD__ && __clang_major__ < 7) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__)))
2583 /* This platform's <cmath> possibly defines isnan through a set of inline
2585 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
, rpl_isnan
, bool)
2586 # define isnan rpl_isnan
2588 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
, isnan
, bool)
2592 /* Ensure isnan is a macro. */
2594 # define isnan isnan
2597 #elif defined GNULIB_POSIXCHECK
2599 _GL_WARN_REAL_FLOATING_DECL (isnan
);
2601 # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
2606 #if @GNULIB_SIGNBIT@
2607 # if (@REPLACE_SIGNBIT_USING_BUILTINS@ \
2608 && (!defined __cplusplus || __cplusplus < 201103))
2610 /* GCC >= 4.0 and clang provide three built-ins for signbit. */
2611 # define signbit(x) \
2612 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
2613 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
2614 __builtin_signbitf (x))
2616 # if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit
2618 _GL_EXTERN_C
int gl_signbitf (float arg
);
2619 _GL_EXTERN_C
int gl_signbitd (double arg
);
2620 _GL_EXTERN_C
int gl_signbitl (long double arg
);
2621 # if (__GNUC__ >= 2 || defined __clang__) && !defined __STRICT_ANSI__
2622 # define _GL_NUM_UINT_WORDS(type) \
2623 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
2624 # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
2625 # define gl_signbitf_OPTIMIZED_MACRO
2626 # define gl_signbitf(arg) \
2627 ({ union { float _value; \
2628 unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
2630 _m._value = (arg); \
2631 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
2634 # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
2635 # define gl_signbitd_OPTIMIZED_MACRO
2636 # define gl_signbitd(arg) \
2637 ({ union { double _value; \
2638 unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
2640 _m._value = (arg); \
2641 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
2644 # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
2645 # define gl_signbitl_OPTIMIZED_MACRO
2646 # define gl_signbitl(arg) \
2647 ({ union { long double _value; \
2648 unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
2650 _m._value = (arg); \
2651 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
2655 # define signbit(x) \
2656 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
2657 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
2659 # define GNULIB_defined_signbit 1
2662 # if defined signbit || defined GNULIB_NAMESPACE
2663 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit
)
2665 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__)))
2666 /* This platform's <cmath> possibly defines signbit through a set of inline
2668 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
, rpl_signbit
, bool)
2669 # define signbit rpl_signbit
2671 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
, signbit
, bool)
2675 #elif defined GNULIB_POSIXCHECK
2676 # if defined signbit
2677 _GL_WARN_REAL_FLOATING_DECL (signbit
);
2679 # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
2683 _GL_INLINE_HEADER_END
2685 #endif /* _@GUARD_PREFIX@_MATH_H */
2686 #endif /* _GL_INCLUDING_MATH_H */
2687 #endif /* _@GUARD_PREFIX@_MATH_H */