1 /* A GNU-like <math.h>.
3 Copyright (C) 2002-2003, 2007-2022 Free Software Foundation, Inc.
5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
10 This file 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 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser 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 __attribute__ feature is available in gcc versions 2.5 and later.
60 The attribute __const__ was added in gcc 2.95. */
61 #ifndef _GL_ATTRIBUTE_CONST
62 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined __clang__
63 # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
65 # define _GL_ATTRIBUTE_CONST /* empty */
69 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
71 /* The definition of _GL_ARG_NONNULL is copied here. */
73 /* The definition of _GL_WARN_ON_USE is copied here. */
76 /* Helper macros to define type-generic function FUNC as overloaded functions,
77 rather than as macros like in C. POSIX declares these with an argument of
78 real-floating (that is, one of float, double, or long double). */
79 # define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \
81 _gl_cxx_ ## func ## f (float f) \
86 _gl_cxx_ ## func ## d (double d) \
91 _gl_cxx_ ## func ## l (long double l) \
95 # define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func,rpl_func,rettype) \
100 return _gl_cxx_ ## func ## f (f); \
103 rpl_func (double d) \
105 return _gl_cxx_ ## func ## d (d); \
108 rpl_func (long double l) \
110 return _gl_cxx_ ## func ## l (l); \
115 /* Helper macros to define a portability warning for the
116 classification macro FUNC called with VALUE. POSIX declares the
117 classification macros with an argument of real-floating (that is,
118 one of float, double, or long double). */
119 #define _GL_WARN_REAL_FLOATING_DECL(func) \
120 _GL_MATH_INLINE int \
121 _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
122 "use gnulib module " #func " for portability") \
123 rpl_ ## func ## f (float f) \
127 _GL_MATH_INLINE int \
128 _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
129 "use gnulib module " #func " for portability") \
130 rpl_ ## func ## d (double d) \
134 _GL_MATH_INLINE int \
135 _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
136 "use gnulib module " #func " for portability") \
137 rpl_ ## func ## l (long double l) \
141 #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
142 (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \
143 : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \
144 : rpl_ ## func ## l (value))
148 /* Pull in a function that fixes the 'int' to 'long double' conversion
150 _GL_EXTERN_C
void _Qp_itoq (long double *, int);
151 static void (*_gl_math_fix_itold
) (long double *, int) = _Qp_itoq
;
155 /* POSIX allows platforms that don't support NAN. But all major
156 machines in the past 15 years have supported something close to
157 IEEE NaN, so we define this unconditionally. We also must define
158 it on platforms like Solaris 10, where NAN is present but defined
159 as a function pointer rather than a floating point constant. */
160 #if !defined NAN || @REPLACE_NAN@
161 # if !GNULIB_defined_NAN
163 /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
164 choke on the expression 0.0 / 0.0. */
165 # if defined __DECC || defined _MSC_VER
166 _GL_MATH_INLINE
float
169 static float zero
= 0.0f
;
172 # define NAN (_NaN())
174 # define NAN (0.0f / 0.0f)
176 # define GNULIB_defined_NAN 1
180 /* Solaris 10 defines HUGE_VAL, but as a function pointer rather
181 than a floating point constant. */
182 #if @REPLACE_HUGE_VAL@
184 # define HUGE_VALF (1.0f / 0.0f)
186 # define HUGE_VAL (1.0 / 0.0)
188 # define HUGE_VALL (1.0L / 0.0L)
191 /* HUGE_VALF is a 'float' Infinity. */
193 # if defined _MSC_VER
194 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
195 # define HUGE_VALF (1e25f * 1e25f)
197 # define HUGE_VALF (1.0f / 0.0f)
201 /* HUGE_VAL is a 'double' Infinity. */
203 # if defined _MSC_VER
204 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
205 # define HUGE_VAL (1e250 * 1e250)
207 # define HUGE_VAL (1.0 / 0.0)
211 /* HUGE_VALL is a 'long double' Infinity. */
213 # if defined _MSC_VER
214 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
215 # define HUGE_VALL (1e250L * 1e250L)
217 # define HUGE_VALL (1.0L / 0.0L)
222 #if defined FP_ILOGB0 && defined FP_ILOGBNAN
223 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */
224 # if defined __HAIKU__
225 /* Haiku: match what ilogb() does */
228 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
229 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
232 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
233 # if defined __NetBSD__ || defined __sgi
234 /* NetBSD, IRIX 6.5: match what ilogb() does */
235 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
236 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
238 /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
239 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
240 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
242 /* Solaris 9: match what ilogb() does */
243 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
244 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
246 /* Gnulib defined values. */
247 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
248 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
255 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
257 # define acosf rpl_acosf
259 _GL_FUNCDECL_RPL (acosf
, float, (float x
));
260 _GL_CXXALIAS_RPL (acosf
, float, (float x
));
264 _GL_FUNCDECL_SYS (acosf
, float, (float x
));
266 _GL_CXXALIAS_SYS (acosf
, float, (float x
));
268 _GL_CXXALIASWARN (acosf
);
269 #elif defined GNULIB_POSIXCHECK
271 # if HAVE_RAW_DECL_ACOSF
272 _GL_WARN_ON_USE (acosf
, "acosf is unportable - "
273 "use gnulib module acosf for portability");
278 # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
280 _GL_FUNCDECL_SYS (acosl
, long double, (long double x
));
282 _GL_CXXALIAS_SYS (acosl
, long double, (long double x
));
284 _GL_CXXALIASWARN (acosl
);
286 #elif defined GNULIB_POSIXCHECK
288 # if HAVE_RAW_DECL_ACOSL
289 _GL_WARN_ON_USE (acosl
, "acosl is unportable - "
290 "use gnulib module acosl for portability");
297 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
299 # define asinf rpl_asinf
301 _GL_FUNCDECL_RPL (asinf
, float, (float x
));
302 _GL_CXXALIAS_RPL (asinf
, float, (float x
));
306 _GL_FUNCDECL_SYS (asinf
, float, (float x
));
308 _GL_CXXALIAS_SYS (asinf
, float, (float x
));
310 _GL_CXXALIASWARN (asinf
);
311 #elif defined GNULIB_POSIXCHECK
313 # if HAVE_RAW_DECL_ASINF
314 _GL_WARN_ON_USE (asinf
, "asinf is unportable - "
315 "use gnulib module asinf for portability");
320 # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
322 _GL_FUNCDECL_SYS (asinl
, long double, (long double x
));
324 _GL_CXXALIAS_SYS (asinl
, long double, (long double x
));
326 _GL_CXXALIASWARN (asinl
);
328 #elif defined GNULIB_POSIXCHECK
330 # if HAVE_RAW_DECL_ASINL
331 _GL_WARN_ON_USE (asinl
, "asinl is unportable - "
332 "use gnulib module asinl for portability");
339 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
341 # define atanf rpl_atanf
343 _GL_FUNCDECL_RPL (atanf
, float, (float x
));
344 _GL_CXXALIAS_RPL (atanf
, float, (float x
));
348 _GL_FUNCDECL_SYS (atanf
, float, (float x
));
350 _GL_CXXALIAS_SYS (atanf
, float, (float x
));
352 _GL_CXXALIASWARN (atanf
);
353 #elif defined GNULIB_POSIXCHECK
355 # if HAVE_RAW_DECL_ATANF
356 _GL_WARN_ON_USE (atanf
, "atanf is unportable - "
357 "use gnulib module atanf for portability");
362 # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
364 _GL_FUNCDECL_SYS (atanl
, long double, (long double x
));
366 _GL_CXXALIAS_SYS (atanl
, long double, (long double x
));
368 _GL_CXXALIASWARN (atanl
);
370 #elif defined GNULIB_POSIXCHECK
372 # if HAVE_RAW_DECL_ATANL
373 _GL_WARN_ON_USE (atanl
, "atanl is unportable - "
374 "use gnulib module atanl for portability");
380 # if @REPLACE_ATAN2F@
381 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
383 # define atan2f rpl_atan2f
385 _GL_FUNCDECL_RPL (atan2f
, float, (float y
, float x
));
386 _GL_CXXALIAS_RPL (atan2f
, float, (float y
, float x
));
390 _GL_FUNCDECL_SYS (atan2f
, float, (float y
, float x
));
392 _GL_CXXALIAS_SYS (atan2f
, float, (float y
, float x
));
394 _GL_CXXALIASWARN (atan2f
);
395 #elif defined GNULIB_POSIXCHECK
397 # if HAVE_RAW_DECL_ATAN2F
398 _GL_WARN_ON_USE (atan2f
, "atan2f is unportable - "
399 "use gnulib module atan2f for portability");
406 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
408 # define cbrtf rpl_cbrtf
410 _GL_FUNCDECL_RPL (cbrtf
, float, (float x
));
411 _GL_CXXALIAS_RPL (cbrtf
, float, (float x
));
413 # if !@HAVE_DECL_CBRTF@
414 _GL_FUNCDECL_SYS (cbrtf
, float, (float x
));
416 _GL_CXXALIAS_SYS (cbrtf
, float, (float x
));
418 _GL_CXXALIASWARN (cbrtf
);
419 #elif defined GNULIB_POSIXCHECK
421 # if HAVE_RAW_DECL_CBRTF
422 _GL_WARN_ON_USE (cbrtf
, "cbrtf is unportable - "
423 "use gnulib module cbrtf for portability");
429 _GL_FUNCDECL_SYS (cbrt
, double, (double x
));
431 _GL_CXXALIAS_SYS (cbrt
, double, (double x
));
433 _GL_CXXALIASWARN1 (cbrt
, double, (double x
));
435 #elif defined GNULIB_POSIXCHECK
437 # if HAVE_RAW_DECL_CBRT
438 _GL_WARN_ON_USE (cbrt
, "cbrt is unportable - "
439 "use gnulib module cbrt for portability");
445 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
447 # define cbrtl rpl_cbrtl
449 _GL_FUNCDECL_RPL (cbrtl
, long double, (long double x
));
450 _GL_CXXALIAS_RPL (cbrtl
, long double, (long double x
));
452 # if !@HAVE_DECL_CBRTL@
453 _GL_FUNCDECL_SYS (cbrtl
, long double, (long double x
));
455 _GL_CXXALIAS_SYS (cbrtl
, long double, (long double x
));
457 _GL_CXXALIASWARN (cbrtl
);
458 #elif defined GNULIB_POSIXCHECK
460 # if HAVE_RAW_DECL_CBRTL
461 _GL_WARN_ON_USE (cbrtl
, "cbrtl is unportable - "
462 "use gnulib module cbrtl for portability");
469 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
471 # define ceilf rpl_ceilf
473 _GL_FUNCDECL_RPL (ceilf
, float, (float x
));
474 _GL_CXXALIAS_RPL (ceilf
, float, (float x
));
476 # if !@HAVE_DECL_CEILF@
478 _GL_FUNCDECL_SYS (ceilf
, float, (float x
));
480 _GL_CXXALIAS_SYS (ceilf
, float, (float x
));
482 _GL_CXXALIASWARN (ceilf
);
483 #elif defined GNULIB_POSIXCHECK
485 # if HAVE_RAW_DECL_CEILF
486 _GL_WARN_ON_USE (ceilf
, "ceilf is unportable - "
487 "use gnulib module ceilf for portability");
493 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
495 # define ceil rpl_ceil
497 _GL_FUNCDECL_RPL (ceil
, double, (double x
));
498 _GL_CXXALIAS_RPL (ceil
, double, (double x
));
500 _GL_CXXALIAS_SYS (ceil
, double, (double x
));
503 _GL_CXXALIASWARN1 (ceil
, double, (double x
));
509 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
511 # define ceill rpl_ceill
513 _GL_FUNCDECL_RPL (ceill
, long double, (long double x
));
514 _GL_CXXALIAS_RPL (ceill
, long double, (long double x
));
516 # if !@HAVE_DECL_CEILL@
518 _GL_FUNCDECL_SYS (ceill
, long double, (long double x
));
520 _GL_CXXALIAS_SYS (ceill
, long double, (long double x
));
523 _GL_CXXALIASWARN (ceill
);
525 #elif defined GNULIB_POSIXCHECK
527 # if HAVE_RAW_DECL_CEILL
528 _GL_WARN_ON_USE (ceill
, "ceill is unportable - "
529 "use gnulib module ceill for portability");
534 #if @GNULIB_COPYSIGNF@
535 # if !@HAVE_DECL_COPYSIGNF@
537 _GL_FUNCDECL_SYS (copysignf
, float, (float x
, float y
));
539 _GL_CXXALIAS_SYS (copysignf
, float, (float x
, float y
));
540 _GL_CXXALIASWARN (copysignf
);
541 #elif defined GNULIB_POSIXCHECK
543 # if HAVE_RAW_DECL_COPYSIGNF
544 _GL_WARN_ON_USE (copysignf
, "copysignf is unportable - "
545 "use gnulib module copysignf for portability");
549 #if @GNULIB_COPYSIGN@
550 # if !@HAVE_COPYSIGN@
551 _GL_FUNCDECL_SYS (copysign
, double, (double x
, double y
));
553 _GL_CXXALIAS_SYS (copysign
, double, (double x
, double y
));
555 _GL_CXXALIASWARN1 (copysign
, double, (double x
, double y
));
557 #elif defined GNULIB_POSIXCHECK
559 # if HAVE_RAW_DECL_COPYSIGN
560 _GL_WARN_ON_USE (copysign
, "copysign is unportable - "
561 "use gnulib module copysign for portability");
565 #if @GNULIB_COPYSIGNL@
566 # if !@HAVE_COPYSIGNL@
567 _GL_FUNCDECL_SYS (copysignl
, long double, (long double x
, long double y
));
569 _GL_CXXALIAS_SYS (copysignl
, long double, (long double x
, long double y
));
570 _GL_CXXALIASWARN (copysignl
);
571 #elif defined GNULIB_POSIXCHECK
573 # if HAVE_RAW_DECL_COPYSIGNL
574 _GL_WARN_ON_USE (copysign
, "copysignl is unportable - "
575 "use gnulib module copysignl for portability");
582 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
584 # define cosf rpl_cosf
586 _GL_FUNCDECL_RPL (cosf
, float, (float x
));
587 _GL_CXXALIAS_RPL (cosf
, float, (float x
));
591 _GL_FUNCDECL_SYS (cosf
, float, (float x
));
593 _GL_CXXALIAS_SYS (cosf
, float, (float x
));
595 _GL_CXXALIASWARN (cosf
);
596 #elif defined GNULIB_POSIXCHECK
598 # if HAVE_RAW_DECL_COSF
599 _GL_WARN_ON_USE (cosf
, "cosf is unportable - "
600 "use gnulib module cosf for portability");
605 # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
607 _GL_FUNCDECL_SYS (cosl
, long double, (long double x
));
609 _GL_CXXALIAS_SYS (cosl
, long double, (long double x
));
611 _GL_CXXALIASWARN (cosl
);
613 #elif defined GNULIB_POSIXCHECK
615 # if HAVE_RAW_DECL_COSL
616 _GL_WARN_ON_USE (cosl
, "cosl is unportable - "
617 "use gnulib module cosl for portability");
624 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
626 # define coshf rpl_coshf
628 _GL_FUNCDECL_RPL (coshf
, float, (float x
));
629 _GL_CXXALIAS_RPL (coshf
, float, (float x
));
633 _GL_FUNCDECL_SYS (coshf
, float, (float x
));
635 _GL_CXXALIAS_SYS (coshf
, float, (float x
));
637 _GL_CXXALIASWARN (coshf
);
638 #elif defined GNULIB_POSIXCHECK
640 # if HAVE_RAW_DECL_COSHF
641 _GL_WARN_ON_USE (coshf
, "coshf is unportable - "
642 "use gnulib module coshf for portability");
649 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
651 # define expf rpl_expf
653 _GL_FUNCDECL_RPL (expf
, float, (float x
));
654 _GL_CXXALIAS_RPL (expf
, float, (float x
));
658 _GL_FUNCDECL_SYS (expf
, float, (float x
));
660 _GL_CXXALIAS_SYS (expf
, float, (float x
));
662 _GL_CXXALIASWARN (expf
);
663 #elif defined GNULIB_POSIXCHECK
665 # if HAVE_RAW_DECL_EXPF
666 _GL_WARN_ON_USE (expf
, "expf is unportable - "
667 "use gnulib module expf for portability");
673 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
675 # define expl rpl_expl
677 _GL_FUNCDECL_RPL (expl
, long double, (long double x
));
678 _GL_CXXALIAS_RPL (expl
, long double, (long double x
));
680 # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
682 _GL_FUNCDECL_SYS (expl
, long double, (long double x
));
684 _GL_CXXALIAS_SYS (expl
, long double, (long double x
));
687 _GL_CXXALIASWARN (expl
);
689 #elif defined GNULIB_POSIXCHECK
691 # if HAVE_RAW_DECL_EXPL
692 _GL_WARN_ON_USE (expl
, "expl is unportable - "
693 "use gnulib module expl for portability");
699 # if !@HAVE_DECL_EXP2F@
700 _GL_FUNCDECL_SYS (exp2f
, float, (float x
));
702 _GL_CXXALIAS_SYS (exp2f
, float, (float x
));
703 _GL_CXXALIASWARN (exp2f
);
704 #elif defined GNULIB_POSIXCHECK
706 # if HAVE_RAW_DECL_EXP2F
707 _GL_WARN_ON_USE (exp2f
, "exp2f is unportable - "
708 "use gnulib module exp2f for portability");
714 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
716 # define exp2 rpl_exp2
718 _GL_FUNCDECL_RPL (exp2
, double, (double x
));
719 _GL_CXXALIAS_RPL (exp2
, double, (double x
));
721 # if !@HAVE_DECL_EXP2@
722 _GL_FUNCDECL_SYS (exp2
, double, (double x
));
724 _GL_CXXALIAS_SYS (exp2
, double, (double x
));
727 _GL_CXXALIASWARN1 (exp2
, double, (double x
));
729 #elif defined GNULIB_POSIXCHECK
731 # if HAVE_RAW_DECL_EXP2
732 _GL_WARN_ON_USE (exp2
, "exp2 is unportable - "
733 "use gnulib module exp2 for portability");
739 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
741 # define exp2l rpl_exp2l
743 _GL_FUNCDECL_RPL (exp2l
, long double, (long double x
));
744 _GL_CXXALIAS_RPL (exp2l
, long double, (long double x
));
746 # if !@HAVE_DECL_EXP2L@
748 _GL_FUNCDECL_SYS (exp2l
, long double, (long double x
));
750 _GL_CXXALIAS_SYS (exp2l
, long double, (long double x
));
752 _GL_CXXALIASWARN (exp2l
);
753 #elif defined GNULIB_POSIXCHECK
755 # if HAVE_RAW_DECL_EXP2L
756 _GL_WARN_ON_USE (exp2l
, "exp2l is unportable - "
757 "use gnulib module exp2l for portability");
763 # if @REPLACE_EXPM1F@
764 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
766 # define expm1f rpl_expm1f
768 _GL_FUNCDECL_RPL (expm1f
, float, (float x
));
769 _GL_CXXALIAS_RPL (expm1f
, float, (float x
));
772 _GL_FUNCDECL_SYS (expm1f
, float, (float x
));
774 _GL_CXXALIAS_SYS (expm1f
, float, (float x
));
776 _GL_CXXALIASWARN (expm1f
);
777 #elif defined GNULIB_POSIXCHECK
779 # if HAVE_RAW_DECL_EXPM1F
780 _GL_WARN_ON_USE (expm1f
, "expm1f is unportable - "
781 "use gnulib module expm1f for portability");
787 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
789 # define expm1 rpl_expm1
791 _GL_FUNCDECL_RPL (expm1
, double, (double x
));
792 _GL_CXXALIAS_RPL (expm1
, double, (double x
));
795 _GL_FUNCDECL_SYS (expm1
, double, (double x
));
797 _GL_CXXALIAS_SYS (expm1
, double, (double x
));
800 _GL_CXXALIASWARN1 (expm1
, double, (double x
));
802 #elif defined GNULIB_POSIXCHECK
804 # if HAVE_RAW_DECL_EXPM1
805 _GL_WARN_ON_USE (expm1
, "expm1 is unportable - "
806 "use gnulib module expm1 for portability");
811 # if @REPLACE_EXPM1L@
812 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
814 # define expm1l rpl_expm1l
816 _GL_FUNCDECL_RPL (expm1l
, long double, (long double x
));
817 _GL_CXXALIAS_RPL (expm1l
, long double, (long double x
));
819 # if !@HAVE_DECL_EXPM1L@
821 # if !(defined __cplusplus && defined _AIX)
822 _GL_FUNCDECL_SYS (expm1l
, long double, (long double x
));
825 _GL_CXXALIAS_SYS (expm1l
, long double, (long double x
));
827 _GL_CXXALIASWARN (expm1l
);
828 #elif defined GNULIB_POSIXCHECK
830 # if HAVE_RAW_DECL_EXPM1L
831 _GL_WARN_ON_USE (expm1l
, "expm1l is unportable - "
832 "use gnulib module expm1l for portability");
840 _GL_FUNCDECL_SYS (fabsf
, float, (float x
));
842 _GL_CXXALIAS_SYS (fabsf
, float, (float x
));
844 _GL_CXXALIASWARN (fabsf
);
846 #elif defined GNULIB_POSIXCHECK
848 # if HAVE_RAW_DECL_FABSF
849 _GL_WARN_ON_USE (fabsf
, "fabsf is unportable - "
850 "use gnulib module fabsf for portability");
856 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
858 # define fabsl rpl_fabsl
860 _GL_FUNCDECL_RPL (fabsl
, long double, (long double x
));
861 _GL_CXXALIAS_RPL (fabsl
, long double, (long double x
));
865 _GL_FUNCDECL_SYS (fabsl
, long double, (long double x
));
867 _GL_CXXALIAS_SYS (fabsl
, long double, (long double x
));
870 _GL_CXXALIASWARN (fabsl
);
872 #elif defined GNULIB_POSIXCHECK
874 # if HAVE_RAW_DECL_FABSL
875 _GL_WARN_ON_USE (fabsl
, "fabsl is unportable - "
876 "use gnulib module fabsl for portability");
882 # if @REPLACE_FLOORF@
883 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
885 # define floorf rpl_floorf
887 _GL_FUNCDECL_RPL (floorf
, float, (float x
));
888 _GL_CXXALIAS_RPL (floorf
, float, (float x
));
890 # if !@HAVE_DECL_FLOORF@
892 _GL_FUNCDECL_SYS (floorf
, float, (float x
));
894 _GL_CXXALIAS_SYS (floorf
, float, (float x
));
896 _GL_CXXALIASWARN (floorf
);
897 #elif defined GNULIB_POSIXCHECK
899 # if HAVE_RAW_DECL_FLOORF
900 _GL_WARN_ON_USE (floorf
, "floorf is unportable - "
901 "use gnulib module floorf for portability");
907 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
909 # define floor rpl_floor
911 _GL_FUNCDECL_RPL (floor
, double, (double x
));
912 _GL_CXXALIAS_RPL (floor
, double, (double x
));
914 _GL_CXXALIAS_SYS (floor
, double, (double x
));
917 _GL_CXXALIASWARN1 (floor
, double, (double x
));
922 # if @REPLACE_FLOORL@
923 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
925 # define floorl rpl_floorl
927 _GL_FUNCDECL_RPL (floorl
, long double, (long double x
));
928 _GL_CXXALIAS_RPL (floorl
, long double, (long double x
));
930 # if !@HAVE_DECL_FLOORL@
932 _GL_FUNCDECL_SYS (floorl
, long double, (long double x
));
934 _GL_CXXALIAS_SYS (floorl
, long double, (long double x
));
937 _GL_CXXALIASWARN (floorl
);
939 #elif defined GNULIB_POSIXCHECK
941 # if HAVE_RAW_DECL_FLOORL
942 _GL_WARN_ON_USE (floorl
, "floorl is unportable - "
943 "use gnulib module floorl for portability");
950 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
952 # define fmaf rpl_fmaf
954 _GL_FUNCDECL_RPL (fmaf
, float, (float x
, float y
, float z
));
955 _GL_CXXALIAS_RPL (fmaf
, float, (float x
, float y
, float z
));
959 _GL_FUNCDECL_SYS (fmaf
, float, (float x
, float y
, float z
));
961 _GL_CXXALIAS_SYS (fmaf
, float, (float x
, float y
, float z
));
963 _GL_CXXALIASWARN (fmaf
);
964 #elif defined GNULIB_POSIXCHECK
966 # if HAVE_RAW_DECL_FMAF
967 _GL_WARN_ON_USE (fmaf
, "fmaf is unportable - "
968 "use gnulib module fmaf for portability");
974 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
978 _GL_FUNCDECL_RPL (fma
, double, (double x
, double y
, double z
));
979 _GL_CXXALIAS_RPL (fma
, double, (double x
, double y
, double z
));
983 _GL_FUNCDECL_SYS (fma
, double, (double x
, double y
, double z
));
985 _GL_CXXALIAS_SYS (fma
, double, (double x
, double y
, double z
));
988 _GL_CXXALIASWARN1 (fma
, double, (double x
, double y
, double z
));
990 #elif defined GNULIB_POSIXCHECK
992 # if HAVE_RAW_DECL_FMA
993 _GL_WARN_ON_USE (fma
, "fma is unportable - "
994 "use gnulib module fma for portability");
1000 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1002 # define fmal rpl_fmal
1004 _GL_FUNCDECL_RPL (fmal
, long double,
1005 (long double x
, long double y
, long double z
));
1006 _GL_CXXALIAS_RPL (fmal
, long double,
1007 (long double x
, long double y
, long double z
));
1011 # if !(defined __cplusplus && defined _AIX)
1012 _GL_FUNCDECL_SYS (fmal
, long double,
1013 (long double x
, long double y
, long double z
));
1016 _GL_CXXALIAS_SYS (fmal
, long double,
1017 (long double x
, long double y
, long double z
));
1019 _GL_CXXALIASWARN (fmal
);
1020 #elif defined GNULIB_POSIXCHECK
1022 # if HAVE_RAW_DECL_FMAL
1023 _GL_WARN_ON_USE (fmal
, "fmal is unportable - "
1024 "use gnulib module fmal for portability");
1030 # if @REPLACE_FMODF@
1031 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1033 # define fmodf rpl_fmodf
1035 _GL_FUNCDECL_RPL (fmodf
, float, (float x
, float y
));
1036 _GL_CXXALIAS_RPL (fmodf
, float, (float x
, float y
));
1040 _GL_FUNCDECL_SYS (fmodf
, float, (float x
, float y
));
1042 _GL_CXXALIAS_SYS (fmodf
, float, (float x
, float y
));
1044 _GL_CXXALIASWARN (fmodf
);
1045 #elif defined GNULIB_POSIXCHECK
1047 # if HAVE_RAW_DECL_FMODF
1048 _GL_WARN_ON_USE (fmodf
, "fmodf is unportable - "
1049 "use gnulib module fmodf for portability");
1055 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1057 # define fmod rpl_fmod
1059 _GL_FUNCDECL_RPL (fmod
, double, (double x
, double y
));
1060 _GL_CXXALIAS_RPL (fmod
, double, (double x
, double y
));
1062 _GL_CXXALIAS_SYS (fmod
, double, (double x
, double y
));
1065 _GL_CXXALIASWARN1 (fmod
, double, (double x
, double y
));
1067 #elif defined GNULIB_POSIXCHECK
1069 # if HAVE_RAW_DECL_FMOD
1070 _GL_WARN_ON_USE (fmod
, "fmod has portability problems - "
1071 "use gnulib module fmod for portability");
1076 # if @REPLACE_FMODL@
1077 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1079 # define fmodl rpl_fmodl
1081 _GL_FUNCDECL_RPL (fmodl
, long double, (long double x
, long double y
));
1082 _GL_CXXALIAS_RPL (fmodl
, long double, (long double x
, long double y
));
1086 _GL_FUNCDECL_SYS (fmodl
, long double, (long double x
, long double y
));
1088 _GL_CXXALIAS_SYS (fmodl
, long double, (long double x
, long double y
));
1091 _GL_CXXALIASWARN (fmodl
);
1093 #elif defined GNULIB_POSIXCHECK
1095 # if HAVE_RAW_DECL_FMODL
1096 _GL_WARN_ON_USE (fmodl
, "fmodl is unportable - "
1097 "use gnulib module fmodl for portability");
1103 x = mantissa * 2^exp
1105 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1106 If x is zero: mantissa = x, exp = 0.
1107 If x is infinite or NaN: mantissa = x, exp unspecified.
1108 Store exp in *EXPPTR and return mantissa. */
1110 # if @REPLACE_FREXPF@
1111 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1113 # define frexpf rpl_frexpf
1115 _GL_FUNCDECL_RPL (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1116 _GL_CXXALIAS_RPL (frexpf
, float, (float x
, int *expptr
));
1120 _GL_FUNCDECL_SYS (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1122 _GL_CXXALIAS_SYS (frexpf
, float, (float x
, int *expptr
));
1125 _GL_CXXALIASWARN (frexpf
);
1127 #elif defined GNULIB_POSIXCHECK
1129 # if HAVE_RAW_DECL_FREXPF
1130 _GL_WARN_ON_USE (frexpf
, "frexpf is unportable - "
1131 "use gnulib module frexpf for portability");
1136 x = mantissa * 2^exp
1138 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1139 If x is zero: mantissa = x, exp = 0.
1140 If x is infinite or NaN: mantissa = x, exp unspecified.
1141 Store exp in *EXPPTR and return mantissa. */
1143 # if @REPLACE_FREXP@
1144 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1146 # define frexp rpl_frexp
1148 _GL_FUNCDECL_RPL (frexp
, double, (double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1149 _GL_CXXALIAS_RPL (frexp
, double, (double x
, int *expptr
));
1151 _GL_CXXALIAS_SYS (frexp
, double, (double x
, int *expptr
));
1154 _GL_CXXALIASWARN1 (frexp
, double, (double x
, int *expptr
));
1156 #elif defined GNULIB_POSIXCHECK
1158 /* Assume frexp is always declared. */
1159 _GL_WARN_ON_USE (frexp
, "frexp is unportable - "
1160 "use gnulib module frexp for portability");
1164 x = mantissa * 2^exp
1166 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1167 If x is zero: mantissa = x, exp = 0.
1168 If x is infinite or NaN: mantissa = x, exp unspecified.
1169 Store exp in *EXPPTR and return mantissa. */
1170 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
1171 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1173 # define frexpl rpl_frexpl
1175 _GL_FUNCDECL_RPL (frexpl
, long double,
1176 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1177 _GL_CXXALIAS_RPL (frexpl
, long double, (long double x
, int *expptr
));
1179 # if !@HAVE_DECL_FREXPL@
1180 _GL_FUNCDECL_SYS (frexpl
, long double,
1181 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1183 # if @GNULIB_FREXPL@
1184 _GL_CXXALIAS_SYS (frexpl
, long double, (long double x
, int *expptr
));
1187 #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
1189 _GL_CXXALIASWARN (frexpl
);
1192 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
1194 # if HAVE_RAW_DECL_FREXPL
1195 _GL_WARN_ON_USE (frexpl
, "frexpl is unportable - "
1196 "use gnulib module frexpl for portability");
1201 /* Return sqrt(x^2+y^2). */
1203 # if @REPLACE_HYPOTF@
1204 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1206 # define hypotf rpl_hypotf
1208 _GL_FUNCDECL_RPL (hypotf
, float, (float x
, float y
));
1209 _GL_CXXALIAS_RPL (hypotf
, float, (float x
, float y
));
1212 _GL_FUNCDECL_SYS (hypotf
, float, (float x
, float y
));
1214 _GL_CXXALIAS_SYS (hypotf
, float, (float x
, float y
));
1217 _GL_CXXALIASWARN (hypotf
);
1219 #elif defined GNULIB_POSIXCHECK
1221 # if HAVE_RAW_DECL_HYPOTF
1222 _GL_WARN_ON_USE (hypotf
, "hypotf is unportable - "
1223 "use gnulib module hypotf for portability");
1227 /* Return sqrt(x^2+y^2). */
1229 # if @REPLACE_HYPOT@
1230 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1232 # define hypot rpl_hypot
1234 _GL_FUNCDECL_RPL (hypot
, double, (double x
, double y
));
1235 _GL_CXXALIAS_RPL (hypot
, double, (double x
, double y
));
1237 _GL_CXXALIAS_SYS (hypot
, double, (double x
, double y
));
1240 _GL_CXXALIASWARN1 (hypot
, double, (double x
, double y
));
1242 #elif defined GNULIB_POSIXCHECK
1244 # if HAVE_RAW_DECL_HYPOT
1245 _GL_WARN_ON_USE (hypotf
, "hypot has portability problems - "
1246 "use gnulib module hypot for portability");
1250 /* Return sqrt(x^2+y^2). */
1252 # if @REPLACE_HYPOTL@
1253 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1255 # define hypotl rpl_hypotl
1257 _GL_FUNCDECL_RPL (hypotl
, long double, (long double x
, long double y
));
1258 _GL_CXXALIAS_RPL (hypotl
, long double, (long double x
, long double y
));
1261 _GL_FUNCDECL_SYS (hypotl
, long double, (long double x
, long double y
));
1263 _GL_CXXALIAS_SYS (hypotl
, long double, (long double x
, long double y
));
1266 _GL_CXXALIASWARN (hypotl
);
1268 #elif defined GNULIB_POSIXCHECK
1270 # if HAVE_RAW_DECL_HYPOTL
1271 _GL_WARN_ON_USE (hypotl
, "hypotl is unportable - "
1272 "use gnulib module hypotl for portability");
1278 # if @REPLACE_ILOGBF@
1279 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1281 # define ilogbf rpl_ilogbf
1283 _GL_FUNCDECL_RPL (ilogbf
, int, (float x
));
1284 _GL_CXXALIAS_RPL (ilogbf
, int, (float x
));
1287 _GL_FUNCDECL_SYS (ilogbf
, int, (float x
));
1289 _GL_CXXALIAS_SYS (ilogbf
, int, (float x
));
1291 _GL_CXXALIASWARN (ilogbf
);
1292 #elif defined GNULIB_POSIXCHECK
1294 # if HAVE_RAW_DECL_ILOGBF
1295 _GL_WARN_ON_USE (ilogbf
, "ilogbf is unportable - "
1296 "use gnulib module ilogbf for portability");
1301 # if @REPLACE_ILOGB@
1302 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1304 # define ilogb rpl_ilogb
1306 _GL_FUNCDECL_RPL (ilogb
, int, (double x
));
1307 _GL_CXXALIAS_RPL (ilogb
, int, (double x
));
1310 _GL_FUNCDECL_SYS (ilogb
, int, (double x
));
1312 _GL_CXXALIAS_SYS (ilogb
, int, (double x
));
1315 _GL_CXXALIASWARN1 (ilogb
, int, (double x
));
1317 #elif defined GNULIB_POSIXCHECK
1319 # if HAVE_RAW_DECL_ILOGB
1320 _GL_WARN_ON_USE (ilogb
, "ilogb is unportable - "
1321 "use gnulib module ilogb for portability");
1326 # if @REPLACE_ILOGBL@
1327 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1329 # define ilogbl rpl_ilogbl
1331 _GL_FUNCDECL_RPL (ilogbl
, int, (long double x
));
1332 _GL_CXXALIAS_RPL (ilogbl
, int, (long double x
));
1336 _GL_FUNCDECL_SYS (ilogbl
, int, (long double x
));
1338 _GL_CXXALIAS_SYS (ilogbl
, int, (long double x
));
1340 _GL_CXXALIASWARN (ilogbl
);
1341 #elif defined GNULIB_POSIXCHECK
1343 # if HAVE_RAW_DECL_ILOGBL
1344 _GL_WARN_ON_USE (ilogbl
, "ilogbl is unportable - "
1345 "use gnulib module ilogbl for portability");
1351 /* On native Windows, map 'j0' to '_j0', so that -loldnames is not
1352 required. In C++ with GNULIB_NAMESPACE, avoid differences between
1353 platforms by defining GNULIB_NAMESPACE::j0 always. */
1354 # if defined _WIN32 && !defined __CYGWIN__
1355 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1359 _GL_CXXALIAS_MDA (j0
, double, (double x
));
1361 _GL_CXXALIAS_SYS (j0
, double, (double x
));
1363 _GL_CXXALIASWARN (j0
);
1367 /* On native Windows, map 'j1' to '_j1', so that -loldnames is not
1368 required. In C++ with GNULIB_NAMESPACE, avoid differences between
1369 platforms by defining GNULIB_NAMESPACE::j1 always. */
1370 # if defined _WIN32 && !defined __CYGWIN__
1371 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1375 _GL_CXXALIAS_MDA (j1
, double, (double x
));
1377 _GL_CXXALIAS_SYS (j1
, double, (double x
));
1379 _GL_CXXALIASWARN (j1
);
1383 /* On native Windows, map 'jn' to '_jn', so that -loldnames is not
1384 required. In C++ with GNULIB_NAMESPACE, avoid differences between
1385 platforms by defining GNULIB_NAMESPACE::jn always. */
1386 # if defined _WIN32 && !defined __CYGWIN__
1387 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1391 _GL_CXXALIAS_MDA (jn
, double, (int n
, double x
));
1393 _GL_CXXALIAS_SYS (jn
, double, (int n
, double x
));
1395 _GL_CXXALIASWARN (jn
);
1399 /* Return x * 2^exp. */
1403 _GL_FUNCDECL_SYS (ldexpf
, float, (float x
, int exp
));
1405 _GL_CXXALIAS_SYS (ldexpf
, float, (float x
, int exp
));
1407 _GL_CXXALIASWARN (ldexpf
);
1409 #elif defined GNULIB_POSIXCHECK
1411 # if HAVE_RAW_DECL_LDEXPF
1412 _GL_WARN_ON_USE (ldexpf
, "ldexpf is unportable - "
1413 "use gnulib module ldexpf for portability");
1417 /* Return x * 2^exp. */
1418 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
1419 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1421 # define ldexpl rpl_ldexpl
1423 _GL_FUNCDECL_RPL (ldexpl
, long double, (long double x
, int exp
));
1424 _GL_CXXALIAS_RPL (ldexpl
, long double, (long double x
, int exp
));
1426 # if !@HAVE_DECL_LDEXPL@
1427 _GL_FUNCDECL_SYS (ldexpl
, long double, (long double x
, int exp
));
1429 # if @GNULIB_LDEXPL@
1430 _GL_CXXALIAS_SYS (ldexpl
, long double, (long double x
, int exp
));
1435 _GL_CXXALIASWARN (ldexpl
);
1438 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
1440 # if HAVE_RAW_DECL_LDEXPL
1441 _GL_WARN_ON_USE (ldexpl
, "ldexpl is unportable - "
1442 "use gnulib module ldexpl for portability");
1449 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1451 # define logf rpl_logf
1453 _GL_FUNCDECL_RPL (logf
, float, (float x
));
1454 _GL_CXXALIAS_RPL (logf
, float, (float x
));
1458 _GL_FUNCDECL_SYS (logf
, float, (float x
));
1460 _GL_CXXALIAS_SYS (logf
, float, (float x
));
1462 _GL_CXXALIASWARN (logf
);
1463 #elif defined GNULIB_POSIXCHECK
1465 # if HAVE_RAW_DECL_LOGF
1466 _GL_WARN_ON_USE (logf
, "logf is unportable - "
1467 "use gnulib module logf for portability");
1473 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1475 # define log rpl_log
1477 _GL_FUNCDECL_RPL (log
, double, (double x
));
1478 _GL_CXXALIAS_RPL (log
, double, (double x
));
1480 _GL_CXXALIAS_SYS (log
, double, (double x
));
1483 _GL_CXXALIASWARN1 (log
, double, (double x
));
1485 #elif defined GNULIB_POSIXCHECK
1487 # if HAVE_RAW_DECL_LOG
1488 _GL_WARN_ON_USE (log
, "log has portability problems - "
1489 "use gnulib module log for portability");
1495 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1497 # define logl rpl_logl
1499 _GL_FUNCDECL_RPL (logl
, long double, (long double x
));
1500 _GL_CXXALIAS_RPL (logl
, long double, (long double x
));
1502 # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
1504 _GL_FUNCDECL_SYS (logl
, long double, (long double x
));
1506 _GL_CXXALIAS_SYS (logl
, long double, (long double x
));
1509 _GL_CXXALIASWARN (logl
);
1511 #elif defined GNULIB_POSIXCHECK
1513 # if HAVE_RAW_DECL_LOGL
1514 _GL_WARN_ON_USE (logl
, "logl is unportable - "
1515 "use gnulib module logl for portability");
1521 # if @REPLACE_LOG10F@
1522 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1524 # define log10f rpl_log10f
1526 _GL_FUNCDECL_RPL (log10f
, float, (float x
));
1527 _GL_CXXALIAS_RPL (log10f
, float, (float x
));
1531 _GL_FUNCDECL_SYS (log10f
, float, (float x
));
1533 _GL_CXXALIAS_SYS (log10f
, float, (float x
));
1535 _GL_CXXALIASWARN (log10f
);
1536 #elif defined GNULIB_POSIXCHECK
1538 # if HAVE_RAW_DECL_LOG10F
1539 _GL_WARN_ON_USE (log10f
, "log10f is unportable - "
1540 "use gnulib module log10f for portability");
1545 # if @REPLACE_LOG10@
1546 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1548 # define log10 rpl_log10
1550 _GL_FUNCDECL_RPL (log10
, double, (double x
));
1551 _GL_CXXALIAS_RPL (log10
, double, (double x
));
1553 _GL_CXXALIAS_SYS (log10
, double, (double x
));
1556 _GL_CXXALIASWARN1 (log10
, double, (double x
));
1558 #elif defined GNULIB_POSIXCHECK
1560 # if HAVE_RAW_DECL_LOG10
1561 _GL_WARN_ON_USE (log10
, "log10 has portability problems - "
1562 "use gnulib module log10 for portability");
1567 # if @REPLACE_LOG10L@
1568 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1570 # define log10l rpl_log10l
1572 _GL_FUNCDECL_RPL (log10l
, long double, (long double x
));
1573 _GL_CXXALIAS_RPL (log10l
, long double, (long double x
));
1575 # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
1577 _GL_FUNCDECL_SYS (log10l
, long double, (long double x
));
1579 _GL_CXXALIAS_SYS (log10l
, long double, (long double x
));
1582 _GL_CXXALIASWARN (log10l
);
1584 #elif defined GNULIB_POSIXCHECK
1586 # if HAVE_RAW_DECL_LOG10L
1587 _GL_WARN_ON_USE (log10l
, "log10l is unportable - "
1588 "use gnulib module log10l for portability");
1594 # if @REPLACE_LOG1PF@
1595 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1597 # define log1pf rpl_log1pf
1599 _GL_FUNCDECL_RPL (log1pf
, float, (float x
));
1600 _GL_CXXALIAS_RPL (log1pf
, float, (float x
));
1603 _GL_FUNCDECL_SYS (log1pf
, float, (float x
));
1605 _GL_CXXALIAS_SYS (log1pf
, float, (float x
));
1607 _GL_CXXALIASWARN (log1pf
);
1608 #elif defined GNULIB_POSIXCHECK
1610 # if HAVE_RAW_DECL_LOG1PF
1611 _GL_WARN_ON_USE (log1pf
, "log1pf is unportable - "
1612 "use gnulib module log1pf for portability");
1617 # if @REPLACE_LOG1P@
1618 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1620 # define log1p rpl_log1p
1622 _GL_FUNCDECL_RPL (log1p
, double, (double x
));
1623 _GL_CXXALIAS_RPL (log1p
, double, (double x
));
1626 _GL_FUNCDECL_SYS (log1p
, double, (double x
));
1628 _GL_CXXALIAS_SYS (log1p
, double, (double x
));
1631 _GL_CXXALIASWARN1 (log1p
, double, (double x
));
1633 #elif defined GNULIB_POSIXCHECK
1635 # if HAVE_RAW_DECL_LOG1P
1636 _GL_WARN_ON_USE (log1p
, "log1p has portability problems - "
1637 "use gnulib module log1p for portability");
1642 # if @REPLACE_LOG1PL@
1643 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1645 # define log1pl rpl_log1pl
1647 _GL_FUNCDECL_RPL (log1pl
, long double, (long double x
));
1648 _GL_CXXALIAS_RPL (log1pl
, long double, (long double x
));
1651 _GL_FUNCDECL_SYS (log1pl
, long double, (long double x
));
1653 _GL_CXXALIAS_SYS (log1pl
, long double, (long double x
));
1655 _GL_CXXALIASWARN (log1pl
);
1656 #elif defined GNULIB_POSIXCHECK
1658 # if HAVE_RAW_DECL_LOG1PL
1659 _GL_WARN_ON_USE (log1pl
, "log1pl has portability problems - "
1660 "use gnulib module log1pl for portability");
1666 # if @REPLACE_LOG2F@
1667 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1669 # define log2f rpl_log2f
1671 _GL_FUNCDECL_RPL (log2f
, float, (float x
));
1672 _GL_CXXALIAS_RPL (log2f
, float, (float x
));
1674 # if !@HAVE_DECL_LOG2F@
1676 _GL_FUNCDECL_SYS (log2f
, float, (float x
));
1678 _GL_CXXALIAS_SYS (log2f
, float, (float x
));
1680 _GL_CXXALIASWARN (log2f
);
1681 #elif defined GNULIB_POSIXCHECK
1683 # if HAVE_RAW_DECL_LOG2F
1684 _GL_WARN_ON_USE (log2f
, "log2f is unportable - "
1685 "use gnulib module log2f for portability");
1691 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1693 # define log2 rpl_log2
1695 _GL_FUNCDECL_RPL (log2
, double, (double x
));
1696 _GL_CXXALIAS_RPL (log2
, double, (double x
));
1698 # if !@HAVE_DECL_LOG2@
1700 _GL_FUNCDECL_SYS (log2
, double, (double x
));
1702 _GL_CXXALIAS_SYS (log2
, double, (double x
));
1705 _GL_CXXALIASWARN1 (log2
, double, (double x
));
1707 #elif defined GNULIB_POSIXCHECK
1709 # if HAVE_RAW_DECL_LOG2
1710 _GL_WARN_ON_USE (log2
, "log2 is unportable - "
1711 "use gnulib module log2 for portability");
1716 # if @REPLACE_LOG2L@
1717 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1719 # define log2l rpl_log2l
1721 _GL_FUNCDECL_RPL (log2l
, long double, (long double x
));
1722 _GL_CXXALIAS_RPL (log2l
, long double, (long double x
));
1724 # if !@HAVE_DECL_LOG2L@
1725 _GL_FUNCDECL_SYS (log2l
, long double, (long double x
));
1727 _GL_CXXALIAS_SYS (log2l
, long double, (long double x
));
1729 _GL_CXXALIASWARN (log2l
);
1730 #elif defined GNULIB_POSIXCHECK
1732 # if HAVE_RAW_DECL_LOG2L
1733 _GL_WARN_ON_USE (log2l
, "log2l is unportable - "
1734 "use gnulib module log2l for portability");
1740 # if @REPLACE_LOGBF@
1741 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1743 # define logbf rpl_logbf
1745 _GL_FUNCDECL_RPL (logbf
, float, (float x
));
1746 _GL_CXXALIAS_RPL (logbf
, float, (float x
));
1749 _GL_FUNCDECL_SYS (logbf
, float, (float x
));
1751 _GL_CXXALIAS_SYS (logbf
, float, (float x
));
1753 _GL_CXXALIASWARN (logbf
);
1754 #elif defined GNULIB_POSIXCHECK
1756 # if HAVE_RAW_DECL_LOGBF
1757 _GL_WARN_ON_USE (logbf
, "logbf is unportable - "
1758 "use gnulib module logbf for portability");
1764 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1766 # define logb rpl_logb
1768 _GL_FUNCDECL_RPL (logb
, double, (double x
));
1769 _GL_CXXALIAS_RPL (logb
, double, (double x
));
1771 # if !@HAVE_DECL_LOGB@
1772 _GL_FUNCDECL_SYS (logb
, double, (double x
));
1774 _GL_CXXALIAS_SYS (logb
, double, (double x
));
1777 _GL_CXXALIASWARN1 (logb
, double, (double x
));
1779 #elif defined GNULIB_POSIXCHECK
1781 # if HAVE_RAW_DECL_LOGB
1782 _GL_WARN_ON_USE (logb
, "logb is unportable - "
1783 "use gnulib module logb for portability");
1788 # if @REPLACE_LOGBL@
1789 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1791 # define logbl rpl_logbl
1793 _GL_FUNCDECL_RPL (logbl
, long double, (long double x
));
1794 _GL_CXXALIAS_RPL (logbl
, long double, (long double x
));
1797 _GL_FUNCDECL_SYS (logbl
, long double, (long double x
));
1799 _GL_CXXALIAS_SYS (logbl
, long double, (long double x
));
1801 _GL_CXXALIASWARN (logbl
);
1802 #elif defined GNULIB_POSIXCHECK
1804 # if HAVE_RAW_DECL_LOGBL
1805 _GL_WARN_ON_USE (logbl
, "logbl is unportable - "
1806 "use gnulib module logbl for portability");
1812 # if @REPLACE_MODFF@
1813 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1815 # define modff rpl_modff
1817 _GL_FUNCDECL_RPL (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1818 _GL_CXXALIAS_RPL (modff
, float, (float x
, float *iptr
));
1822 _GL_FUNCDECL_SYS (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1824 _GL_CXXALIAS_SYS (modff
, float, (float x
, float *iptr
));
1826 _GL_CXXALIASWARN (modff
);
1827 #elif defined GNULIB_POSIXCHECK
1829 # if HAVE_RAW_DECL_MODFF
1830 _GL_WARN_ON_USE (modff
, "modff is unportable - "
1831 "use gnulib module modff for portability");
1837 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1839 # define modf rpl_modf
1841 _GL_FUNCDECL_RPL (modf
, double, (double x
, double *iptr
) _GL_ARG_NONNULL ((2)));
1842 _GL_CXXALIAS_RPL (modf
, double, (double x
, double *iptr
));
1844 _GL_CXXALIAS_SYS (modf
, double, (double x
, double *iptr
));
1847 _GL_CXXALIASWARN1 (modf
, double, (double x
, double *iptr
));
1849 #elif defined GNULIB_POSIXCHECK
1851 # if HAVE_RAW_DECL_MODF
1852 _GL_WARN_ON_USE (modf
, "modf has portability problems - "
1853 "use gnulib module modf for portability");
1858 # if @REPLACE_MODFL@
1859 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1861 # define modfl rpl_modfl
1863 _GL_FUNCDECL_RPL (modfl
, long double, (long double x
, long double *iptr
)
1864 _GL_ARG_NONNULL ((2)));
1865 _GL_CXXALIAS_RPL (modfl
, long double, (long double x
, long double *iptr
));
1869 _GL_FUNCDECL_SYS (modfl
, long double, (long double x
, long double *iptr
)
1870 _GL_ARG_NONNULL ((2)));
1872 _GL_CXXALIAS_SYS (modfl
, long double, (long double x
, long double *iptr
));
1875 _GL_CXXALIASWARN (modfl
);
1877 #elif defined GNULIB_POSIXCHECK
1879 # if HAVE_RAW_DECL_MODFL
1880 _GL_WARN_ON_USE (modfl
, "modfl is unportable - "
1881 "use gnulib module modfl for portability");
1889 _GL_FUNCDECL_SYS (powf
, float, (float x
, float y
));
1891 _GL_CXXALIAS_SYS (powf
, float, (float x
, float y
));
1892 _GL_CXXALIASWARN (powf
);
1893 #elif defined GNULIB_POSIXCHECK
1895 # if HAVE_RAW_DECL_POWF
1896 _GL_WARN_ON_USE (powf
, "powf is unportable - "
1897 "use gnulib module powf for portability");
1902 #if @GNULIB_REMAINDERF@
1903 # if @REPLACE_REMAINDERF@
1904 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1906 # define remainderf rpl_remainderf
1908 _GL_FUNCDECL_RPL (remainderf
, float, (float x
, float y
));
1909 _GL_CXXALIAS_RPL (remainderf
, float, (float x
, float y
));
1911 # if !@HAVE_REMAINDERF@
1912 _GL_FUNCDECL_SYS (remainderf
, float, (float x
, float y
));
1914 _GL_CXXALIAS_SYS (remainderf
, float, (float x
, float y
));
1916 _GL_CXXALIASWARN (remainderf
);
1917 #elif defined GNULIB_POSIXCHECK
1919 # if HAVE_RAW_DECL_REMAINDERF
1920 _GL_WARN_ON_USE (remainderf
, "remainderf is unportable - "
1921 "use gnulib module remainderf for portability");
1925 #if @GNULIB_REMAINDER@
1926 # if @REPLACE_REMAINDER@
1927 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1929 # define remainder rpl_remainder
1931 _GL_FUNCDECL_RPL (remainder
, double, (double x
, double y
));
1932 _GL_CXXALIAS_RPL (remainder
, double, (double x
, double y
));
1934 # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
1935 _GL_FUNCDECL_SYS (remainder
, double, (double x
, double y
));
1937 _GL_CXXALIAS_SYS (remainder
, double, (double x
, double y
));
1940 _GL_CXXALIASWARN1 (remainder
, double, (double x
, double y
));
1942 #elif defined GNULIB_POSIXCHECK
1944 # if HAVE_RAW_DECL_REMAINDER
1945 _GL_WARN_ON_USE (remainder
, "remainder is unportable - "
1946 "use gnulib module remainder for portability");
1950 #if @GNULIB_REMAINDERL@
1951 # if @REPLACE_REMAINDERL@
1952 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1954 # define remainderl rpl_remainderl
1956 _GL_FUNCDECL_RPL (remainderl
, long double, (long double x
, long double y
));
1957 _GL_CXXALIAS_RPL (remainderl
, long double, (long double x
, long double y
));
1959 # if !@HAVE_DECL_REMAINDERL@
1961 # if !(defined __cplusplus && defined _AIX)
1962 _GL_FUNCDECL_SYS (remainderl
, long double, (long double x
, long double y
));
1965 _GL_CXXALIAS_SYS (remainderl
, long double, (long double x
, long double y
));
1967 _GL_CXXALIASWARN (remainderl
);
1968 #elif defined GNULIB_POSIXCHECK
1970 # if HAVE_RAW_DECL_REMAINDERL
1971 _GL_WARN_ON_USE (remainderl
, "remainderl is unportable - "
1972 "use gnulib module remainderl for portability");
1978 # if !@HAVE_DECL_RINTF@
1979 _GL_FUNCDECL_SYS (rintf
, float, (float x
));
1981 _GL_CXXALIAS_SYS (rintf
, float, (float x
));
1982 _GL_CXXALIASWARN (rintf
);
1983 #elif defined GNULIB_POSIXCHECK
1985 # if HAVE_RAW_DECL_RINTF
1986 _GL_WARN_ON_USE (rintf
, "rintf is unportable - "
1987 "use gnulib module rintf for portability");
1993 _GL_FUNCDECL_SYS (rint
, double, (double x
));
1995 _GL_CXXALIAS_SYS (rint
, double, (double x
));
1997 _GL_CXXALIASWARN1 (rint
, double, (double x
));
1999 #elif defined GNULIB_POSIXCHECK
2001 # if HAVE_RAW_DECL_RINT
2002 _GL_WARN_ON_USE (rint
, "rint is unportable - "
2003 "use gnulib module rint for portability");
2008 # if @REPLACE_RINTL@
2009 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2011 # define rintl rpl_rintl
2013 _GL_FUNCDECL_RPL (rintl
, long double, (long double x
));
2014 _GL_CXXALIAS_RPL (rintl
, long double, (long double x
));
2017 _GL_FUNCDECL_SYS (rintl
, long double, (long double x
));
2019 _GL_CXXALIAS_SYS (rintl
, long double, (long double x
));
2021 _GL_CXXALIASWARN (rintl
);
2022 #elif defined GNULIB_POSIXCHECK
2024 # if HAVE_RAW_DECL_RINTL
2025 _GL_WARN_ON_USE (rintl
, "rintl is unportable - "
2026 "use gnulib module rintl for portability");
2032 # if @REPLACE_ROUNDF@
2033 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2035 # define roundf rpl_roundf
2037 _GL_FUNCDECL_RPL (roundf
, float, (float x
));
2038 _GL_CXXALIAS_RPL (roundf
, float, (float x
));
2040 # if !@HAVE_DECL_ROUNDF@
2041 _GL_FUNCDECL_SYS (roundf
, float, (float x
));
2043 _GL_CXXALIAS_SYS (roundf
, float, (float x
));
2045 _GL_CXXALIASWARN (roundf
);
2046 #elif defined GNULIB_POSIXCHECK
2048 # if HAVE_RAW_DECL_ROUNDF
2049 _GL_WARN_ON_USE (roundf
, "roundf is unportable - "
2050 "use gnulib module roundf for portability");
2055 # if @REPLACE_ROUND@
2056 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2058 # define round rpl_round
2060 _GL_FUNCDECL_RPL (round
, double, (double x
));
2061 _GL_CXXALIAS_RPL (round
, double, (double x
));
2063 # if !@HAVE_DECL_ROUND@
2064 _GL_FUNCDECL_SYS (round
, double, (double x
));
2066 _GL_CXXALIAS_SYS (round
, double, (double x
));
2069 _GL_CXXALIASWARN1 (round
, double, (double x
));
2071 #elif defined GNULIB_POSIXCHECK
2073 # if HAVE_RAW_DECL_ROUND
2074 _GL_WARN_ON_USE (round
, "round is unportable - "
2075 "use gnulib module round for portability");
2080 # if @REPLACE_ROUNDL@
2081 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2083 # define roundl rpl_roundl
2085 _GL_FUNCDECL_RPL (roundl
, long double, (long double x
));
2086 _GL_CXXALIAS_RPL (roundl
, long double, (long double x
));
2088 # if !@HAVE_DECL_ROUNDL@
2090 # if !(defined __cplusplus && defined _AIX)
2091 _GL_FUNCDECL_SYS (roundl
, long double, (long double x
));
2094 _GL_CXXALIAS_SYS (roundl
, long double, (long double x
));
2096 _GL_CXXALIASWARN (roundl
);
2097 #elif defined GNULIB_POSIXCHECK
2099 # if HAVE_RAW_DECL_ROUNDL
2100 _GL_WARN_ON_USE (roundl
, "roundl is unportable - "
2101 "use gnulib module roundl for portability");
2108 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2110 # define sinf rpl_sinf
2112 _GL_FUNCDECL_RPL (sinf
, float, (float x
));
2113 _GL_CXXALIAS_RPL (sinf
, float, (float x
));
2117 _GL_FUNCDECL_SYS (sinf
, float, (float x
));
2119 _GL_CXXALIAS_SYS (sinf
, float, (float x
));
2121 _GL_CXXALIASWARN (sinf
);
2122 #elif defined GNULIB_POSIXCHECK
2124 # if HAVE_RAW_DECL_SINF
2125 _GL_WARN_ON_USE (sinf
, "sinf is unportable - "
2126 "use gnulib module sinf for portability");
2131 # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
2133 _GL_FUNCDECL_SYS (sinl
, long double, (long double x
));
2135 _GL_CXXALIAS_SYS (sinl
, long double, (long double x
));
2137 _GL_CXXALIASWARN (sinl
);
2139 #elif defined GNULIB_POSIXCHECK
2141 # if HAVE_RAW_DECL_SINL
2142 _GL_WARN_ON_USE (sinl
, "sinl is unportable - "
2143 "use gnulib module sinl for portability");
2149 # if @REPLACE_SINHF@
2150 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2152 # define sinhf rpl_sinhf
2154 _GL_FUNCDECL_RPL (sinhf
, float, (float x
));
2155 _GL_CXXALIAS_RPL (sinhf
, float, (float x
));
2159 _GL_FUNCDECL_SYS (sinhf
, float, (float x
));
2161 _GL_CXXALIAS_SYS (sinhf
, float, (float x
));
2163 _GL_CXXALIASWARN (sinhf
);
2164 #elif defined GNULIB_POSIXCHECK
2166 # if HAVE_RAW_DECL_SINHF
2167 _GL_WARN_ON_USE (sinhf
, "sinhf is unportable - "
2168 "use gnulib module sinhf for portability");
2174 # if @REPLACE_SQRTF@
2175 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2177 # define sqrtf rpl_sqrtf
2179 _GL_FUNCDECL_RPL (sqrtf
, float, (float x
));
2180 _GL_CXXALIAS_RPL (sqrtf
, float, (float x
));
2184 _GL_FUNCDECL_SYS (sqrtf
, float, (float x
));
2186 _GL_CXXALIAS_SYS (sqrtf
, float, (float x
));
2188 _GL_CXXALIASWARN (sqrtf
);
2189 #elif defined GNULIB_POSIXCHECK
2191 # if HAVE_RAW_DECL_SQRTF
2192 _GL_WARN_ON_USE (sqrtf
, "sqrtf is unportable - "
2193 "use gnulib module sqrtf for portability");
2198 # if @REPLACE_SQRTL@
2199 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2201 # define sqrtl rpl_sqrtl
2203 _GL_FUNCDECL_RPL (sqrtl
, long double, (long double x
));
2204 _GL_CXXALIAS_RPL (sqrtl
, long double, (long double x
));
2206 # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
2208 _GL_FUNCDECL_SYS (sqrtl
, long double, (long double x
));
2210 _GL_CXXALIAS_SYS (sqrtl
, long double, (long double x
));
2213 _GL_CXXALIASWARN (sqrtl
);
2215 #elif defined GNULIB_POSIXCHECK
2217 # if HAVE_RAW_DECL_SQRTL
2218 _GL_WARN_ON_USE (sqrtl
, "sqrtl is unportable - "
2219 "use gnulib module sqrtl for portability");
2226 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2228 # define tanf rpl_tanf
2230 _GL_FUNCDECL_RPL (tanf
, float, (float x
));
2231 _GL_CXXALIAS_RPL (tanf
, float, (float x
));
2235 _GL_FUNCDECL_SYS (tanf
, float, (float x
));
2237 _GL_CXXALIAS_SYS (tanf
, float, (float x
));
2239 _GL_CXXALIASWARN (tanf
);
2240 #elif defined GNULIB_POSIXCHECK
2242 # if HAVE_RAW_DECL_TANF
2243 _GL_WARN_ON_USE (tanf
, "tanf is unportable - "
2244 "use gnulib module tanf for portability");
2249 # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
2251 _GL_FUNCDECL_SYS (tanl
, long double, (long double x
));
2253 _GL_CXXALIAS_SYS (tanl
, long double, (long double x
));
2255 _GL_CXXALIASWARN (tanl
);
2257 #elif defined GNULIB_POSIXCHECK
2259 # if HAVE_RAW_DECL_TANL
2260 _GL_WARN_ON_USE (tanl
, "tanl is unportable - "
2261 "use gnulib module tanl for portability");
2267 # if @REPLACE_TANHF@
2268 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2270 # define tanhf rpl_tanhf
2272 _GL_FUNCDECL_RPL (tanhf
, float, (float x
));
2273 _GL_CXXALIAS_RPL (tanhf
, float, (float x
));
2277 _GL_FUNCDECL_SYS (tanhf
, float, (float x
));
2279 _GL_CXXALIAS_SYS (tanhf
, float, (float x
));
2281 _GL_CXXALIASWARN (tanhf
);
2282 #elif defined GNULIB_POSIXCHECK
2284 # if HAVE_RAW_DECL_TANHF
2285 _GL_WARN_ON_USE (tanhf
, "tanhf is unportable - "
2286 "use gnulib module tanhf for portability");
2292 # if @REPLACE_TRUNCF@
2293 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2295 # define truncf rpl_truncf
2297 _GL_FUNCDECL_RPL (truncf
, float, (float x
));
2298 _GL_CXXALIAS_RPL (truncf
, float, (float x
));
2300 # if !@HAVE_DECL_TRUNCF@
2301 _GL_FUNCDECL_SYS (truncf
, float, (float x
));
2303 _GL_CXXALIAS_SYS (truncf
, float, (float x
));
2305 _GL_CXXALIASWARN (truncf
);
2306 #elif defined GNULIB_POSIXCHECK
2308 # if HAVE_RAW_DECL_TRUNCF
2309 _GL_WARN_ON_USE (truncf
, "truncf is unportable - "
2310 "use gnulib module truncf for portability");
2315 # if @REPLACE_TRUNC@
2316 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2318 # define trunc rpl_trunc
2320 _GL_FUNCDECL_RPL (trunc
, double, (double x
));
2321 _GL_CXXALIAS_RPL (trunc
, double, (double x
));
2323 # if !@HAVE_DECL_TRUNC@
2324 _GL_FUNCDECL_SYS (trunc
, double, (double x
));
2326 _GL_CXXALIAS_SYS (trunc
, double, (double x
));
2329 _GL_CXXALIASWARN1 (trunc
, double, (double x
));
2331 #elif defined GNULIB_POSIXCHECK
2333 # if HAVE_RAW_DECL_TRUNC
2334 _GL_WARN_ON_USE (trunc
, "trunc is unportable - "
2335 "use gnulib module trunc for portability");
2340 # if @REPLACE_TRUNCL@
2341 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2343 # define truncl rpl_truncl
2345 _GL_FUNCDECL_RPL (truncl
, long double, (long double x
));
2346 _GL_CXXALIAS_RPL (truncl
, long double, (long double x
));
2348 # if !@HAVE_DECL_TRUNCL@
2349 _GL_FUNCDECL_SYS (truncl
, long double, (long double x
));
2351 _GL_CXXALIAS_SYS (truncl
, long double, (long double x
));
2353 _GL_CXXALIASWARN (truncl
);
2354 #elif defined GNULIB_POSIXCHECK
2356 # if HAVE_RAW_DECL_TRUNCL
2357 _GL_WARN_ON_USE (truncl
, "truncl is unportable - "
2358 "use gnulib module truncl for portability");
2364 /* On native Windows, map 'y0' to '_y0', so that -loldnames is not
2365 required. In C++ with GNULIB_NAMESPACE, avoid differences between
2366 platforms by defining GNULIB_NAMESPACE::y0 always. */
2367 # if defined _WIN32 && !defined __CYGWIN__
2368 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2372 _GL_CXXALIAS_MDA (y0
, double, (double x
));
2374 _GL_CXXALIAS_SYS (y0
, double, (double x
));
2376 _GL_CXXALIASWARN (y0
);
2380 /* On native Windows, map 'y1' to '_y1', so that -loldnames is not
2381 required. In C++ with GNULIB_NAMESPACE, avoid differences between
2382 platforms by defining GNULIB_NAMESPACE::y1 always. */
2383 # if defined _WIN32 && !defined __CYGWIN__
2384 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2388 _GL_CXXALIAS_MDA (y1
, double, (double x
));
2390 _GL_CXXALIAS_SYS (y1
, double, (double x
));
2392 _GL_CXXALIASWARN (y1
);
2396 /* On native Windows, map 'yn' to '_yn', so that -loldnames is not
2397 required. In C++ with GNULIB_NAMESPACE, avoid differences between
2398 platforms by defining GNULIB_NAMESPACE::yn always. */
2399 # if defined _WIN32 && !defined __CYGWIN__
2400 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2404 _GL_CXXALIAS_MDA (yn
, double, (int n
, double x
));
2406 _GL_CXXALIAS_SYS (yn
, double, (int n
, double x
));
2408 _GL_CXXALIASWARN (yn
);
2412 /* Definitions of function-like macros come here, after the function
2416 #if @GNULIB_ISFINITE@
2417 # if @REPLACE_ISFINITE@
2418 _GL_EXTERN_C
int gl_isfinitef (float x
);
2419 _GL_EXTERN_C
int gl_isfinited (double x
);
2420 _GL_EXTERN_C
int gl_isfinitel (long double x
);
2422 # define isfinite(x) \
2423 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
2424 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
2428 # if defined isfinite || defined GNULIB_NAMESPACE
2429 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite
)
2431 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__)))
2432 /* This platform's <cmath> possibly defines isfinite through a set of inline
2434 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
, rpl_isfinite
, bool)
2435 # define isfinite rpl_isfinite
2436 # define GNULIB_NAMESPACE_LACKS_ISFINITE 1
2438 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
, isfinite
, bool)
2442 #elif defined GNULIB_POSIXCHECK
2443 # if defined isfinite
2444 _GL_WARN_REAL_FLOATING_DECL (isfinite
);
2446 # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
2452 # if @REPLACE_ISINF@
2453 _GL_EXTERN_C
int gl_isinff (float x
);
2454 _GL_EXTERN_C
int gl_isinfd (double x
);
2455 _GL_EXTERN_C
int gl_isinfl (long double x
);
2458 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
2459 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
2463 # if defined isinf || defined GNULIB_NAMESPACE
2464 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf
)
2466 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__)))
2467 /* This platform's <cmath> possibly defines isinf through a set of inline
2469 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
, rpl_isinf
, bool)
2470 # define isinf rpl_isinf
2471 # define GNULIB_NAMESPACE_LACKS_ISINF 1
2473 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
, isinf
, bool)
2477 #elif defined GNULIB_POSIXCHECK
2479 _GL_WARN_REAL_FLOATING_DECL (isinf
);
2481 # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
2487 /* Test for NaN for 'float' numbers. */
2489 /* The original <math.h> included above provides a declaration of isnan macro
2490 or (older) isnanf function. */
2491 # if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2492 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.
2493 GCC >= 4.0 also provides __builtin_isnanf, but clang doesn't. */
2495 # define isnanf(x) __builtin_isnan ((float)(x))
2496 # elif defined isnan
2498 # define isnanf(x) isnan ((float)(x))
2501 /* Test whether X is a NaN. */
2503 # define isnanf rpl_isnanf
2504 _GL_EXTERN_C
int isnanf (float x
);
2509 /* Test for NaN for 'double' numbers.
2510 This function is a gnulib extension, unlike isnan() which applied only
2511 to 'double' numbers earlier but now is a type-generic macro. */
2513 /* The original <math.h> included above provides a declaration of isnan
2515 # if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2516 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. */
2518 # define isnand(x) __builtin_isnan ((double)(x))
2521 # define isnand(x) isnan ((double)(x))
2524 /* Test whether X is a NaN. */
2526 # define isnand rpl_isnand
2527 _GL_EXTERN_C
int isnand (double x
);
2532 /* Test for NaN for 'long double' numbers. */
2534 /* The original <math.h> included above provides a declaration of isnan
2535 macro or (older) isnanl function. */
2536 # if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2537 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.
2538 GCC >= 4.0 also provides __builtin_isnanl, but clang doesn't. */
2540 # define isnanl(x) __builtin_isnan ((long double)(x))
2541 # elif defined isnan
2543 # define isnanl(x) isnan ((long double)(x))
2546 /* Test whether X is a NaN. */
2548 # define isnanl rpl_isnanl
2549 _GL_EXTERN_C
int isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2553 /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
2555 # if @REPLACE_ISNAN@
2556 /* We can't just use the isnanf macro (e.g.) as exposed by
2557 isnanf.h (e.g.) here, because those may end up being macros
2558 that recursively expand back to isnan. So use the gnulib
2559 replacements for them directly. */
2560 # if @HAVE_ISNANF@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2561 # define gl_isnan_f(x) __builtin_isnan ((float)(x))
2563 _GL_EXTERN_C
int rpl_isnanf (float x
);
2564 # define gl_isnan_f(x) rpl_isnanf (x)
2566 # if @HAVE_ISNAND@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2567 # define gl_isnan_d(x) __builtin_isnan ((double)(x))
2569 _GL_EXTERN_C
int rpl_isnand (double x
);
2570 # define gl_isnan_d(x) rpl_isnand (x)
2572 # if @HAVE_ISNANL@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2573 # define gl_isnan_l(x) __builtin_isnan ((long double)(x))
2575 _GL_EXTERN_C
int rpl_isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2576 # define gl_isnan_l(x) rpl_isnanl (x)
2580 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
2581 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
2583 # elif (__GNUC__ >= 4) || (__clang_major__ >= 4)
2586 (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \
2587 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
2588 __builtin_isnan ((float)(x)))
2591 # if defined isnan || defined GNULIB_NAMESPACE
2592 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan
)
2594 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__ && __clang_major__ < 12) || (defined __FreeBSD__ && __clang_major__ < 7) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__)))
2595 /* This platform's <cmath> possibly defines isnan through a set of inline
2597 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
, rpl_isnan
, bool)
2598 # define isnan rpl_isnan
2599 # define GNULIB_NAMESPACE_LACKS_ISNAN 1
2601 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
, isnan
, bool)
2605 /* Ensure isnan is a macro. */
2607 # define isnan isnan
2610 #elif defined GNULIB_POSIXCHECK
2612 _GL_WARN_REAL_FLOATING_DECL (isnan
);
2614 # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
2619 #if @GNULIB_SIGNBIT@
2620 # if (@REPLACE_SIGNBIT_USING_BUILTINS@ \
2621 && (!defined __cplusplus || __cplusplus < 201103))
2623 /* GCC >= 4.0 and clang provide three built-ins for signbit. */
2624 # define signbit(x) \
2625 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
2626 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
2627 __builtin_signbitf (x))
2629 # if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit
2631 _GL_EXTERN_C
int gl_signbitf (float arg
);
2632 _GL_EXTERN_C
int gl_signbitd (double arg
);
2633 _GL_EXTERN_C
int gl_signbitl (long double arg
);
2634 # if (__GNUC__ >= 2 || defined __clang__) && !defined __STRICT_ANSI__
2635 # define _GL_NUM_UINT_WORDS(type) \
2636 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
2637 # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
2638 # define gl_signbitf_OPTIMIZED_MACRO
2639 # define gl_signbitf(arg) \
2640 ({ union { float _value; \
2641 unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
2643 _m._value = (arg); \
2644 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
2647 # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
2648 # define gl_signbitd_OPTIMIZED_MACRO
2649 # define gl_signbitd(arg) \
2650 ({ union { double _value; \
2651 unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
2653 _m._value = (arg); \
2654 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
2657 # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
2658 # define gl_signbitl_OPTIMIZED_MACRO
2659 # define gl_signbitl(arg) \
2660 ({ union { long double _value; \
2661 unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
2663 _m._value = (arg); \
2664 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
2668 # define signbit(x) \
2669 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
2670 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
2672 # define GNULIB_defined_signbit 1
2675 # if defined signbit || defined GNULIB_NAMESPACE
2676 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit
)
2678 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__)))
2679 /* This platform's <cmath> possibly defines signbit through a set of inline
2681 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
, rpl_signbit
, bool)
2682 # define signbit rpl_signbit
2683 # define GNULIB_NAMESPACE_LACKS_SIGNBIT 1
2685 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
, signbit
, bool)
2689 #elif defined GNULIB_POSIXCHECK
2690 # if defined signbit
2691 _GL_WARN_REAL_FLOATING_DECL (signbit
);
2693 # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
2697 _GL_INLINE_HEADER_END
2699 #endif /* _@GUARD_PREFIX@_MATH_H */
2700 #endif /* _GL_INCLUDING_MATH_H */
2701 #endif /* _@GUARD_PREFIX@_MATH_H */