1 /* A GNU-like <math.h>.
3 Copyright (C) 2002-2003, 2007-2023 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
));
458 _GL_CXXALIASWARN (cbrtl
);
460 #elif defined GNULIB_POSIXCHECK
462 # if HAVE_RAW_DECL_CBRTL
463 _GL_WARN_ON_USE (cbrtl
, "cbrtl is unportable - "
464 "use gnulib module cbrtl for portability");
471 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
473 # define ceilf rpl_ceilf
475 _GL_FUNCDECL_RPL (ceilf
, float, (float x
));
476 _GL_CXXALIAS_RPL (ceilf
, float, (float x
));
478 # if !@HAVE_DECL_CEILF@
480 _GL_FUNCDECL_SYS (ceilf
, float, (float x
));
482 _GL_CXXALIAS_SYS (ceilf
, float, (float x
));
484 _GL_CXXALIASWARN (ceilf
);
485 #elif defined GNULIB_POSIXCHECK
487 # if HAVE_RAW_DECL_CEILF
488 _GL_WARN_ON_USE (ceilf
, "ceilf is unportable - "
489 "use gnulib module ceilf for portability");
495 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
497 # define ceil rpl_ceil
499 _GL_FUNCDECL_RPL (ceil
, double, (double x
));
500 _GL_CXXALIAS_RPL (ceil
, double, (double x
));
502 _GL_CXXALIAS_SYS (ceil
, double, (double x
));
505 _GL_CXXALIASWARN1 (ceil
, double, (double x
));
511 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
513 # define ceill rpl_ceill
515 _GL_FUNCDECL_RPL (ceill
, long double, (long double x
));
516 _GL_CXXALIAS_RPL (ceill
, long double, (long double x
));
518 # if !@HAVE_DECL_CEILL@
520 _GL_FUNCDECL_SYS (ceill
, long double, (long double x
));
522 _GL_CXXALIAS_SYS (ceill
, long double, (long double x
));
525 _GL_CXXALIASWARN (ceill
);
527 #elif defined GNULIB_POSIXCHECK
529 # if HAVE_RAW_DECL_CEILL
530 _GL_WARN_ON_USE (ceill
, "ceill is unportable - "
531 "use gnulib module ceill for portability");
536 #if @GNULIB_COPYSIGNF@
537 # if !@HAVE_DECL_COPYSIGNF@
539 _GL_FUNCDECL_SYS (copysignf
, float, (float x
, float y
));
541 _GL_CXXALIAS_SYS (copysignf
, float, (float x
, float y
));
542 _GL_CXXALIASWARN (copysignf
);
543 #elif defined GNULIB_POSIXCHECK
545 # if HAVE_RAW_DECL_COPYSIGNF
546 _GL_WARN_ON_USE (copysignf
, "copysignf is unportable - "
547 "use gnulib module copysignf for portability");
551 #if @GNULIB_COPYSIGN@
552 # if !@HAVE_COPYSIGN@
553 _GL_FUNCDECL_SYS (copysign
, double, (double x
, double y
));
555 _GL_CXXALIAS_SYS (copysign
, double, (double x
, double y
));
557 _GL_CXXALIASWARN1 (copysign
, double, (double x
, double y
));
559 #elif defined GNULIB_POSIXCHECK
561 # if HAVE_RAW_DECL_COPYSIGN
562 _GL_WARN_ON_USE (copysign
, "copysign is unportable - "
563 "use gnulib module copysign for portability");
567 #if @GNULIB_COPYSIGNL@
568 # if !@HAVE_COPYSIGNL@
569 _GL_FUNCDECL_SYS (copysignl
, long double, (long double x
, long double y
));
571 _GL_CXXALIAS_SYS (copysignl
, long double, (long double x
, long double y
));
573 _GL_CXXALIASWARN (copysignl
);
575 #elif defined GNULIB_POSIXCHECK
577 # if HAVE_RAW_DECL_COPYSIGNL
578 _GL_WARN_ON_USE (copysign
, "copysignl is unportable - "
579 "use gnulib module copysignl for portability");
586 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
588 # define cosf rpl_cosf
590 _GL_FUNCDECL_RPL (cosf
, float, (float x
));
591 _GL_CXXALIAS_RPL (cosf
, float, (float x
));
595 _GL_FUNCDECL_SYS (cosf
, float, (float x
));
597 _GL_CXXALIAS_SYS (cosf
, float, (float x
));
599 _GL_CXXALIASWARN (cosf
);
600 #elif defined GNULIB_POSIXCHECK
602 # if HAVE_RAW_DECL_COSF
603 _GL_WARN_ON_USE (cosf
, "cosf is unportable - "
604 "use gnulib module cosf for portability");
609 # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
611 _GL_FUNCDECL_SYS (cosl
, long double, (long double x
));
613 _GL_CXXALIAS_SYS (cosl
, long double, (long double x
));
615 _GL_CXXALIASWARN (cosl
);
617 #elif defined GNULIB_POSIXCHECK
619 # if HAVE_RAW_DECL_COSL
620 _GL_WARN_ON_USE (cosl
, "cosl is unportable - "
621 "use gnulib module cosl for portability");
628 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
630 # define coshf rpl_coshf
632 _GL_FUNCDECL_RPL (coshf
, float, (float x
));
633 _GL_CXXALIAS_RPL (coshf
, float, (float x
));
637 _GL_FUNCDECL_SYS (coshf
, float, (float x
));
639 _GL_CXXALIAS_SYS (coshf
, float, (float x
));
641 _GL_CXXALIASWARN (coshf
);
642 #elif defined GNULIB_POSIXCHECK
644 # if HAVE_RAW_DECL_COSHF
645 _GL_WARN_ON_USE (coshf
, "coshf is unportable - "
646 "use gnulib module coshf for portability");
653 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
655 # define expf rpl_expf
657 _GL_FUNCDECL_RPL (expf
, float, (float x
));
658 _GL_CXXALIAS_RPL (expf
, float, (float x
));
662 _GL_FUNCDECL_SYS (expf
, float, (float x
));
664 _GL_CXXALIAS_SYS (expf
, float, (float x
));
666 _GL_CXXALIASWARN (expf
);
667 #elif defined GNULIB_POSIXCHECK
669 # if HAVE_RAW_DECL_EXPF
670 _GL_WARN_ON_USE (expf
, "expf is unportable - "
671 "use gnulib module expf for portability");
677 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
679 # define expl rpl_expl
681 _GL_FUNCDECL_RPL (expl
, long double, (long double x
));
682 _GL_CXXALIAS_RPL (expl
, long double, (long double x
));
684 # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
686 _GL_FUNCDECL_SYS (expl
, long double, (long double x
));
688 _GL_CXXALIAS_SYS (expl
, long double, (long double x
));
691 _GL_CXXALIASWARN (expl
);
693 #elif defined GNULIB_POSIXCHECK
695 # if HAVE_RAW_DECL_EXPL
696 _GL_WARN_ON_USE (expl
, "expl is unportable - "
697 "use gnulib module expl for portability");
703 # if !@HAVE_DECL_EXP2F@
704 _GL_FUNCDECL_SYS (exp2f
, float, (float x
));
706 _GL_CXXALIAS_SYS (exp2f
, float, (float x
));
707 _GL_CXXALIASWARN (exp2f
);
708 #elif defined GNULIB_POSIXCHECK
710 # if HAVE_RAW_DECL_EXP2F
711 _GL_WARN_ON_USE (exp2f
, "exp2f is unportable - "
712 "use gnulib module exp2f for portability");
718 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
720 # define exp2 rpl_exp2
722 _GL_FUNCDECL_RPL (exp2
, double, (double x
));
723 _GL_CXXALIAS_RPL (exp2
, double, (double x
));
725 # if !@HAVE_DECL_EXP2@
726 _GL_FUNCDECL_SYS (exp2
, double, (double x
));
728 _GL_CXXALIAS_SYS (exp2
, double, (double x
));
731 _GL_CXXALIASWARN1 (exp2
, double, (double x
));
733 #elif defined GNULIB_POSIXCHECK
735 # if HAVE_RAW_DECL_EXP2
736 _GL_WARN_ON_USE (exp2
, "exp2 is unportable - "
737 "use gnulib module exp2 for portability");
743 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
745 # define exp2l rpl_exp2l
747 _GL_FUNCDECL_RPL (exp2l
, long double, (long double x
));
748 _GL_CXXALIAS_RPL (exp2l
, long double, (long double x
));
750 # if !@HAVE_DECL_EXP2L@
752 _GL_FUNCDECL_SYS (exp2l
, long double, (long double x
));
754 _GL_CXXALIAS_SYS (exp2l
, long double, (long double x
));
757 _GL_CXXALIASWARN (exp2l
);
759 #elif defined GNULIB_POSIXCHECK
761 # if HAVE_RAW_DECL_EXP2L
762 _GL_WARN_ON_USE (exp2l
, "exp2l is unportable - "
763 "use gnulib module exp2l for portability");
769 # if @REPLACE_EXPM1F@
770 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
772 # define expm1f rpl_expm1f
774 _GL_FUNCDECL_RPL (expm1f
, float, (float x
));
775 _GL_CXXALIAS_RPL (expm1f
, float, (float x
));
778 _GL_FUNCDECL_SYS (expm1f
, float, (float x
));
780 _GL_CXXALIAS_SYS (expm1f
, float, (float x
));
782 _GL_CXXALIASWARN (expm1f
);
783 #elif defined GNULIB_POSIXCHECK
785 # if HAVE_RAW_DECL_EXPM1F
786 _GL_WARN_ON_USE (expm1f
, "expm1f is unportable - "
787 "use gnulib module expm1f for portability");
793 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
795 # define expm1 rpl_expm1
797 _GL_FUNCDECL_RPL (expm1
, double, (double x
));
798 _GL_CXXALIAS_RPL (expm1
, double, (double x
));
801 _GL_FUNCDECL_SYS (expm1
, double, (double x
));
803 _GL_CXXALIAS_SYS (expm1
, double, (double x
));
806 _GL_CXXALIASWARN1 (expm1
, double, (double x
));
808 #elif defined GNULIB_POSIXCHECK
810 # if HAVE_RAW_DECL_EXPM1
811 _GL_WARN_ON_USE (expm1
, "expm1 is unportable - "
812 "use gnulib module expm1 for portability");
817 # if @REPLACE_EXPM1L@
818 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
820 # define expm1l rpl_expm1l
822 _GL_FUNCDECL_RPL (expm1l
, long double, (long double x
));
823 _GL_CXXALIAS_RPL (expm1l
, long double, (long double x
));
825 # if !@HAVE_DECL_EXPM1L@
827 # if !(defined __cplusplus && defined _AIX)
828 _GL_FUNCDECL_SYS (expm1l
, long double, (long double x
));
831 _GL_CXXALIAS_SYS (expm1l
, long double, (long double x
));
834 _GL_CXXALIASWARN (expm1l
);
836 #elif defined GNULIB_POSIXCHECK
838 # if HAVE_RAW_DECL_EXPM1L
839 _GL_WARN_ON_USE (expm1l
, "expm1l is unportable - "
840 "use gnulib module expm1l for portability");
848 _GL_FUNCDECL_SYS (fabsf
, float, (float x
));
850 _GL_CXXALIAS_SYS (fabsf
, float, (float x
));
852 _GL_CXXALIASWARN (fabsf
);
854 #elif defined GNULIB_POSIXCHECK
856 # if HAVE_RAW_DECL_FABSF
857 _GL_WARN_ON_USE (fabsf
, "fabsf is unportable - "
858 "use gnulib module fabsf for portability");
864 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
866 # define fabsl rpl_fabsl
868 _GL_FUNCDECL_RPL (fabsl
, long double, (long double x
));
869 _GL_CXXALIAS_RPL (fabsl
, long double, (long double x
));
873 _GL_FUNCDECL_SYS (fabsl
, long double, (long double x
));
875 _GL_CXXALIAS_SYS (fabsl
, long double, (long double x
));
878 _GL_CXXALIASWARN (fabsl
);
880 #elif defined GNULIB_POSIXCHECK
882 # if HAVE_RAW_DECL_FABSL
883 _GL_WARN_ON_USE (fabsl
, "fabsl is unportable - "
884 "use gnulib module fabsl for portability");
890 # if @REPLACE_FLOORF@
891 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
893 # define floorf rpl_floorf
895 _GL_FUNCDECL_RPL (floorf
, float, (float x
));
896 _GL_CXXALIAS_RPL (floorf
, float, (float x
));
898 # if !@HAVE_DECL_FLOORF@
900 _GL_FUNCDECL_SYS (floorf
, float, (float x
));
902 _GL_CXXALIAS_SYS (floorf
, float, (float x
));
904 _GL_CXXALIASWARN (floorf
);
905 #elif defined GNULIB_POSIXCHECK
907 # if HAVE_RAW_DECL_FLOORF
908 _GL_WARN_ON_USE (floorf
, "floorf is unportable - "
909 "use gnulib module floorf for portability");
915 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
917 # define floor rpl_floor
919 _GL_FUNCDECL_RPL (floor
, double, (double x
));
920 _GL_CXXALIAS_RPL (floor
, double, (double x
));
922 _GL_CXXALIAS_SYS (floor
, double, (double x
));
925 _GL_CXXALIASWARN1 (floor
, double, (double x
));
930 # if @REPLACE_FLOORL@
931 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
933 # define floorl rpl_floorl
935 _GL_FUNCDECL_RPL (floorl
, long double, (long double x
));
936 _GL_CXXALIAS_RPL (floorl
, long double, (long double x
));
938 # if !@HAVE_DECL_FLOORL@
940 _GL_FUNCDECL_SYS (floorl
, long double, (long double x
));
942 _GL_CXXALIAS_SYS (floorl
, long double, (long double x
));
945 _GL_CXXALIASWARN (floorl
);
947 #elif defined GNULIB_POSIXCHECK
949 # if HAVE_RAW_DECL_FLOORL
950 _GL_WARN_ON_USE (floorl
, "floorl is unportable - "
951 "use gnulib module floorl for portability");
958 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
960 # define fmaf rpl_fmaf
962 _GL_FUNCDECL_RPL (fmaf
, float, (float x
, float y
, float z
));
963 _GL_CXXALIAS_RPL (fmaf
, float, (float x
, float y
, float z
));
967 _GL_FUNCDECL_SYS (fmaf
, float, (float x
, float y
, float z
));
969 _GL_CXXALIAS_SYS (fmaf
, float, (float x
, float y
, float z
));
971 _GL_CXXALIASWARN (fmaf
);
972 #elif defined GNULIB_POSIXCHECK
974 # if HAVE_RAW_DECL_FMAF
975 _GL_WARN_ON_USE (fmaf
, "fmaf is unportable - "
976 "use gnulib module fmaf for portability");
982 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
986 _GL_FUNCDECL_RPL (fma
, double, (double x
, double y
, double z
));
987 _GL_CXXALIAS_RPL (fma
, double, (double x
, double y
, double z
));
991 _GL_FUNCDECL_SYS (fma
, double, (double x
, double y
, double z
));
993 _GL_CXXALIAS_SYS (fma
, double, (double x
, double y
, double z
));
996 _GL_CXXALIASWARN1 (fma
, double, (double x
, double y
, double z
));
998 #elif defined GNULIB_POSIXCHECK
1000 # if HAVE_RAW_DECL_FMA
1001 _GL_WARN_ON_USE (fma
, "fma is unportable - "
1002 "use gnulib module fma for portability");
1008 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1010 # define fmal rpl_fmal
1012 _GL_FUNCDECL_RPL (fmal
, long double,
1013 (long double x
, long double y
, long double z
));
1014 _GL_CXXALIAS_RPL (fmal
, long double,
1015 (long double x
, long double y
, long double z
));
1019 # if !(defined __cplusplus && defined _AIX)
1020 _GL_FUNCDECL_SYS (fmal
, long double,
1021 (long double x
, long double y
, long double z
));
1024 _GL_CXXALIAS_SYS (fmal
, long double,
1025 (long double x
, long double y
, long double z
));
1028 _GL_CXXALIASWARN (fmal
);
1030 #elif defined GNULIB_POSIXCHECK
1032 # if HAVE_RAW_DECL_FMAL
1033 _GL_WARN_ON_USE (fmal
, "fmal is unportable - "
1034 "use gnulib module fmal for portability");
1040 # if @REPLACE_FMODF@
1041 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1043 # define fmodf rpl_fmodf
1045 _GL_FUNCDECL_RPL (fmodf
, float, (float x
, float y
));
1046 _GL_CXXALIAS_RPL (fmodf
, float, (float x
, float y
));
1050 _GL_FUNCDECL_SYS (fmodf
, float, (float x
, float y
));
1052 _GL_CXXALIAS_SYS (fmodf
, float, (float x
, float y
));
1054 _GL_CXXALIASWARN (fmodf
);
1055 #elif defined GNULIB_POSIXCHECK
1057 # if HAVE_RAW_DECL_FMODF
1058 _GL_WARN_ON_USE (fmodf
, "fmodf is unportable - "
1059 "use gnulib module fmodf for portability");
1065 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1067 # define fmod rpl_fmod
1069 _GL_FUNCDECL_RPL (fmod
, double, (double x
, double y
));
1070 _GL_CXXALIAS_RPL (fmod
, double, (double x
, double y
));
1072 _GL_CXXALIAS_SYS (fmod
, double, (double x
, double y
));
1075 _GL_CXXALIASWARN1 (fmod
, double, (double x
, double y
));
1077 #elif defined GNULIB_POSIXCHECK
1079 # if HAVE_RAW_DECL_FMOD
1080 _GL_WARN_ON_USE (fmod
, "fmod has portability problems - "
1081 "use gnulib module fmod for portability");
1086 # if @REPLACE_FMODL@
1087 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1089 # define fmodl rpl_fmodl
1091 _GL_FUNCDECL_RPL (fmodl
, long double, (long double x
, long double y
));
1092 _GL_CXXALIAS_RPL (fmodl
, long double, (long double x
, long double y
));
1096 _GL_FUNCDECL_SYS (fmodl
, long double, (long double x
, long double y
));
1098 _GL_CXXALIAS_SYS (fmodl
, long double, (long double x
, long double y
));
1101 _GL_CXXALIASWARN (fmodl
);
1103 #elif defined GNULIB_POSIXCHECK
1105 # if HAVE_RAW_DECL_FMODL
1106 _GL_WARN_ON_USE (fmodl
, "fmodl is unportable - "
1107 "use gnulib module fmodl for portability");
1113 x = mantissa * 2^exp
1115 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1116 If x is zero: mantissa = x, exp = 0.
1117 If x is infinite or NaN: mantissa = x, exp unspecified.
1118 Store exp in *EXPPTR and return mantissa. */
1120 # if @REPLACE_FREXPF@
1121 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1123 # define frexpf rpl_frexpf
1125 _GL_FUNCDECL_RPL (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1126 _GL_CXXALIAS_RPL (frexpf
, float, (float x
, int *expptr
));
1130 _GL_FUNCDECL_SYS (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1132 _GL_CXXALIAS_SYS (frexpf
, float, (float x
, int *expptr
));
1135 _GL_CXXALIASWARN (frexpf
);
1137 #elif defined GNULIB_POSIXCHECK
1139 # if HAVE_RAW_DECL_FREXPF
1140 _GL_WARN_ON_USE (frexpf
, "frexpf is unportable - "
1141 "use gnulib module frexpf for portability");
1146 x = mantissa * 2^exp
1148 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1149 If x is zero: mantissa = x, exp = 0.
1150 If x is infinite or NaN: mantissa = x, exp unspecified.
1151 Store exp in *EXPPTR and return mantissa. */
1153 # if @REPLACE_FREXP@
1154 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1156 # define frexp rpl_frexp
1158 _GL_FUNCDECL_RPL (frexp
, double, (double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1159 _GL_CXXALIAS_RPL (frexp
, double, (double x
, int *expptr
));
1161 _GL_CXXALIAS_SYS (frexp
, double, (double x
, int *expptr
));
1164 _GL_CXXALIASWARN1 (frexp
, double, (double x
, int *expptr
));
1166 #elif defined GNULIB_POSIXCHECK
1168 /* Assume frexp is always declared. */
1169 _GL_WARN_ON_USE (frexp
, "frexp is unportable - "
1170 "use gnulib module frexp for portability");
1174 x = mantissa * 2^exp
1176 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1177 If x is zero: mantissa = x, exp = 0.
1178 If x is infinite or NaN: mantissa = x, exp unspecified.
1179 Store exp in *EXPPTR and return mantissa. */
1180 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
1181 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1183 # define frexpl rpl_frexpl
1185 _GL_FUNCDECL_RPL (frexpl
, long double,
1186 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1187 _GL_CXXALIAS_RPL (frexpl
, long double, (long double x
, int *expptr
));
1189 # if !@HAVE_DECL_FREXPL@
1190 _GL_FUNCDECL_SYS (frexpl
, long double,
1191 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1193 # if @GNULIB_FREXPL@
1194 _GL_CXXALIAS_SYS (frexpl
, long double, (long double x
, int *expptr
));
1197 #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
1199 _GL_CXXALIASWARN (frexpl
);
1202 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
1204 # if HAVE_RAW_DECL_FREXPL
1205 _GL_WARN_ON_USE (frexpl
, "frexpl is unportable - "
1206 "use gnulib module frexpl for portability");
1211 /* Return sqrt(x^2+y^2). */
1213 # if @REPLACE_HYPOTF@
1214 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1216 # define hypotf rpl_hypotf
1218 _GL_FUNCDECL_RPL (hypotf
, float, (float x
, float y
));
1219 _GL_CXXALIAS_RPL (hypotf
, float, (float x
, float y
));
1222 _GL_FUNCDECL_SYS (hypotf
, float, (float x
, float y
));
1224 _GL_CXXALIAS_SYS (hypotf
, float, (float x
, float y
));
1227 _GL_CXXALIASWARN (hypotf
);
1229 #elif defined GNULIB_POSIXCHECK
1231 # if HAVE_RAW_DECL_HYPOTF
1232 _GL_WARN_ON_USE (hypotf
, "hypotf is unportable - "
1233 "use gnulib module hypotf for portability");
1237 /* Return sqrt(x^2+y^2). */
1239 # if @REPLACE_HYPOT@
1240 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1242 # define hypot rpl_hypot
1244 _GL_FUNCDECL_RPL (hypot
, double, (double x
, double y
));
1245 _GL_CXXALIAS_RPL (hypot
, double, (double x
, double y
));
1247 _GL_CXXALIAS_SYS (hypot
, double, (double x
, double y
));
1250 _GL_CXXALIASWARN1 (hypot
, double, (double x
, double y
));
1252 #elif defined GNULIB_POSIXCHECK
1254 # if HAVE_RAW_DECL_HYPOT
1255 _GL_WARN_ON_USE (hypotf
, "hypot has portability problems - "
1256 "use gnulib module hypot for portability");
1260 /* Return sqrt(x^2+y^2). */
1262 # if @REPLACE_HYPOTL@
1263 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1265 # define hypotl rpl_hypotl
1267 _GL_FUNCDECL_RPL (hypotl
, long double, (long double x
, long double y
));
1268 _GL_CXXALIAS_RPL (hypotl
, long double, (long double x
, long double y
));
1271 _GL_FUNCDECL_SYS (hypotl
, long double, (long double x
, long double y
));
1273 _GL_CXXALIAS_SYS (hypotl
, long double, (long double x
, long double y
));
1276 _GL_CXXALIASWARN (hypotl
);
1278 #elif defined GNULIB_POSIXCHECK
1280 # if HAVE_RAW_DECL_HYPOTL
1281 _GL_WARN_ON_USE (hypotl
, "hypotl is unportable - "
1282 "use gnulib module hypotl for portability");
1288 # if @REPLACE_ILOGBF@
1289 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1291 # define ilogbf rpl_ilogbf
1293 _GL_FUNCDECL_RPL (ilogbf
, int, (float x
));
1294 _GL_CXXALIAS_RPL (ilogbf
, int, (float x
));
1297 _GL_FUNCDECL_SYS (ilogbf
, int, (float x
));
1299 _GL_CXXALIAS_SYS (ilogbf
, int, (float x
));
1301 _GL_CXXALIASWARN (ilogbf
);
1302 #elif defined GNULIB_POSIXCHECK
1304 # if HAVE_RAW_DECL_ILOGBF
1305 _GL_WARN_ON_USE (ilogbf
, "ilogbf is unportable - "
1306 "use gnulib module ilogbf for portability");
1311 # if @REPLACE_ILOGB@
1312 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1314 # define ilogb rpl_ilogb
1316 _GL_FUNCDECL_RPL (ilogb
, int, (double x
));
1317 _GL_CXXALIAS_RPL (ilogb
, int, (double x
));
1320 _GL_FUNCDECL_SYS (ilogb
, int, (double x
));
1322 _GL_CXXALIAS_SYS (ilogb
, int, (double x
));
1325 _GL_CXXALIASWARN1 (ilogb
, int, (double x
));
1327 #elif defined GNULIB_POSIXCHECK
1329 # if HAVE_RAW_DECL_ILOGB
1330 _GL_WARN_ON_USE (ilogb
, "ilogb is unportable - "
1331 "use gnulib module ilogb for portability");
1336 # if @REPLACE_ILOGBL@
1337 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1339 # define ilogbl rpl_ilogbl
1341 _GL_FUNCDECL_RPL (ilogbl
, int, (long double x
));
1342 _GL_CXXALIAS_RPL (ilogbl
, int, (long double x
));
1346 _GL_FUNCDECL_SYS (ilogbl
, int, (long double x
));
1348 _GL_CXXALIAS_SYS (ilogbl
, int, (long double x
));
1351 _GL_CXXALIASWARN (ilogbl
);
1353 #elif defined GNULIB_POSIXCHECK
1355 # if HAVE_RAW_DECL_ILOGBL
1356 _GL_WARN_ON_USE (ilogbl
, "ilogbl is unportable - "
1357 "use gnulib module ilogbl for portability");
1363 /* On native Windows, map 'j0' to '_j0', so that -loldnames is not
1364 required. In C++ with GNULIB_NAMESPACE, avoid differences between
1365 platforms by defining GNULIB_NAMESPACE::j0 always. */
1366 # if defined _WIN32 && !defined __CYGWIN__
1367 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1371 _GL_CXXALIAS_MDA (j0
, double, (double x
));
1373 _GL_CXXALIAS_SYS (j0
, double, (double x
));
1375 _GL_CXXALIASWARN (j0
);
1379 /* On native Windows, map 'j1' to '_j1', so that -loldnames is not
1380 required. In C++ with GNULIB_NAMESPACE, avoid differences between
1381 platforms by defining GNULIB_NAMESPACE::j1 always. */
1382 # if defined _WIN32 && !defined __CYGWIN__
1383 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1387 _GL_CXXALIAS_MDA (j1
, double, (double x
));
1389 _GL_CXXALIAS_SYS (j1
, double, (double x
));
1391 _GL_CXXALIASWARN (j1
);
1395 /* On native Windows, map 'jn' to '_jn', so that -loldnames is not
1396 required. In C++ with GNULIB_NAMESPACE, avoid differences between
1397 platforms by defining GNULIB_NAMESPACE::jn always. */
1398 # if defined _WIN32 && !defined __CYGWIN__
1399 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1403 _GL_CXXALIAS_MDA (jn
, double, (int n
, double x
));
1405 _GL_CXXALIAS_SYS (jn
, double, (int n
, double x
));
1407 _GL_CXXALIASWARN (jn
);
1411 /* Return x * 2^exp. */
1415 _GL_FUNCDECL_SYS (ldexpf
, float, (float x
, int exp
));
1417 _GL_CXXALIAS_SYS (ldexpf
, float, (float x
, int exp
));
1419 _GL_CXXALIASWARN (ldexpf
);
1421 #elif defined GNULIB_POSIXCHECK
1423 # if HAVE_RAW_DECL_LDEXPF
1424 _GL_WARN_ON_USE (ldexpf
, "ldexpf is unportable - "
1425 "use gnulib module ldexpf for portability");
1429 /* Return x * 2^exp. */
1430 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
1431 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1433 # define ldexpl rpl_ldexpl
1435 _GL_FUNCDECL_RPL (ldexpl
, long double, (long double x
, int exp
));
1436 _GL_CXXALIAS_RPL (ldexpl
, long double, (long double x
, int exp
));
1438 # if !@HAVE_DECL_LDEXPL@
1439 _GL_FUNCDECL_SYS (ldexpl
, long double, (long double x
, int exp
));
1441 # if @GNULIB_LDEXPL@
1442 _GL_CXXALIAS_SYS (ldexpl
, long double, (long double x
, int exp
));
1447 _GL_CXXALIASWARN (ldexpl
);
1450 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
1452 # if HAVE_RAW_DECL_LDEXPL
1453 _GL_WARN_ON_USE (ldexpl
, "ldexpl is unportable - "
1454 "use gnulib module ldexpl for portability");
1461 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1463 # define logf rpl_logf
1465 _GL_FUNCDECL_RPL (logf
, float, (float x
));
1466 _GL_CXXALIAS_RPL (logf
, float, (float x
));
1470 _GL_FUNCDECL_SYS (logf
, float, (float x
));
1472 _GL_CXXALIAS_SYS (logf
, float, (float x
));
1474 _GL_CXXALIASWARN (logf
);
1475 #elif defined GNULIB_POSIXCHECK
1477 # if HAVE_RAW_DECL_LOGF
1478 _GL_WARN_ON_USE (logf
, "logf is unportable - "
1479 "use gnulib module logf for portability");
1485 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1487 # define log rpl_log
1489 _GL_FUNCDECL_RPL (log
, double, (double x
));
1490 _GL_CXXALIAS_RPL (log
, double, (double x
));
1492 _GL_CXXALIAS_SYS (log
, double, (double x
));
1495 _GL_CXXALIASWARN1 (log
, double, (double x
));
1497 #elif defined GNULIB_POSIXCHECK
1499 # if HAVE_RAW_DECL_LOG
1500 _GL_WARN_ON_USE (log
, "log has portability problems - "
1501 "use gnulib module log for portability");
1507 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1509 # define logl rpl_logl
1511 _GL_FUNCDECL_RPL (logl
, long double, (long double x
));
1512 _GL_CXXALIAS_RPL (logl
, long double, (long double x
));
1514 # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
1516 _GL_FUNCDECL_SYS (logl
, long double, (long double x
));
1518 _GL_CXXALIAS_SYS (logl
, long double, (long double x
));
1521 _GL_CXXALIASWARN (logl
);
1523 #elif defined GNULIB_POSIXCHECK
1525 # if HAVE_RAW_DECL_LOGL
1526 _GL_WARN_ON_USE (logl
, "logl is unportable - "
1527 "use gnulib module logl for portability");
1533 # if @REPLACE_LOG10F@
1534 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1536 # define log10f rpl_log10f
1538 _GL_FUNCDECL_RPL (log10f
, float, (float x
));
1539 _GL_CXXALIAS_RPL (log10f
, float, (float x
));
1543 _GL_FUNCDECL_SYS (log10f
, float, (float x
));
1545 _GL_CXXALIAS_SYS (log10f
, float, (float x
));
1547 _GL_CXXALIASWARN (log10f
);
1548 #elif defined GNULIB_POSIXCHECK
1550 # if HAVE_RAW_DECL_LOG10F
1551 _GL_WARN_ON_USE (log10f
, "log10f is unportable - "
1552 "use gnulib module log10f for portability");
1557 # if @REPLACE_LOG10@
1558 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1560 # define log10 rpl_log10
1562 _GL_FUNCDECL_RPL (log10
, double, (double x
));
1563 _GL_CXXALIAS_RPL (log10
, double, (double x
));
1565 _GL_CXXALIAS_SYS (log10
, double, (double x
));
1568 _GL_CXXALIASWARN1 (log10
, double, (double x
));
1570 #elif defined GNULIB_POSIXCHECK
1572 # if HAVE_RAW_DECL_LOG10
1573 _GL_WARN_ON_USE (log10
, "log10 has portability problems - "
1574 "use gnulib module log10 for portability");
1579 # if @REPLACE_LOG10L@
1580 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1582 # define log10l rpl_log10l
1584 _GL_FUNCDECL_RPL (log10l
, long double, (long double x
));
1585 _GL_CXXALIAS_RPL (log10l
, long double, (long double x
));
1587 # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
1589 _GL_FUNCDECL_SYS (log10l
, long double, (long double x
));
1591 _GL_CXXALIAS_SYS (log10l
, long double, (long double x
));
1594 _GL_CXXALIASWARN (log10l
);
1596 #elif defined GNULIB_POSIXCHECK
1598 # if HAVE_RAW_DECL_LOG10L
1599 _GL_WARN_ON_USE (log10l
, "log10l is unportable - "
1600 "use gnulib module log10l for portability");
1606 # if @REPLACE_LOG1PF@
1607 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1609 # define log1pf rpl_log1pf
1611 _GL_FUNCDECL_RPL (log1pf
, float, (float x
));
1612 _GL_CXXALIAS_RPL (log1pf
, float, (float x
));
1615 _GL_FUNCDECL_SYS (log1pf
, float, (float x
));
1617 _GL_CXXALIAS_SYS (log1pf
, float, (float x
));
1619 _GL_CXXALIASWARN (log1pf
);
1620 #elif defined GNULIB_POSIXCHECK
1622 # if HAVE_RAW_DECL_LOG1PF
1623 _GL_WARN_ON_USE (log1pf
, "log1pf is unportable - "
1624 "use gnulib module log1pf for portability");
1629 # if @REPLACE_LOG1P@
1630 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1632 # define log1p rpl_log1p
1634 _GL_FUNCDECL_RPL (log1p
, double, (double x
));
1635 _GL_CXXALIAS_RPL (log1p
, double, (double x
));
1638 _GL_FUNCDECL_SYS (log1p
, double, (double x
));
1640 _GL_CXXALIAS_SYS (log1p
, double, (double x
));
1643 _GL_CXXALIASWARN1 (log1p
, double, (double x
));
1645 #elif defined GNULIB_POSIXCHECK
1647 # if HAVE_RAW_DECL_LOG1P
1648 _GL_WARN_ON_USE (log1p
, "log1p has portability problems - "
1649 "use gnulib module log1p for portability");
1654 # if @REPLACE_LOG1PL@
1655 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1657 # define log1pl rpl_log1pl
1659 _GL_FUNCDECL_RPL (log1pl
, long double, (long double x
));
1660 _GL_CXXALIAS_RPL (log1pl
, long double, (long double x
));
1663 _GL_FUNCDECL_SYS (log1pl
, long double, (long double x
));
1665 _GL_CXXALIAS_SYS (log1pl
, long double, (long double x
));
1668 _GL_CXXALIASWARN (log1pl
);
1670 #elif defined GNULIB_POSIXCHECK
1672 # if HAVE_RAW_DECL_LOG1PL
1673 _GL_WARN_ON_USE (log1pl
, "log1pl has portability problems - "
1674 "use gnulib module log1pl for portability");
1680 # if @REPLACE_LOG2F@
1681 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1683 # define log2f rpl_log2f
1685 _GL_FUNCDECL_RPL (log2f
, float, (float x
));
1686 _GL_CXXALIAS_RPL (log2f
, float, (float x
));
1688 # if !@HAVE_DECL_LOG2F@
1690 _GL_FUNCDECL_SYS (log2f
, float, (float x
));
1692 _GL_CXXALIAS_SYS (log2f
, float, (float x
));
1694 _GL_CXXALIASWARN (log2f
);
1695 #elif defined GNULIB_POSIXCHECK
1697 # if HAVE_RAW_DECL_LOG2F
1698 _GL_WARN_ON_USE (log2f
, "log2f is unportable - "
1699 "use gnulib module log2f for portability");
1705 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1707 # define log2 rpl_log2
1709 _GL_FUNCDECL_RPL (log2
, double, (double x
));
1710 _GL_CXXALIAS_RPL (log2
, double, (double x
));
1712 # if !@HAVE_DECL_LOG2@
1714 _GL_FUNCDECL_SYS (log2
, double, (double x
));
1716 _GL_CXXALIAS_SYS (log2
, double, (double x
));
1719 _GL_CXXALIASWARN1 (log2
, double, (double x
));
1721 #elif defined GNULIB_POSIXCHECK
1723 # if HAVE_RAW_DECL_LOG2
1724 _GL_WARN_ON_USE (log2
, "log2 is unportable - "
1725 "use gnulib module log2 for portability");
1730 # if @REPLACE_LOG2L@
1731 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1733 # define log2l rpl_log2l
1735 _GL_FUNCDECL_RPL (log2l
, long double, (long double x
));
1736 _GL_CXXALIAS_RPL (log2l
, long double, (long double x
));
1738 # if !@HAVE_DECL_LOG2L@
1739 _GL_FUNCDECL_SYS (log2l
, long double, (long double x
));
1741 _GL_CXXALIAS_SYS (log2l
, long double, (long double x
));
1744 _GL_CXXALIASWARN (log2l
);
1746 #elif defined GNULIB_POSIXCHECK
1748 # if HAVE_RAW_DECL_LOG2L
1749 _GL_WARN_ON_USE (log2l
, "log2l is unportable - "
1750 "use gnulib module log2l for portability");
1756 # if @REPLACE_LOGBF@
1757 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1759 # define logbf rpl_logbf
1761 _GL_FUNCDECL_RPL (logbf
, float, (float x
));
1762 _GL_CXXALIAS_RPL (logbf
, float, (float x
));
1765 _GL_FUNCDECL_SYS (logbf
, float, (float x
));
1767 _GL_CXXALIAS_SYS (logbf
, float, (float x
));
1769 _GL_CXXALIASWARN (logbf
);
1770 #elif defined GNULIB_POSIXCHECK
1772 # if HAVE_RAW_DECL_LOGBF
1773 _GL_WARN_ON_USE (logbf
, "logbf is unportable - "
1774 "use gnulib module logbf for portability");
1780 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1782 # define logb rpl_logb
1784 _GL_FUNCDECL_RPL (logb
, double, (double x
));
1785 _GL_CXXALIAS_RPL (logb
, double, (double x
));
1787 # if !@HAVE_DECL_LOGB@
1788 _GL_FUNCDECL_SYS (logb
, double, (double x
));
1790 _GL_CXXALIAS_SYS (logb
, double, (double x
));
1793 _GL_CXXALIASWARN1 (logb
, double, (double x
));
1795 #elif defined GNULIB_POSIXCHECK
1797 # if HAVE_RAW_DECL_LOGB
1798 _GL_WARN_ON_USE (logb
, "logb is unportable - "
1799 "use gnulib module logb for portability");
1804 # if @REPLACE_LOGBL@
1805 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1807 # define logbl rpl_logbl
1809 _GL_FUNCDECL_RPL (logbl
, long double, (long double x
));
1810 _GL_CXXALIAS_RPL (logbl
, long double, (long double x
));
1813 _GL_FUNCDECL_SYS (logbl
, long double, (long double x
));
1815 _GL_CXXALIAS_SYS (logbl
, long double, (long double x
));
1818 _GL_CXXALIASWARN (logbl
);
1820 #elif defined GNULIB_POSIXCHECK
1822 # if HAVE_RAW_DECL_LOGBL
1823 _GL_WARN_ON_USE (logbl
, "logbl is unportable - "
1824 "use gnulib module logbl for portability");
1830 # if @REPLACE_MODFF@
1831 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1833 # define modff rpl_modff
1835 _GL_FUNCDECL_RPL (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1836 _GL_CXXALIAS_RPL (modff
, float, (float x
, float *iptr
));
1840 _GL_FUNCDECL_SYS (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1842 _GL_CXXALIAS_SYS (modff
, float, (float x
, float *iptr
));
1844 _GL_CXXALIASWARN (modff
);
1845 #elif defined GNULIB_POSIXCHECK
1847 # if HAVE_RAW_DECL_MODFF
1848 _GL_WARN_ON_USE (modff
, "modff is unportable - "
1849 "use gnulib module modff for portability");
1855 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1857 # define modf rpl_modf
1859 _GL_FUNCDECL_RPL (modf
, double, (double x
, double *iptr
) _GL_ARG_NONNULL ((2)));
1860 _GL_CXXALIAS_RPL (modf
, double, (double x
, double *iptr
));
1862 _GL_CXXALIAS_SYS (modf
, double, (double x
, double *iptr
));
1865 _GL_CXXALIASWARN1 (modf
, double, (double x
, double *iptr
));
1867 #elif defined GNULIB_POSIXCHECK
1869 # if HAVE_RAW_DECL_MODF
1870 _GL_WARN_ON_USE (modf
, "modf has portability problems - "
1871 "use gnulib module modf for portability");
1876 # if @REPLACE_MODFL@
1877 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1879 # define modfl rpl_modfl
1881 _GL_FUNCDECL_RPL (modfl
, long double, (long double x
, long double *iptr
)
1882 _GL_ARG_NONNULL ((2)));
1883 _GL_CXXALIAS_RPL (modfl
, long double, (long double x
, long double *iptr
));
1887 _GL_FUNCDECL_SYS (modfl
, long double, (long double x
, long double *iptr
)
1888 _GL_ARG_NONNULL ((2)));
1890 _GL_CXXALIAS_SYS (modfl
, long double, (long double x
, long double *iptr
));
1893 _GL_CXXALIASWARN (modfl
);
1895 #elif defined GNULIB_POSIXCHECK
1897 # if HAVE_RAW_DECL_MODFL
1898 _GL_WARN_ON_USE (modfl
, "modfl is unportable - "
1899 "use gnulib module modfl for portability");
1907 _GL_FUNCDECL_SYS (powf
, float, (float x
, float y
));
1909 _GL_CXXALIAS_SYS (powf
, float, (float x
, float y
));
1910 _GL_CXXALIASWARN (powf
);
1911 #elif defined GNULIB_POSIXCHECK
1913 # if HAVE_RAW_DECL_POWF
1914 _GL_WARN_ON_USE (powf
, "powf is unportable - "
1915 "use gnulib module powf for portability");
1920 #if @GNULIB_REMAINDERF@
1921 # if @REPLACE_REMAINDERF@
1922 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1924 # define remainderf rpl_remainderf
1926 _GL_FUNCDECL_RPL (remainderf
, float, (float x
, float y
));
1927 _GL_CXXALIAS_RPL (remainderf
, float, (float x
, float y
));
1929 # if !@HAVE_REMAINDERF@
1930 _GL_FUNCDECL_SYS (remainderf
, float, (float x
, float y
));
1932 _GL_CXXALIAS_SYS (remainderf
, float, (float x
, float y
));
1934 _GL_CXXALIASWARN (remainderf
);
1935 #elif defined GNULIB_POSIXCHECK
1937 # if HAVE_RAW_DECL_REMAINDERF
1938 _GL_WARN_ON_USE (remainderf
, "remainderf is unportable - "
1939 "use gnulib module remainderf for portability");
1943 #if @GNULIB_REMAINDER@
1944 # if @REPLACE_REMAINDER@
1945 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1947 # define remainder rpl_remainder
1949 _GL_FUNCDECL_RPL (remainder
, double, (double x
, double y
));
1950 _GL_CXXALIAS_RPL (remainder
, double, (double x
, double y
));
1952 # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
1953 _GL_FUNCDECL_SYS (remainder
, double, (double x
, double y
));
1955 _GL_CXXALIAS_SYS (remainder
, double, (double x
, double y
));
1958 _GL_CXXALIASWARN1 (remainder
, double, (double x
, double y
));
1960 #elif defined GNULIB_POSIXCHECK
1962 # if HAVE_RAW_DECL_REMAINDER
1963 _GL_WARN_ON_USE (remainder
, "remainder is unportable - "
1964 "use gnulib module remainder for portability");
1968 #if @GNULIB_REMAINDERL@
1969 # if @REPLACE_REMAINDERL@
1970 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1972 # define remainderl rpl_remainderl
1974 _GL_FUNCDECL_RPL (remainderl
, long double, (long double x
, long double y
));
1975 _GL_CXXALIAS_RPL (remainderl
, long double, (long double x
, long double y
));
1977 # if !@HAVE_DECL_REMAINDERL@
1979 # if !(defined __cplusplus && defined _AIX)
1980 _GL_FUNCDECL_SYS (remainderl
, long double, (long double x
, long double y
));
1983 _GL_CXXALIAS_SYS (remainderl
, long double, (long double x
, long double y
));
1986 _GL_CXXALIASWARN (remainderl
);
1988 #elif defined GNULIB_POSIXCHECK
1990 # if HAVE_RAW_DECL_REMAINDERL
1991 _GL_WARN_ON_USE (remainderl
, "remainderl is unportable - "
1992 "use gnulib module remainderl for portability");
1998 # if !@HAVE_DECL_RINTF@
1999 _GL_FUNCDECL_SYS (rintf
, float, (float x
));
2001 _GL_CXXALIAS_SYS (rintf
, float, (float x
));
2002 _GL_CXXALIASWARN (rintf
);
2003 #elif defined GNULIB_POSIXCHECK
2005 # if HAVE_RAW_DECL_RINTF
2006 _GL_WARN_ON_USE (rintf
, "rintf is unportable - "
2007 "use gnulib module rintf for portability");
2013 _GL_FUNCDECL_SYS (rint
, double, (double x
));
2015 _GL_CXXALIAS_SYS (rint
, double, (double x
));
2017 _GL_CXXALIASWARN1 (rint
, double, (double x
));
2019 #elif defined GNULIB_POSIXCHECK
2021 # if HAVE_RAW_DECL_RINT
2022 _GL_WARN_ON_USE (rint
, "rint is unportable - "
2023 "use gnulib module rint for portability");
2028 # if @REPLACE_RINTL@
2029 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2031 # define rintl rpl_rintl
2033 _GL_FUNCDECL_RPL (rintl
, long double, (long double x
));
2034 _GL_CXXALIAS_RPL (rintl
, long double, (long double x
));
2037 _GL_FUNCDECL_SYS (rintl
, long double, (long double x
));
2039 _GL_CXXALIAS_SYS (rintl
, long double, (long double x
));
2042 _GL_CXXALIASWARN (rintl
);
2044 #elif defined GNULIB_POSIXCHECK
2046 # if HAVE_RAW_DECL_RINTL
2047 _GL_WARN_ON_USE (rintl
, "rintl is unportable - "
2048 "use gnulib module rintl for portability");
2054 # if @REPLACE_ROUNDF@
2055 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2057 # define roundf rpl_roundf
2059 _GL_FUNCDECL_RPL (roundf
, float, (float x
));
2060 _GL_CXXALIAS_RPL (roundf
, float, (float x
));
2062 # if !@HAVE_DECL_ROUNDF@
2063 _GL_FUNCDECL_SYS (roundf
, float, (float x
));
2065 _GL_CXXALIAS_SYS (roundf
, float, (float x
));
2067 _GL_CXXALIASWARN (roundf
);
2068 #elif defined GNULIB_POSIXCHECK
2070 # if HAVE_RAW_DECL_ROUNDF
2071 _GL_WARN_ON_USE (roundf
, "roundf is unportable - "
2072 "use gnulib module roundf for portability");
2077 # if @REPLACE_ROUND@
2078 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2080 # define round rpl_round
2082 _GL_FUNCDECL_RPL (round
, double, (double x
));
2083 _GL_CXXALIAS_RPL (round
, double, (double x
));
2085 # if !@HAVE_DECL_ROUND@
2086 _GL_FUNCDECL_SYS (round
, double, (double x
));
2088 _GL_CXXALIAS_SYS (round
, double, (double x
));
2091 _GL_CXXALIASWARN1 (round
, double, (double x
));
2093 #elif defined GNULIB_POSIXCHECK
2095 # if HAVE_RAW_DECL_ROUND
2096 _GL_WARN_ON_USE (round
, "round is unportable - "
2097 "use gnulib module round for portability");
2102 # if @REPLACE_ROUNDL@
2103 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2105 # define roundl rpl_roundl
2107 _GL_FUNCDECL_RPL (roundl
, long double, (long double x
));
2108 _GL_CXXALIAS_RPL (roundl
, long double, (long double x
));
2110 # if !@HAVE_DECL_ROUNDL@
2112 # if !(defined __cplusplus && defined _AIX)
2113 _GL_FUNCDECL_SYS (roundl
, long double, (long double x
));
2116 _GL_CXXALIAS_SYS (roundl
, long double, (long double x
));
2119 _GL_CXXALIASWARN (roundl
);
2121 #elif defined GNULIB_POSIXCHECK
2123 # if HAVE_RAW_DECL_ROUNDL
2124 _GL_WARN_ON_USE (roundl
, "roundl is unportable - "
2125 "use gnulib module roundl for portability");
2132 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2134 # define sinf rpl_sinf
2136 _GL_FUNCDECL_RPL (sinf
, float, (float x
));
2137 _GL_CXXALIAS_RPL (sinf
, float, (float x
));
2141 _GL_FUNCDECL_SYS (sinf
, float, (float x
));
2143 _GL_CXXALIAS_SYS (sinf
, float, (float x
));
2145 _GL_CXXALIASWARN (sinf
);
2146 #elif defined GNULIB_POSIXCHECK
2148 # if HAVE_RAW_DECL_SINF
2149 _GL_WARN_ON_USE (sinf
, "sinf is unportable - "
2150 "use gnulib module sinf for portability");
2155 # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
2157 _GL_FUNCDECL_SYS (sinl
, long double, (long double x
));
2159 _GL_CXXALIAS_SYS (sinl
, long double, (long double x
));
2161 _GL_CXXALIASWARN (sinl
);
2163 #elif defined GNULIB_POSIXCHECK
2165 # if HAVE_RAW_DECL_SINL
2166 _GL_WARN_ON_USE (sinl
, "sinl is unportable - "
2167 "use gnulib module sinl for portability");
2173 # if @REPLACE_SINHF@
2174 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2176 # define sinhf rpl_sinhf
2178 _GL_FUNCDECL_RPL (sinhf
, float, (float x
));
2179 _GL_CXXALIAS_RPL (sinhf
, float, (float x
));
2183 _GL_FUNCDECL_SYS (sinhf
, float, (float x
));
2185 _GL_CXXALIAS_SYS (sinhf
, float, (float x
));
2187 _GL_CXXALIASWARN (sinhf
);
2188 #elif defined GNULIB_POSIXCHECK
2190 # if HAVE_RAW_DECL_SINHF
2191 _GL_WARN_ON_USE (sinhf
, "sinhf is unportable - "
2192 "use gnulib module sinhf for portability");
2198 # if @REPLACE_SQRTF@
2199 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2201 # define sqrtf rpl_sqrtf
2203 _GL_FUNCDECL_RPL (sqrtf
, float, (float x
));
2204 _GL_CXXALIAS_RPL (sqrtf
, float, (float x
));
2208 _GL_FUNCDECL_SYS (sqrtf
, float, (float x
));
2210 _GL_CXXALIAS_SYS (sqrtf
, float, (float x
));
2212 _GL_CXXALIASWARN (sqrtf
);
2213 #elif defined GNULIB_POSIXCHECK
2215 # if HAVE_RAW_DECL_SQRTF
2216 _GL_WARN_ON_USE (sqrtf
, "sqrtf is unportable - "
2217 "use gnulib module sqrtf for portability");
2222 # if @REPLACE_SQRTL@
2223 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2225 # define sqrtl rpl_sqrtl
2227 _GL_FUNCDECL_RPL (sqrtl
, long double, (long double x
));
2228 _GL_CXXALIAS_RPL (sqrtl
, long double, (long double x
));
2230 # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
2232 _GL_FUNCDECL_SYS (sqrtl
, long double, (long double x
));
2234 _GL_CXXALIAS_SYS (sqrtl
, long double, (long double x
));
2237 _GL_CXXALIASWARN (sqrtl
);
2239 #elif defined GNULIB_POSIXCHECK
2241 # if HAVE_RAW_DECL_SQRTL
2242 _GL_WARN_ON_USE (sqrtl
, "sqrtl is unportable - "
2243 "use gnulib module sqrtl for portability");
2250 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2252 # define tanf rpl_tanf
2254 _GL_FUNCDECL_RPL (tanf
, float, (float x
));
2255 _GL_CXXALIAS_RPL (tanf
, float, (float x
));
2259 _GL_FUNCDECL_SYS (tanf
, float, (float x
));
2261 _GL_CXXALIAS_SYS (tanf
, float, (float x
));
2263 _GL_CXXALIASWARN (tanf
);
2264 #elif defined GNULIB_POSIXCHECK
2266 # if HAVE_RAW_DECL_TANF
2267 _GL_WARN_ON_USE (tanf
, "tanf is unportable - "
2268 "use gnulib module tanf for portability");
2273 # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
2275 _GL_FUNCDECL_SYS (tanl
, long double, (long double x
));
2277 _GL_CXXALIAS_SYS (tanl
, long double, (long double x
));
2279 _GL_CXXALIASWARN (tanl
);
2281 #elif defined GNULIB_POSIXCHECK
2283 # if HAVE_RAW_DECL_TANL
2284 _GL_WARN_ON_USE (tanl
, "tanl is unportable - "
2285 "use gnulib module tanl for portability");
2291 # if @REPLACE_TANHF@
2292 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2294 # define tanhf rpl_tanhf
2296 _GL_FUNCDECL_RPL (tanhf
, float, (float x
));
2297 _GL_CXXALIAS_RPL (tanhf
, float, (float x
));
2301 _GL_FUNCDECL_SYS (tanhf
, float, (float x
));
2303 _GL_CXXALIAS_SYS (tanhf
, float, (float x
));
2305 _GL_CXXALIASWARN (tanhf
);
2306 #elif defined GNULIB_POSIXCHECK
2308 # if HAVE_RAW_DECL_TANHF
2309 _GL_WARN_ON_USE (tanhf
, "tanhf is unportable - "
2310 "use gnulib module tanhf for portability");
2316 # if @REPLACE_TRUNCF@
2317 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2319 # define truncf rpl_truncf
2321 _GL_FUNCDECL_RPL (truncf
, float, (float x
));
2322 _GL_CXXALIAS_RPL (truncf
, float, (float x
));
2324 # if !@HAVE_DECL_TRUNCF@
2325 _GL_FUNCDECL_SYS (truncf
, float, (float x
));
2327 _GL_CXXALIAS_SYS (truncf
, float, (float x
));
2329 _GL_CXXALIASWARN (truncf
);
2330 #elif defined GNULIB_POSIXCHECK
2332 # if HAVE_RAW_DECL_TRUNCF
2333 _GL_WARN_ON_USE (truncf
, "truncf is unportable - "
2334 "use gnulib module truncf for portability");
2339 # if @REPLACE_TRUNC@
2340 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2342 # define trunc rpl_trunc
2344 _GL_FUNCDECL_RPL (trunc
, double, (double x
));
2345 _GL_CXXALIAS_RPL (trunc
, double, (double x
));
2347 # if !@HAVE_DECL_TRUNC@
2348 _GL_FUNCDECL_SYS (trunc
, double, (double x
));
2350 _GL_CXXALIAS_SYS (trunc
, double, (double x
));
2353 _GL_CXXALIASWARN1 (trunc
, double, (double x
));
2355 #elif defined GNULIB_POSIXCHECK
2357 # if HAVE_RAW_DECL_TRUNC
2358 _GL_WARN_ON_USE (trunc
, "trunc is unportable - "
2359 "use gnulib module trunc for portability");
2364 # if @REPLACE_TRUNCL@
2365 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2367 # define truncl rpl_truncl
2369 _GL_FUNCDECL_RPL (truncl
, long double, (long double x
));
2370 _GL_CXXALIAS_RPL (truncl
, long double, (long double x
));
2372 # if !@HAVE_DECL_TRUNCL@
2373 _GL_FUNCDECL_SYS (truncl
, long double, (long double x
));
2375 _GL_CXXALIAS_SYS (truncl
, long double, (long double x
));
2378 _GL_CXXALIASWARN (truncl
);
2380 #elif defined GNULIB_POSIXCHECK
2382 # if HAVE_RAW_DECL_TRUNCL
2383 _GL_WARN_ON_USE (truncl
, "truncl is unportable - "
2384 "use gnulib module truncl for portability");
2390 /* On native Windows, map 'y0' to '_y0', so that -loldnames is not
2391 required. In C++ with GNULIB_NAMESPACE, avoid differences between
2392 platforms by defining GNULIB_NAMESPACE::y0 always. */
2393 # if defined _WIN32 && !defined __CYGWIN__
2394 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2398 _GL_CXXALIAS_MDA (y0
, double, (double x
));
2400 _GL_CXXALIAS_SYS (y0
, double, (double x
));
2402 _GL_CXXALIASWARN (y0
);
2406 /* On native Windows, map 'y1' to '_y1', so that -loldnames is not
2407 required. In C++ with GNULIB_NAMESPACE, avoid differences between
2408 platforms by defining GNULIB_NAMESPACE::y1 always. */
2409 # if defined _WIN32 && !defined __CYGWIN__
2410 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2414 _GL_CXXALIAS_MDA (y1
, double, (double x
));
2416 _GL_CXXALIAS_SYS (y1
, double, (double x
));
2418 _GL_CXXALIASWARN (y1
);
2422 /* On native Windows, map 'yn' to '_yn', so that -loldnames is not
2423 required. In C++ with GNULIB_NAMESPACE, avoid differences between
2424 platforms by defining GNULIB_NAMESPACE::yn always. */
2425 # if defined _WIN32 && !defined __CYGWIN__
2426 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2430 _GL_CXXALIAS_MDA (yn
, double, (int n
, double x
));
2432 _GL_CXXALIAS_SYS (yn
, double, (int n
, double x
));
2434 _GL_CXXALIASWARN (yn
);
2438 /* Definitions of function-like macros come here, after the function
2442 #if @GNULIB_ISFINITE@
2443 # if @REPLACE_ISFINITE@
2444 _GL_EXTERN_C
int gl_isfinitef (float x
);
2445 _GL_EXTERN_C
int gl_isfinited (double x
);
2446 _GL_EXTERN_C
int gl_isfinitel (long double x
);
2448 # define isfinite(x) \
2449 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
2450 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
2454 # if defined isfinite || defined GNULIB_NAMESPACE
2455 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite
)
2457 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__)))
2458 /* This platform's <cmath> possibly defines isfinite through a set of inline
2460 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
, rpl_isfinite
, bool)
2461 # define isfinite rpl_isfinite
2462 # define GNULIB_NAMESPACE_LACKS_ISFINITE 1
2464 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
, isfinite
, bool)
2468 #elif defined GNULIB_POSIXCHECK
2469 # if defined isfinite
2470 _GL_WARN_REAL_FLOATING_DECL (isfinite
);
2472 # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
2478 # if @REPLACE_ISINF@
2479 _GL_EXTERN_C
int gl_isinff (float x
);
2480 _GL_EXTERN_C
int gl_isinfd (double x
);
2481 _GL_EXTERN_C
int gl_isinfl (long double x
);
2484 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
2485 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
2489 # if defined isinf || defined GNULIB_NAMESPACE
2490 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf
)
2492 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__)))
2493 /* This platform's <cmath> possibly defines isinf through a set of inline
2495 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
, rpl_isinf
, bool)
2496 # define isinf rpl_isinf
2497 # define GNULIB_NAMESPACE_LACKS_ISINF 1
2499 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
, isinf
, bool)
2503 #elif defined GNULIB_POSIXCHECK
2505 _GL_WARN_REAL_FLOATING_DECL (isinf
);
2507 # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
2513 /* Test for NaN for 'float' numbers. */
2515 /* The original <math.h> included above provides a declaration of isnan macro
2516 or (older) isnanf function. */
2517 # if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2518 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.
2519 GCC >= 4.0 also provides __builtin_isnanf, but clang doesn't. */
2521 # define isnanf(x) __builtin_isnan ((float)(x))
2522 # elif defined isnan
2524 # define isnanf(x) isnan ((float)(x))
2527 /* Test whether X is a NaN. */
2529 # define isnanf rpl_isnanf
2530 _GL_EXTERN_C
int isnanf (float x
);
2535 /* Test for NaN for 'double' numbers.
2536 This function is a gnulib extension, unlike isnan() which applied only
2537 to 'double' numbers earlier but now is a type-generic macro. */
2539 /* The original <math.h> included above provides a declaration of isnan
2541 # if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2542 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan. */
2544 # define isnand(x) __builtin_isnan ((double)(x))
2547 # define isnand(x) isnan ((double)(x))
2550 /* Test whether X is a NaN. */
2552 # define isnand rpl_isnand
2553 _GL_EXTERN_C
int isnand (double x
);
2558 /* Test for NaN for 'long double' numbers. */
2560 /* The original <math.h> included above provides a declaration of isnan
2561 macro or (older) isnanl function. */
2562 # if (__GNUC__ >= 4) || (__clang_major__ >= 4)
2563 /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.
2564 GCC >= 4.0 also provides __builtin_isnanl, but clang doesn't. */
2566 # define isnanl(x) __builtin_isnan ((long double)(x))
2567 # elif defined isnan
2569 # define isnanl(x) isnan ((long double)(x))
2572 /* Test whether X is a NaN. */
2574 # define isnanl rpl_isnanl
2575 _GL_EXTERN_C
int isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2579 /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
2581 # if @REPLACE_ISNAN@
2582 /* We can't just use the isnanf macro (e.g.) as exposed by
2583 isnanf.h (e.g.) here, because those may end up being macros
2584 that recursively expand back to isnan. So use the gnulib
2585 replacements for them directly. */
2586 # if @HAVE_ISNANF@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2587 # define gl_isnan_f(x) __builtin_isnan ((float)(x))
2589 _GL_EXTERN_C
int rpl_isnanf (float x
);
2590 # define gl_isnan_f(x) rpl_isnanf (x)
2592 # if @HAVE_ISNAND@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2593 # define gl_isnan_d(x) __builtin_isnan ((double)(x))
2595 _GL_EXTERN_C
int rpl_isnand (double x
);
2596 # define gl_isnan_d(x) rpl_isnand (x)
2598 # if @HAVE_ISNANL@ && (__GNUC__ >= 4) || (__clang_major__ >= 4)
2599 # define gl_isnan_l(x) __builtin_isnan ((long double)(x))
2601 _GL_EXTERN_C
int rpl_isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2602 # define gl_isnan_l(x) rpl_isnanl (x)
2606 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
2607 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
2609 # elif (__GNUC__ >= 4) || (__clang_major__ >= 4)
2612 (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \
2613 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
2614 __builtin_isnan ((float)(x)))
2617 # if defined isnan || defined GNULIB_NAMESPACE
2618 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan
)
2620 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__ && __clang_major__ < 12) || (defined __FreeBSD__ && (__clang_major__ < 7 || __clang_major__ >= 11)) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__)))
2621 /* This platform's <cmath> possibly defines isnan through a set of inline
2623 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
, rpl_isnan
, bool)
2624 # define isnan rpl_isnan
2625 # define GNULIB_NAMESPACE_LACKS_ISNAN 1
2627 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
, isnan
, bool)
2631 /* Ensure isnan is a macro. */
2633 # define isnan isnan
2636 #elif defined GNULIB_POSIXCHECK
2638 _GL_WARN_REAL_FLOATING_DECL (isnan
);
2640 # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
2645 #if @GNULIB_SIGNBIT@
2646 # if (@REPLACE_SIGNBIT_USING_BUILTINS@ \
2647 && (!defined __cplusplus || __cplusplus < 201103))
2649 /* GCC >= 4.0 and clang provide three built-ins for signbit. */
2650 # define signbit(x) \
2651 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
2652 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
2653 __builtin_signbitf (x))
2655 # if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit
2657 _GL_EXTERN_C
int gl_signbitf (float arg
);
2658 _GL_EXTERN_C
int gl_signbitd (double arg
);
2659 _GL_EXTERN_C
int gl_signbitl (long double arg
);
2660 # if (__GNUC__ >= 2 || defined __clang__) && !defined __STRICT_ANSI__
2661 # define _GL_NUM_UINT_WORDS(type) \
2662 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
2663 # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
2664 # define gl_signbitf_OPTIMIZED_MACRO
2665 # define gl_signbitf(arg) \
2666 ({ union { float _value; \
2667 unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
2669 _m._value = (arg); \
2670 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
2673 # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
2674 # define gl_signbitd_OPTIMIZED_MACRO
2675 # define gl_signbitd(arg) \
2676 ({ union { double _value; \
2677 unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
2679 _m._value = (arg); \
2680 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
2683 # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
2684 # define gl_signbitl_OPTIMIZED_MACRO
2685 # define gl_signbitl(arg) \
2686 ({ union { long double _value; \
2687 unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
2689 _m._value = (arg); \
2690 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
2694 # define signbit(x) \
2695 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
2696 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
2698 # define GNULIB_defined_signbit 1
2701 # if defined signbit || defined GNULIB_NAMESPACE
2702 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit
)
2704 # if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__)))
2705 /* This platform's <cmath> possibly defines signbit through a set of inline
2707 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
, rpl_signbit
, bool)
2708 # define signbit rpl_signbit
2709 # define GNULIB_NAMESPACE_LACKS_SIGNBIT 1
2711 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
, signbit
, bool)
2715 #elif defined GNULIB_POSIXCHECK
2716 # if defined signbit
2717 _GL_WARN_REAL_FLOATING_DECL (signbit
);
2719 # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
2723 _GL_INLINE_HEADER_END
2725 #endif /* _@GUARD_PREFIX@_MATH_H */
2726 #endif /* _GL_INCLUDING_MATH_H */
2727 #endif /* _@GUARD_PREFIX@_MATH_H */