1 /* A GNU-like <math.h>.
3 Copyright (C) 2002-2003, 2007-2019 Free Software Foundation, Inc.
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
18 #ifndef _@GUARD_PREFIX@_MATH_H
21 @PRAGMA_SYSTEM_HEADER@
25 /* The include_next requires a split double-inclusion guard. */
26 #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
28 #ifndef _@GUARD_PREFIX@_MATH_H
29 #define _@GUARD_PREFIX@_MATH_H
31 /* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in <fp.h>. */
32 #if defined __VMS && ! defined NAN
36 #ifndef _GL_INLINE_HEADER_BEGIN
37 #error "Please include config.h first."
39 _GL_INLINE_HEADER_BEGIN
40 #ifndef _GL_MATH_INLINE
41 # define _GL_MATH_INLINE _GL_INLINE
44 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
46 /* The definition of _GL_ARG_NONNULL is copied here. */
48 /* The definition of _GL_WARN_ON_USE is copied here. */
51 /* Helper macros to define type-generic function FUNC as overloaded functions,
52 rather than as macros like in C. POSIX declares these with an argument of
53 real-floating (that is, one of float, double, or long double). */
54 # define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \
56 _gl_cxx_ ## func ## f (float f) \
61 _gl_cxx_ ## func ## d (double d) \
66 _gl_cxx_ ## func ## l (long double l) \
70 # define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \
75 return _gl_cxx_ ## func ## f (f); \
80 return _gl_cxx_ ## func ## d (d); \
83 func (long double l) \
85 return _gl_cxx_ ## func ## l (l); \
90 /* Helper macros to define a portability warning for the
91 classification macro FUNC called with VALUE. POSIX declares the
92 classification macros with an argument of real-floating (that is,
93 one of float, double, or long double). */
94 #define _GL_WARN_REAL_FLOATING_DECL(func) \
96 _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
97 "use gnulib module " #func " for portability") \
98 rpl_ ## func ## f (float f) \
102 _GL_MATH_INLINE int \
103 _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
104 "use gnulib module " #func " for portability") \
105 rpl_ ## func ## d (double d) \
109 _GL_MATH_INLINE int \
110 _GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
111 "use gnulib module " #func " for portability") \
112 rpl_ ## func ## l (long double l) \
116 #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
117 (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \
118 : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \
119 : rpl_ ## func ## l (value))
123 /* Pull in a function that fixes the 'int' to 'long double' conversion
125 _GL_EXTERN_C
void _Qp_itoq (long double *, int);
126 static void (*_gl_math_fix_itold
) (long double *, int) = _Qp_itoq
;
130 /* POSIX allows platforms that don't support NAN. But all major
131 machines in the past 15 years have supported something close to
132 IEEE NaN, so we define this unconditionally. We also must define
133 it on platforms like Solaris 10, where NAN is present but defined
134 as a function pointer rather than a floating point constant. */
135 #if !defined NAN || @REPLACE_NAN@
136 # if !GNULIB_defined_NAN
138 /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
139 choke on the expression 0.0 / 0.0. */
140 # if defined __DECC || defined _MSC_VER
141 _GL_MATH_INLINE
float
144 static float zero
= 0.0f
;
147 # define NAN (_NaN())
149 # define NAN (0.0f / 0.0f)
151 # define GNULIB_defined_NAN 1
155 /* Solaris 10 defines HUGE_VAL, but as a function pointer rather
156 than a floating point constant. */
157 #if @REPLACE_HUGE_VAL@
159 # define HUGE_VALF (1.0f / 0.0f)
161 # define HUGE_VAL (1.0 / 0.0)
163 # define HUGE_VALL (1.0L / 0.0L)
166 /* HUGE_VALF is a 'float' Infinity. */
168 # if defined _MSC_VER
169 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
170 # define HUGE_VALF (1e25f * 1e25f)
172 # define HUGE_VALF (1.0f / 0.0f)
176 /* HUGE_VAL is a 'double' Infinity. */
178 # if defined _MSC_VER
179 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
180 # define HUGE_VAL (1e250 * 1e250)
182 # define HUGE_VAL (1.0 / 0.0)
186 /* HUGE_VALL is a 'long double' Infinity. */
188 # if defined _MSC_VER
189 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
190 # define HUGE_VALL (1e250L * 1e250L)
192 # define HUGE_VALL (1.0L / 0.0L)
197 #if defined FP_ILOGB0 && defined FP_ILOGBNAN
198 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */
199 # if defined __HAIKU__
200 /* Haiku: match what ilogb() does */
203 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
204 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
207 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
208 # if defined __NetBSD__ || defined __sgi
209 /* NetBSD, IRIX 6.5: match what ilogb() does */
210 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
211 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
213 /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
214 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
215 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
217 /* Solaris 9: match what ilogb() does */
218 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
219 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
221 /* Gnulib defined values. */
222 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
223 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
230 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
232 # define acosf rpl_acosf
234 _GL_FUNCDECL_RPL (acosf
, float, (float x
));
235 _GL_CXXALIAS_RPL (acosf
, float, (float x
));
239 _GL_FUNCDECL_SYS (acosf
, float, (float x
));
241 _GL_CXXALIAS_SYS (acosf
, float, (float x
));
243 _GL_CXXALIASWARN (acosf
);
244 #elif defined GNULIB_POSIXCHECK
246 # if HAVE_RAW_DECL_ACOSF
247 _GL_WARN_ON_USE (acosf
, "acosf is unportable - "
248 "use gnulib module acosf for portability");
253 # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
255 _GL_FUNCDECL_SYS (acosl
, long double, (long double x
));
257 _GL_CXXALIAS_SYS (acosl
, long double, (long double x
));
258 _GL_CXXALIASWARN (acosl
);
259 #elif defined GNULIB_POSIXCHECK
261 # if HAVE_RAW_DECL_ACOSL
262 _GL_WARN_ON_USE (acosl
, "acosl is unportable - "
263 "use gnulib module acosl for portability");
270 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
272 # define asinf rpl_asinf
274 _GL_FUNCDECL_RPL (asinf
, float, (float x
));
275 _GL_CXXALIAS_RPL (asinf
, float, (float x
));
279 _GL_FUNCDECL_SYS (asinf
, float, (float x
));
281 _GL_CXXALIAS_SYS (asinf
, float, (float x
));
283 _GL_CXXALIASWARN (asinf
);
284 #elif defined GNULIB_POSIXCHECK
286 # if HAVE_RAW_DECL_ASINF
287 _GL_WARN_ON_USE (asinf
, "asinf is unportable - "
288 "use gnulib module asinf for portability");
293 # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
295 _GL_FUNCDECL_SYS (asinl
, long double, (long double x
));
297 _GL_CXXALIAS_SYS (asinl
, long double, (long double x
));
298 _GL_CXXALIASWARN (asinl
);
299 #elif defined GNULIB_POSIXCHECK
301 # if HAVE_RAW_DECL_ASINL
302 _GL_WARN_ON_USE (asinl
, "asinl is unportable - "
303 "use gnulib module asinl for portability");
310 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
312 # define atanf rpl_atanf
314 _GL_FUNCDECL_RPL (atanf
, float, (float x
));
315 _GL_CXXALIAS_RPL (atanf
, float, (float x
));
319 _GL_FUNCDECL_SYS (atanf
, float, (float x
));
321 _GL_CXXALIAS_SYS (atanf
, float, (float x
));
323 _GL_CXXALIASWARN (atanf
);
324 #elif defined GNULIB_POSIXCHECK
326 # if HAVE_RAW_DECL_ATANF
327 _GL_WARN_ON_USE (atanf
, "atanf is unportable - "
328 "use gnulib module atanf for portability");
333 # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
335 _GL_FUNCDECL_SYS (atanl
, long double, (long double x
));
337 _GL_CXXALIAS_SYS (atanl
, long double, (long double x
));
338 _GL_CXXALIASWARN (atanl
);
339 #elif defined GNULIB_POSIXCHECK
341 # if HAVE_RAW_DECL_ATANL
342 _GL_WARN_ON_USE (atanl
, "atanl is unportable - "
343 "use gnulib module atanl for portability");
349 # if @REPLACE_ATAN2F@
350 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
352 # define atan2f rpl_atan2f
354 _GL_FUNCDECL_RPL (atan2f
, float, (float y
, float x
));
355 _GL_CXXALIAS_RPL (atan2f
, float, (float y
, float x
));
359 _GL_FUNCDECL_SYS (atan2f
, float, (float y
, float x
));
361 _GL_CXXALIAS_SYS (atan2f
, float, (float y
, float x
));
363 _GL_CXXALIASWARN (atan2f
);
364 #elif defined GNULIB_POSIXCHECK
366 # if HAVE_RAW_DECL_ATAN2F
367 _GL_WARN_ON_USE (atan2f
, "atan2f is unportable - "
368 "use gnulib module atan2f for portability");
375 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
377 # define cbrtf rpl_cbrtf
379 _GL_FUNCDECL_RPL (cbrtf
, float, (float x
));
380 _GL_CXXALIAS_RPL (cbrtf
, float, (float x
));
382 # if !@HAVE_DECL_CBRTF@
383 _GL_FUNCDECL_SYS (cbrtf
, float, (float x
));
385 _GL_CXXALIAS_SYS (cbrtf
, float, (float x
));
387 _GL_CXXALIASWARN (cbrtf
);
388 #elif defined GNULIB_POSIXCHECK
390 # if HAVE_RAW_DECL_CBRTF
391 _GL_WARN_ON_USE (cbrtf
, "cbrtf is unportable - "
392 "use gnulib module cbrtf for portability");
398 _GL_FUNCDECL_SYS (cbrt
, double, (double x
));
400 _GL_CXXALIAS_SYS (cbrt
, double, (double x
));
401 _GL_CXXALIASWARN (cbrt
);
402 #elif defined GNULIB_POSIXCHECK
404 # if HAVE_RAW_DECL_CBRT
405 _GL_WARN_ON_USE (cbrt
, "cbrt is unportable - "
406 "use gnulib module cbrt for portability");
412 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
414 # define cbrtl rpl_cbrtl
416 _GL_FUNCDECL_RPL (cbrtl
, long double, (long double x
));
417 _GL_CXXALIAS_RPL (cbrtl
, long double, (long double x
));
419 # if !@HAVE_DECL_CBRTL@
420 _GL_FUNCDECL_SYS (cbrtl
, long double, (long double x
));
422 _GL_CXXALIAS_SYS (cbrtl
, long double, (long double x
));
424 _GL_CXXALIASWARN (cbrtl
);
425 #elif defined GNULIB_POSIXCHECK
427 # if HAVE_RAW_DECL_CBRTL
428 _GL_WARN_ON_USE (cbrtl
, "cbrtl is unportable - "
429 "use gnulib module cbrtl for portability");
436 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
438 # define ceilf rpl_ceilf
440 _GL_FUNCDECL_RPL (ceilf
, float, (float x
));
441 _GL_CXXALIAS_RPL (ceilf
, float, (float x
));
443 # if !@HAVE_DECL_CEILF@
445 _GL_FUNCDECL_SYS (ceilf
, float, (float x
));
447 _GL_CXXALIAS_SYS (ceilf
, float, (float x
));
449 _GL_CXXALIASWARN (ceilf
);
450 #elif defined GNULIB_POSIXCHECK
452 # if HAVE_RAW_DECL_CEILF
453 _GL_WARN_ON_USE (ceilf
, "ceilf is unportable - "
454 "use gnulib module ceilf for portability");
460 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
462 # define ceil rpl_ceil
464 _GL_FUNCDECL_RPL (ceil
, double, (double x
));
465 _GL_CXXALIAS_RPL (ceil
, double, (double x
));
467 _GL_CXXALIAS_SYS (ceil
, double, (double x
));
469 _GL_CXXALIASWARN (ceil
);
474 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
476 # define ceill rpl_ceill
478 _GL_FUNCDECL_RPL (ceill
, long double, (long double x
));
479 _GL_CXXALIAS_RPL (ceill
, long double, (long double x
));
481 # if !@HAVE_DECL_CEILL@
483 _GL_FUNCDECL_SYS (ceill
, long double, (long double x
));
485 _GL_CXXALIAS_SYS (ceill
, long double, (long double x
));
487 _GL_CXXALIASWARN (ceill
);
488 #elif defined GNULIB_POSIXCHECK
490 # if HAVE_RAW_DECL_CEILL
491 _GL_WARN_ON_USE (ceill
, "ceill is unportable - "
492 "use gnulib module ceill for portability");
497 #if @GNULIB_COPYSIGNF@
498 # if !@HAVE_DECL_COPYSIGNF@
499 _GL_FUNCDECL_SYS (copysignf
, float, (float x
, float y
));
501 _GL_CXXALIAS_SYS (copysignf
, float, (float x
, float y
));
502 _GL_CXXALIASWARN (copysignf
);
503 #elif defined GNULIB_POSIXCHECK
505 # if HAVE_RAW_DECL_COPYSIGNF
506 _GL_WARN_ON_USE (copysignf
, "copysignf is unportable - "
507 "use gnulib module copysignf for portability");
511 #if @GNULIB_COPYSIGN@
512 # if !@HAVE_COPYSIGN@
513 _GL_FUNCDECL_SYS (copysign
, double, (double x
, double y
));
515 _GL_CXXALIAS_SYS (copysign
, double, (double x
, double y
));
516 _GL_CXXALIASWARN (copysign
);
517 #elif defined GNULIB_POSIXCHECK
519 # if HAVE_RAW_DECL_COPYSIGN
520 _GL_WARN_ON_USE (copysign
, "copysign is unportable - "
521 "use gnulib module copysign for portability");
525 #if @GNULIB_COPYSIGNL@
526 # if !@HAVE_COPYSIGNL@
527 _GL_FUNCDECL_SYS (copysignl
, long double, (long double x
, long double y
));
529 _GL_CXXALIAS_SYS (copysignl
, long double, (long double x
, long double y
));
530 _GL_CXXALIASWARN (copysignl
);
531 #elif defined GNULIB_POSIXCHECK
533 # if HAVE_RAW_DECL_COPYSIGNL
534 _GL_WARN_ON_USE (copysign
, "copysignl is unportable - "
535 "use gnulib module copysignl for portability");
542 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
544 # define cosf rpl_cosf
546 _GL_FUNCDECL_RPL (cosf
, float, (float x
));
547 _GL_CXXALIAS_RPL (cosf
, float, (float x
));
551 _GL_FUNCDECL_SYS (cosf
, float, (float x
));
553 _GL_CXXALIAS_SYS (cosf
, float, (float x
));
555 _GL_CXXALIASWARN (cosf
);
556 #elif defined GNULIB_POSIXCHECK
558 # if HAVE_RAW_DECL_COSF
559 _GL_WARN_ON_USE (cosf
, "cosf is unportable - "
560 "use gnulib module cosf for portability");
565 # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
567 _GL_FUNCDECL_SYS (cosl
, long double, (long double x
));
569 _GL_CXXALIAS_SYS (cosl
, long double, (long double x
));
570 _GL_CXXALIASWARN (cosl
);
571 #elif defined GNULIB_POSIXCHECK
573 # if HAVE_RAW_DECL_COSL
574 _GL_WARN_ON_USE (cosl
, "cosl is unportable - "
575 "use gnulib module cosl for portability");
582 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
584 # define coshf rpl_coshf
586 _GL_FUNCDECL_RPL (coshf
, float, (float x
));
587 _GL_CXXALIAS_RPL (coshf
, float, (float x
));
591 _GL_FUNCDECL_SYS (coshf
, float, (float x
));
593 _GL_CXXALIAS_SYS (coshf
, float, (float x
));
595 _GL_CXXALIASWARN (coshf
);
596 #elif defined GNULIB_POSIXCHECK
598 # if HAVE_RAW_DECL_COSHF
599 _GL_WARN_ON_USE (coshf
, "coshf is unportable - "
600 "use gnulib module coshf for portability");
607 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
609 # define expf rpl_expf
611 _GL_FUNCDECL_RPL (expf
, float, (float x
));
612 _GL_CXXALIAS_RPL (expf
, float, (float x
));
616 _GL_FUNCDECL_SYS (expf
, float, (float x
));
618 _GL_CXXALIAS_SYS (expf
, float, (float x
));
620 _GL_CXXALIASWARN (expf
);
621 #elif defined GNULIB_POSIXCHECK
623 # if HAVE_RAW_DECL_EXPF
624 _GL_WARN_ON_USE (expf
, "expf is unportable - "
625 "use gnulib module expf for portability");
631 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
633 # define expl rpl_expl
635 _GL_FUNCDECL_RPL (expl
, long double, (long double x
));
636 _GL_CXXALIAS_RPL (expl
, long double, (long double x
));
638 # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
640 _GL_FUNCDECL_SYS (expl
, long double, (long double x
));
642 _GL_CXXALIAS_SYS (expl
, long double, (long double x
));
644 _GL_CXXALIASWARN (expl
);
645 #elif defined GNULIB_POSIXCHECK
647 # if HAVE_RAW_DECL_EXPL
648 _GL_WARN_ON_USE (expl
, "expl is unportable - "
649 "use gnulib module expl for portability");
655 # if !@HAVE_DECL_EXP2F@
656 _GL_FUNCDECL_SYS (exp2f
, float, (float x
));
658 _GL_CXXALIAS_SYS (exp2f
, float, (float x
));
659 _GL_CXXALIASWARN (exp2f
);
660 #elif defined GNULIB_POSIXCHECK
662 # if HAVE_RAW_DECL_EXP2F
663 _GL_WARN_ON_USE (exp2f
, "exp2f is unportable - "
664 "use gnulib module exp2f for portability");
670 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
672 # define exp2 rpl_exp2
674 _GL_FUNCDECL_RPL (exp2
, double, (double x
));
675 _GL_CXXALIAS_RPL (exp2
, double, (double x
));
677 # if !@HAVE_DECL_EXP2@
678 _GL_FUNCDECL_SYS (exp2
, double, (double x
));
680 _GL_CXXALIAS_SYS (exp2
, double, (double x
));
682 _GL_CXXALIASWARN (exp2
);
683 #elif defined GNULIB_POSIXCHECK
685 # if HAVE_RAW_DECL_EXP2
686 _GL_WARN_ON_USE (exp2
, "exp2 is unportable - "
687 "use gnulib module exp2 for portability");
693 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
695 # define exp2l rpl_exp2l
697 _GL_FUNCDECL_RPL (exp2l
, long double, (long double x
));
698 _GL_CXXALIAS_RPL (exp2l
, long double, (long double x
));
700 # if !@HAVE_DECL_EXP2L@
702 _GL_FUNCDECL_SYS (exp2l
, long double, (long double x
));
704 _GL_CXXALIAS_SYS (exp2l
, long double, (long double x
));
706 _GL_CXXALIASWARN (exp2l
);
707 #elif defined GNULIB_POSIXCHECK
709 # if HAVE_RAW_DECL_EXP2L
710 _GL_WARN_ON_USE (exp2l
, "exp2l is unportable - "
711 "use gnulib module exp2l for portability");
717 # if @REPLACE_EXPM1F@
718 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
720 # define expm1f rpl_expm1f
722 _GL_FUNCDECL_RPL (expm1f
, float, (float x
));
723 _GL_CXXALIAS_RPL (expm1f
, float, (float x
));
726 _GL_FUNCDECL_SYS (expm1f
, float, (float x
));
728 _GL_CXXALIAS_SYS (expm1f
, float, (float x
));
730 _GL_CXXALIASWARN (expm1f
);
731 #elif defined GNULIB_POSIXCHECK
733 # if HAVE_RAW_DECL_EXPM1F
734 _GL_WARN_ON_USE (expm1f
, "expm1f is unportable - "
735 "use gnulib module expm1f for portability");
741 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
743 # define expm1 rpl_expm1
745 _GL_FUNCDECL_RPL (expm1
, double, (double x
));
746 _GL_CXXALIAS_RPL (expm1
, double, (double x
));
749 _GL_FUNCDECL_SYS (expm1
, double, (double x
));
751 _GL_CXXALIAS_SYS (expm1
, double, (double x
));
753 _GL_CXXALIASWARN (expm1
);
754 #elif defined GNULIB_POSIXCHECK
756 # if HAVE_RAW_DECL_EXPM1
757 _GL_WARN_ON_USE (expm1
, "expm1 is unportable - "
758 "use gnulib module expm1 for portability");
763 # if @REPLACE_EXPM1L@
764 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
766 # define expm1l rpl_expm1l
768 _GL_FUNCDECL_RPL (expm1l
, long double, (long double x
));
769 _GL_CXXALIAS_RPL (expm1l
, long double, (long double x
));
771 # if !@HAVE_DECL_EXPM1L@
773 _GL_FUNCDECL_SYS (expm1l
, long double, (long double x
));
775 _GL_CXXALIAS_SYS (expm1l
, long double, (long double x
));
777 _GL_CXXALIASWARN (expm1l
);
778 #elif defined GNULIB_POSIXCHECK
780 # if HAVE_RAW_DECL_EXPM1L
781 _GL_WARN_ON_USE (expm1l
, "expm1l is unportable - "
782 "use gnulib module expm1l for portability");
790 _GL_FUNCDECL_SYS (fabsf
, float, (float x
));
792 _GL_CXXALIAS_SYS (fabsf
, float, (float x
));
793 _GL_CXXALIASWARN (fabsf
);
794 #elif defined GNULIB_POSIXCHECK
796 # if HAVE_RAW_DECL_FABSF
797 _GL_WARN_ON_USE (fabsf
, "fabsf is unportable - "
798 "use gnulib module fabsf for portability");
804 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
806 # define fabsl rpl_fabsl
808 _GL_FUNCDECL_RPL (fabsl
, long double, (long double x
));
809 _GL_CXXALIAS_RPL (fabsl
, long double, (long double x
));
813 _GL_FUNCDECL_SYS (fabsl
, long double, (long double x
));
815 _GL_CXXALIAS_SYS (fabsl
, long double, (long double x
));
817 _GL_CXXALIASWARN (fabsl
);
818 #elif defined GNULIB_POSIXCHECK
820 # if HAVE_RAW_DECL_FABSL
821 _GL_WARN_ON_USE (fabsl
, "fabsl is unportable - "
822 "use gnulib module fabsl for portability");
828 # if @REPLACE_FLOORF@
829 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
831 # define floorf rpl_floorf
833 _GL_FUNCDECL_RPL (floorf
, float, (float x
));
834 _GL_CXXALIAS_RPL (floorf
, float, (float x
));
836 # if !@HAVE_DECL_FLOORF@
838 _GL_FUNCDECL_SYS (floorf
, float, (float x
));
840 _GL_CXXALIAS_SYS (floorf
, float, (float x
));
842 _GL_CXXALIASWARN (floorf
);
843 #elif defined GNULIB_POSIXCHECK
845 # if HAVE_RAW_DECL_FLOORF
846 _GL_WARN_ON_USE (floorf
, "floorf is unportable - "
847 "use gnulib module floorf for portability");
853 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
855 # define floor rpl_floor
857 _GL_FUNCDECL_RPL (floor
, double, (double x
));
858 _GL_CXXALIAS_RPL (floor
, double, (double x
));
860 _GL_CXXALIAS_SYS (floor
, double, (double x
));
862 _GL_CXXALIASWARN (floor
);
866 # if @REPLACE_FLOORL@
867 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
869 # define floorl rpl_floorl
871 _GL_FUNCDECL_RPL (floorl
, long double, (long double x
));
872 _GL_CXXALIAS_RPL (floorl
, long double, (long double x
));
874 # if !@HAVE_DECL_FLOORL@
876 _GL_FUNCDECL_SYS (floorl
, long double, (long double x
));
878 _GL_CXXALIAS_SYS (floorl
, long double, (long double x
));
880 _GL_CXXALIASWARN (floorl
);
881 #elif defined GNULIB_POSIXCHECK
883 # if HAVE_RAW_DECL_FLOORL
884 _GL_WARN_ON_USE (floorl
, "floorl is unportable - "
885 "use gnulib module floorl for portability");
892 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
894 # define fmaf rpl_fmaf
896 _GL_FUNCDECL_RPL (fmaf
, float, (float x
, float y
, float z
));
897 _GL_CXXALIAS_RPL (fmaf
, float, (float x
, float y
, float z
));
900 _GL_FUNCDECL_SYS (fmaf
, float, (float x
, float y
, float z
));
902 _GL_CXXALIAS_SYS (fmaf
, float, (float x
, float y
, float z
));
904 _GL_CXXALIASWARN (fmaf
);
905 #elif defined GNULIB_POSIXCHECK
907 # if HAVE_RAW_DECL_FMAF
908 _GL_WARN_ON_USE (fmaf
, "fmaf is unportable - "
909 "use gnulib module fmaf for portability");
915 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
919 _GL_FUNCDECL_RPL (fma
, double, (double x
, double y
, double z
));
920 _GL_CXXALIAS_RPL (fma
, double, (double x
, double y
, double z
));
923 _GL_FUNCDECL_SYS (fma
, double, (double x
, double y
, double z
));
925 _GL_CXXALIAS_SYS (fma
, double, (double x
, double y
, double z
));
927 _GL_CXXALIASWARN (fma
);
928 #elif defined GNULIB_POSIXCHECK
930 # if HAVE_RAW_DECL_FMA
931 _GL_WARN_ON_USE (fma
, "fma is unportable - "
932 "use gnulib module fma for portability");
938 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
940 # define fmal rpl_fmal
942 _GL_FUNCDECL_RPL (fmal
, long double,
943 (long double x
, long double y
, long double z
));
944 _GL_CXXALIAS_RPL (fmal
, long double,
945 (long double x
, long double y
, long double z
));
949 _GL_FUNCDECL_SYS (fmal
, long double,
950 (long double x
, long double y
, long double z
));
952 _GL_CXXALIAS_SYS (fmal
, long double,
953 (long double x
, long double y
, long double z
));
955 _GL_CXXALIASWARN (fmal
);
956 #elif defined GNULIB_POSIXCHECK
958 # if HAVE_RAW_DECL_FMAL
959 _GL_WARN_ON_USE (fmal
, "fmal is unportable - "
960 "use gnulib module fmal for portability");
967 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
969 # define fmodf rpl_fmodf
971 _GL_FUNCDECL_RPL (fmodf
, float, (float x
, float y
));
972 _GL_CXXALIAS_RPL (fmodf
, float, (float x
, float y
));
976 _GL_FUNCDECL_SYS (fmodf
, float, (float x
, float y
));
978 _GL_CXXALIAS_SYS (fmodf
, float, (float x
, float y
));
980 _GL_CXXALIASWARN (fmodf
);
981 #elif defined GNULIB_POSIXCHECK
983 # if HAVE_RAW_DECL_FMODF
984 _GL_WARN_ON_USE (fmodf
, "fmodf is unportable - "
985 "use gnulib module fmodf for portability");
991 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
993 # define fmod rpl_fmod
995 _GL_FUNCDECL_RPL (fmod
, double, (double x
, double y
));
996 _GL_CXXALIAS_RPL (fmod
, double, (double x
, double y
));
998 _GL_CXXALIAS_SYS (fmod
, double, (double x
, double y
));
1000 _GL_CXXALIASWARN (fmod
);
1001 #elif defined GNULIB_POSIXCHECK
1003 # if HAVE_RAW_DECL_FMOD
1004 _GL_WARN_ON_USE (fmod
, "fmod has portability problems - "
1005 "use gnulib module fmod for portability");
1010 # if @REPLACE_FMODL@
1011 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1013 # define fmodl rpl_fmodl
1015 _GL_FUNCDECL_RPL (fmodl
, long double, (long double x
, long double y
));
1016 _GL_CXXALIAS_RPL (fmodl
, long double, (long double x
, long double y
));
1020 _GL_FUNCDECL_SYS (fmodl
, long double, (long double x
, long double y
));
1022 _GL_CXXALIAS_SYS (fmodl
, long double, (long double x
, long double y
));
1024 _GL_CXXALIASWARN (fmodl
);
1025 #elif defined GNULIB_POSIXCHECK
1027 # if HAVE_RAW_DECL_FMODL
1028 _GL_WARN_ON_USE (fmodl
, "fmodl is unportable - "
1029 "use gnulib module fmodl for portability");
1035 x = mantissa * 2^exp
1037 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1038 If x is zero: mantissa = x, exp = 0.
1039 If x is infinite or NaN: mantissa = x, exp unspecified.
1040 Store exp in *EXPPTR and return mantissa. */
1042 # if @REPLACE_FREXPF@
1043 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1045 # define frexpf rpl_frexpf
1047 _GL_FUNCDECL_RPL (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1048 _GL_CXXALIAS_RPL (frexpf
, float, (float x
, int *expptr
));
1052 _GL_FUNCDECL_SYS (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1054 _GL_CXXALIAS_SYS (frexpf
, float, (float x
, int *expptr
));
1056 _GL_CXXALIASWARN (frexpf
);
1057 #elif defined GNULIB_POSIXCHECK
1059 # if HAVE_RAW_DECL_FREXPF
1060 _GL_WARN_ON_USE (frexpf
, "frexpf is unportable - "
1061 "use gnulib module frexpf for portability");
1066 x = mantissa * 2^exp
1068 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1069 If x is zero: mantissa = x, exp = 0.
1070 If x is infinite or NaN: mantissa = x, exp unspecified.
1071 Store exp in *EXPPTR and return mantissa. */
1073 # if @REPLACE_FREXP@
1074 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1076 # define frexp rpl_frexp
1078 _GL_FUNCDECL_RPL (frexp
, double, (double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1079 _GL_CXXALIAS_RPL (frexp
, double, (double x
, int *expptr
));
1081 _GL_CXXALIAS_SYS (frexp
, double, (double x
, int *expptr
));
1083 _GL_CXXALIASWARN1 (frexp
, double, (double x
, int *expptr
));
1084 #elif defined GNULIB_POSIXCHECK
1086 /* Assume frexp is always declared. */
1087 _GL_WARN_ON_USE (frexp
, "frexp is unportable - "
1088 "use gnulib module frexp for portability");
1092 x = mantissa * 2^exp
1094 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1095 If x is zero: mantissa = x, exp = 0.
1096 If x is infinite or NaN: mantissa = x, exp unspecified.
1097 Store exp in *EXPPTR and return mantissa. */
1098 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
1099 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1101 # define frexpl rpl_frexpl
1103 _GL_FUNCDECL_RPL (frexpl
, long double,
1104 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1105 _GL_CXXALIAS_RPL (frexpl
, long double, (long double x
, int *expptr
));
1107 # if !@HAVE_DECL_FREXPL@
1108 _GL_FUNCDECL_SYS (frexpl
, long double,
1109 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1111 # if @GNULIB_FREXPL@
1112 _GL_CXXALIAS_SYS (frexpl
, long double, (long double x
, int *expptr
));
1115 #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
1116 _GL_CXXALIASWARN (frexpl
);
1118 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
1120 # if HAVE_RAW_DECL_FREXPL
1121 _GL_WARN_ON_USE (frexpl
, "frexpl is unportable - "
1122 "use gnulib module frexpl for portability");
1127 /* Return sqrt(x^2+y^2). */
1129 # if @REPLACE_HYPOTF@
1130 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1132 # define hypotf rpl_hypotf
1134 _GL_FUNCDECL_RPL (hypotf
, float, (float x
, float y
));
1135 _GL_CXXALIAS_RPL (hypotf
, float, (float x
, float y
));
1138 _GL_FUNCDECL_SYS (hypotf
, float, (float x
, float y
));
1140 _GL_CXXALIAS_SYS (hypotf
, float, (float x
, float y
));
1142 _GL_CXXALIASWARN (hypotf
);
1143 #elif defined GNULIB_POSIXCHECK
1145 # if HAVE_RAW_DECL_HYPOTF
1146 _GL_WARN_ON_USE (hypotf
, "hypotf is unportable - "
1147 "use gnulib module hypotf for portability");
1151 /* Return sqrt(x^2+y^2). */
1153 # if @REPLACE_HYPOT@
1154 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1156 # define hypot rpl_hypot
1158 _GL_FUNCDECL_RPL (hypot
, double, (double x
, double y
));
1159 _GL_CXXALIAS_RPL (hypot
, double, (double x
, double y
));
1161 _GL_CXXALIAS_SYS (hypot
, double, (double x
, double y
));
1163 _GL_CXXALIASWARN (hypot
);
1164 #elif defined GNULIB_POSIXCHECK
1166 # if HAVE_RAW_DECL_HYPOT
1167 _GL_WARN_ON_USE (hypotf
, "hypot has portability problems - "
1168 "use gnulib module hypot for portability");
1172 /* Return sqrt(x^2+y^2). */
1174 # if @REPLACE_HYPOTL@
1175 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1177 # define hypotl rpl_hypotl
1179 _GL_FUNCDECL_RPL (hypotl
, long double, (long double x
, long double y
));
1180 _GL_CXXALIAS_RPL (hypotl
, long double, (long double x
, long double y
));
1183 _GL_FUNCDECL_SYS (hypotl
, long double, (long double x
, long double y
));
1185 _GL_CXXALIAS_SYS (hypotl
, long double, (long double x
, long double y
));
1187 _GL_CXXALIASWARN (hypotl
);
1188 #elif defined GNULIB_POSIXCHECK
1190 # if HAVE_RAW_DECL_HYPOTL
1191 _GL_WARN_ON_USE (hypotl
, "hypotl is unportable - "
1192 "use gnulib module hypotl for portability");
1198 # if @REPLACE_ILOGBF@
1199 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1201 # define ilogbf rpl_ilogbf
1203 _GL_FUNCDECL_RPL (ilogbf
, int, (float x
));
1204 _GL_CXXALIAS_RPL (ilogbf
, int, (float x
));
1207 _GL_FUNCDECL_SYS (ilogbf
, int, (float x
));
1209 _GL_CXXALIAS_SYS (ilogbf
, int, (float x
));
1211 _GL_CXXALIASWARN (ilogbf
);
1212 #elif defined GNULIB_POSIXCHECK
1214 # if HAVE_RAW_DECL_ILOGBF
1215 _GL_WARN_ON_USE (ilogbf
, "ilogbf is unportable - "
1216 "use gnulib module ilogbf for portability");
1221 # if @REPLACE_ILOGB@
1222 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1224 # define ilogb rpl_ilogb
1226 _GL_FUNCDECL_RPL (ilogb
, int, (double x
));
1227 _GL_CXXALIAS_RPL (ilogb
, int, (double x
));
1230 _GL_FUNCDECL_SYS (ilogb
, int, (double x
));
1232 _GL_CXXALIAS_SYS (ilogb
, int, (double x
));
1234 _GL_CXXALIASWARN (ilogb
);
1235 #elif defined GNULIB_POSIXCHECK
1237 # if HAVE_RAW_DECL_ILOGB
1238 _GL_WARN_ON_USE (ilogb
, "ilogb is unportable - "
1239 "use gnulib module ilogb for portability");
1244 # if @REPLACE_ILOGBL@
1245 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1247 # define ilogbl rpl_ilogbl
1249 _GL_FUNCDECL_RPL (ilogbl
, int, (long double x
));
1250 _GL_CXXALIAS_RPL (ilogbl
, int, (long double x
));
1253 _GL_FUNCDECL_SYS (ilogbl
, int, (long double x
));
1255 _GL_CXXALIAS_SYS (ilogbl
, int, (long double x
));
1257 _GL_CXXALIASWARN (ilogbl
);
1258 #elif defined GNULIB_POSIXCHECK
1260 # if HAVE_RAW_DECL_ILOGBL
1261 _GL_WARN_ON_USE (ilogbl
, "ilogbl is unportable - "
1262 "use gnulib module ilogbl for portability");
1267 /* Return x * 2^exp. */
1271 _GL_FUNCDECL_SYS (ldexpf
, float, (float x
, int exp
));
1273 _GL_CXXALIAS_SYS (ldexpf
, float, (float x
, int exp
));
1274 _GL_CXXALIASWARN (ldexpf
);
1275 #elif defined GNULIB_POSIXCHECK
1277 # if HAVE_RAW_DECL_LDEXPF
1278 _GL_WARN_ON_USE (ldexpf
, "ldexpf is unportable - "
1279 "use gnulib module ldexpf for portability");
1283 /* Return x * 2^exp. */
1284 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
1285 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1287 # define ldexpl rpl_ldexpl
1289 _GL_FUNCDECL_RPL (ldexpl
, long double, (long double x
, int exp
));
1290 _GL_CXXALIAS_RPL (ldexpl
, long double, (long double x
, int exp
));
1292 # if !@HAVE_DECL_LDEXPL@
1293 _GL_FUNCDECL_SYS (ldexpl
, long double, (long double x
, int exp
));
1295 # if @GNULIB_LDEXPL@
1296 _GL_CXXALIAS_SYS (ldexpl
, long double, (long double x
, int exp
));
1300 _GL_CXXALIASWARN (ldexpl
);
1302 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
1304 # if HAVE_RAW_DECL_LDEXPL
1305 _GL_WARN_ON_USE (ldexpl
, "ldexpl is unportable - "
1306 "use gnulib module ldexpl for portability");
1313 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1315 # define logf rpl_logf
1317 _GL_FUNCDECL_RPL (logf
, float, (float x
));
1318 _GL_CXXALIAS_RPL (logf
, float, (float x
));
1322 _GL_FUNCDECL_SYS (logf
, float, (float x
));
1324 _GL_CXXALIAS_SYS (logf
, float, (float x
));
1326 _GL_CXXALIASWARN (logf
);
1327 #elif defined GNULIB_POSIXCHECK
1329 # if HAVE_RAW_DECL_LOGF
1330 _GL_WARN_ON_USE (logf
, "logf is unportable - "
1331 "use gnulib module logf for portability");
1337 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1339 # define log rpl_log
1341 _GL_FUNCDECL_RPL (log
, double, (double x
));
1342 _GL_CXXALIAS_RPL (log
, double, (double x
));
1344 _GL_CXXALIAS_SYS (log
, double, (double x
));
1346 _GL_CXXALIASWARN (log
);
1347 #elif defined GNULIB_POSIXCHECK
1349 # if HAVE_RAW_DECL_LOG
1350 _GL_WARN_ON_USE (log
, "log has portability problems - "
1351 "use gnulib module log for portability");
1357 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1359 # define logl rpl_logl
1361 _GL_FUNCDECL_RPL (logl
, long double, (long double x
));
1362 _GL_CXXALIAS_RPL (logl
, long double, (long double x
));
1364 # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
1366 _GL_FUNCDECL_SYS (logl
, long double, (long double x
));
1368 _GL_CXXALIAS_SYS (logl
, long double, (long double x
));
1370 _GL_CXXALIASWARN (logl
);
1371 #elif defined GNULIB_POSIXCHECK
1373 # if HAVE_RAW_DECL_LOGL
1374 _GL_WARN_ON_USE (logl
, "logl is unportable - "
1375 "use gnulib module logl for portability");
1381 # if @REPLACE_LOG10F@
1382 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1384 # define log10f rpl_log10f
1386 _GL_FUNCDECL_RPL (log10f
, float, (float x
));
1387 _GL_CXXALIAS_RPL (log10f
, float, (float x
));
1391 _GL_FUNCDECL_SYS (log10f
, float, (float x
));
1393 _GL_CXXALIAS_SYS (log10f
, float, (float x
));
1395 _GL_CXXALIASWARN (log10f
);
1396 #elif defined GNULIB_POSIXCHECK
1398 # if HAVE_RAW_DECL_LOG10F
1399 _GL_WARN_ON_USE (log10f
, "log10f is unportable - "
1400 "use gnulib module log10f for portability");
1405 # if @REPLACE_LOG10@
1406 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1408 # define log10 rpl_log10
1410 _GL_FUNCDECL_RPL (log10
, double, (double x
));
1411 _GL_CXXALIAS_RPL (log10
, double, (double x
));
1413 _GL_CXXALIAS_SYS (log10
, double, (double x
));
1415 _GL_CXXALIASWARN (log10
);
1416 #elif defined GNULIB_POSIXCHECK
1418 # if HAVE_RAW_DECL_LOG10
1419 _GL_WARN_ON_USE (log10
, "log10 has portability problems - "
1420 "use gnulib module log10 for portability");
1425 # if @REPLACE_LOG10L@
1426 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1428 # define log10l rpl_log10l
1430 _GL_FUNCDECL_RPL (log10l
, long double, (long double x
));
1431 _GL_CXXALIAS_RPL (log10l
, long double, (long double x
));
1433 # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
1435 _GL_FUNCDECL_SYS (log10l
, long double, (long double x
));
1437 _GL_CXXALIAS_SYS (log10l
, long double, (long double x
));
1439 _GL_CXXALIASWARN (log10l
);
1440 #elif defined GNULIB_POSIXCHECK
1442 # if HAVE_RAW_DECL_LOG10L
1443 _GL_WARN_ON_USE (log10l
, "log10l is unportable - "
1444 "use gnulib module log10l for portability");
1450 # if @REPLACE_LOG1PF@
1451 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1453 # define log1pf rpl_log1pf
1455 _GL_FUNCDECL_RPL (log1pf
, float, (float x
));
1456 _GL_CXXALIAS_RPL (log1pf
, float, (float x
));
1459 _GL_FUNCDECL_SYS (log1pf
, float, (float x
));
1461 _GL_CXXALIAS_SYS (log1pf
, float, (float x
));
1463 _GL_CXXALIASWARN (log1pf
);
1464 #elif defined GNULIB_POSIXCHECK
1466 # if HAVE_RAW_DECL_LOG1PF
1467 _GL_WARN_ON_USE (log1pf
, "log1pf is unportable - "
1468 "use gnulib module log1pf for portability");
1473 # if @REPLACE_LOG1P@
1474 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1476 # define log1p rpl_log1p
1478 _GL_FUNCDECL_RPL (log1p
, double, (double x
));
1479 _GL_CXXALIAS_RPL (log1p
, double, (double x
));
1482 _GL_FUNCDECL_SYS (log1p
, double, (double x
));
1484 _GL_CXXALIAS_SYS (log1p
, double, (double x
));
1486 _GL_CXXALIASWARN (log1p
);
1487 #elif defined GNULIB_POSIXCHECK
1489 # if HAVE_RAW_DECL_LOG1P
1490 _GL_WARN_ON_USE (log1p
, "log1p has portability problems - "
1491 "use gnulib module log1p for portability");
1496 # if @REPLACE_LOG1PL@
1497 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1499 # define log1pl rpl_log1pl
1501 _GL_FUNCDECL_RPL (log1pl
, long double, (long double x
));
1502 _GL_CXXALIAS_RPL (log1pl
, long double, (long double x
));
1505 _GL_FUNCDECL_SYS (log1pl
, long double, (long double x
));
1507 _GL_CXXALIAS_SYS (log1pl
, long double, (long double x
));
1509 _GL_CXXALIASWARN (log1pl
);
1510 #elif defined GNULIB_POSIXCHECK
1512 # if HAVE_RAW_DECL_LOG1PL
1513 _GL_WARN_ON_USE (log1pl
, "log1pl has portability problems - "
1514 "use gnulib module log1pl for portability");
1520 # if @REPLACE_LOG2F@
1521 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1523 # define log2f rpl_log2f
1525 _GL_FUNCDECL_RPL (log2f
, float, (float x
));
1526 _GL_CXXALIAS_RPL (log2f
, float, (float x
));
1528 # if !@HAVE_DECL_LOG2F@
1530 _GL_FUNCDECL_SYS (log2f
, float, (float x
));
1532 _GL_CXXALIAS_SYS (log2f
, float, (float x
));
1534 _GL_CXXALIASWARN (log2f
);
1535 #elif defined GNULIB_POSIXCHECK
1537 # if HAVE_RAW_DECL_LOG2F
1538 _GL_WARN_ON_USE (log2f
, "log2f is unportable - "
1539 "use gnulib module log2f for portability");
1545 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1547 # define log2 rpl_log2
1549 _GL_FUNCDECL_RPL (log2
, double, (double x
));
1550 _GL_CXXALIAS_RPL (log2
, double, (double x
));
1552 # if !@HAVE_DECL_LOG2@
1554 _GL_FUNCDECL_SYS (log2
, double, (double x
));
1556 _GL_CXXALIAS_SYS (log2
, double, (double x
));
1558 _GL_CXXALIASWARN (log2
);
1559 #elif defined GNULIB_POSIXCHECK
1561 # if HAVE_RAW_DECL_LOG2
1562 _GL_WARN_ON_USE (log2
, "log2 is unportable - "
1563 "use gnulib module log2 for portability");
1568 # if @REPLACE_LOG2L@
1569 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1571 # define log2l rpl_log2l
1573 _GL_FUNCDECL_RPL (log2l
, long double, (long double x
));
1574 _GL_CXXALIAS_RPL (log2l
, long double, (long double x
));
1576 # if !@HAVE_DECL_LOG2L@
1577 _GL_FUNCDECL_SYS (log2l
, long double, (long double x
));
1579 _GL_CXXALIAS_SYS (log2l
, long double, (long double x
));
1581 _GL_CXXALIASWARN (log2l
);
1582 #elif defined GNULIB_POSIXCHECK
1584 # if HAVE_RAW_DECL_LOG2L
1585 _GL_WARN_ON_USE (log2l
, "log2l is unportable - "
1586 "use gnulib module log2l for portability");
1592 # if @REPLACE_LOGBF@
1593 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1595 # define logbf rpl_logbf
1597 _GL_FUNCDECL_RPL (logbf
, float, (float x
));
1598 _GL_CXXALIAS_RPL (logbf
, float, (float x
));
1601 _GL_FUNCDECL_SYS (logbf
, float, (float x
));
1603 _GL_CXXALIAS_SYS (logbf
, float, (float x
));
1605 _GL_CXXALIASWARN (logbf
);
1606 #elif defined GNULIB_POSIXCHECK
1608 # if HAVE_RAW_DECL_LOGBF
1609 _GL_WARN_ON_USE (logbf
, "logbf is unportable - "
1610 "use gnulib module logbf for portability");
1616 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1618 # define logb rpl_logb
1620 _GL_FUNCDECL_RPL (logb
, double, (double x
));
1621 _GL_CXXALIAS_RPL (logb
, double, (double x
));
1623 # if !@HAVE_DECL_LOGB@
1624 _GL_FUNCDECL_SYS (logb
, double, (double x
));
1626 _GL_CXXALIAS_SYS (logb
, double, (double x
));
1628 _GL_CXXALIASWARN (logb
);
1629 #elif defined GNULIB_POSIXCHECK
1631 # if HAVE_RAW_DECL_LOGB
1632 _GL_WARN_ON_USE (logb
, "logb is unportable - "
1633 "use gnulib module logb for portability");
1638 # if @REPLACE_LOGBL@
1639 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1641 # define logbl rpl_logbl
1643 _GL_FUNCDECL_RPL (logbl
, long double, (long double x
));
1644 _GL_CXXALIAS_RPL (logbl
, long double, (long double x
));
1647 _GL_FUNCDECL_SYS (logbl
, long double, (long double x
));
1649 _GL_CXXALIAS_SYS (logbl
, long double, (long double x
));
1651 _GL_CXXALIASWARN (logbl
);
1652 #elif defined GNULIB_POSIXCHECK
1654 # if HAVE_RAW_DECL_LOGBL
1655 _GL_WARN_ON_USE (logbl
, "logbl is unportable - "
1656 "use gnulib module logbl for portability");
1662 # if @REPLACE_MODFF@
1663 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1665 # define modff rpl_modff
1667 _GL_FUNCDECL_RPL (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1668 _GL_CXXALIAS_RPL (modff
, float, (float x
, float *iptr
));
1672 _GL_FUNCDECL_SYS (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1674 _GL_CXXALIAS_SYS (modff
, float, (float x
, float *iptr
));
1676 _GL_CXXALIASWARN (modff
);
1677 #elif defined GNULIB_POSIXCHECK
1679 # if HAVE_RAW_DECL_MODFF
1680 _GL_WARN_ON_USE (modff
, "modff is unportable - "
1681 "use gnulib module modff for portability");
1687 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1689 # define modf rpl_modf
1691 _GL_FUNCDECL_RPL (modf
, double, (double x
, double *iptr
) _GL_ARG_NONNULL ((2)));
1692 _GL_CXXALIAS_RPL (modf
, double, (double x
, double *iptr
));
1694 _GL_CXXALIAS_SYS (modf
, double, (double x
, double *iptr
));
1696 _GL_CXXALIASWARN (modf
);
1697 #elif defined GNULIB_POSIXCHECK
1699 # if HAVE_RAW_DECL_MODF
1700 _GL_WARN_ON_USE (modf
, "modf has portability problems - "
1701 "use gnulib module modf for portability");
1706 # if @REPLACE_MODFL@
1707 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1709 # define modfl rpl_modfl
1711 _GL_FUNCDECL_RPL (modfl
, long double, (long double x
, long double *iptr
)
1712 _GL_ARG_NONNULL ((2)));
1713 _GL_CXXALIAS_RPL (modfl
, long double, (long double x
, long double *iptr
));
1717 _GL_FUNCDECL_SYS (modfl
, long double, (long double x
, long double *iptr
)
1718 _GL_ARG_NONNULL ((2)));
1720 _GL_CXXALIAS_SYS (modfl
, long double, (long double x
, long double *iptr
));
1722 _GL_CXXALIASWARN (modfl
);
1723 #elif defined GNULIB_POSIXCHECK
1725 # if HAVE_RAW_DECL_MODFL
1726 _GL_WARN_ON_USE (modfl
, "modfl is unportable - "
1727 "use gnulib module modfl for portability");
1735 _GL_FUNCDECL_SYS (powf
, float, (float x
, float y
));
1737 _GL_CXXALIAS_SYS (powf
, float, (float x
, float y
));
1738 _GL_CXXALIASWARN (powf
);
1739 #elif defined GNULIB_POSIXCHECK
1741 # if HAVE_RAW_DECL_POWF
1742 _GL_WARN_ON_USE (powf
, "powf is unportable - "
1743 "use gnulib module powf for portability");
1748 #if @GNULIB_REMAINDERF@
1749 # if @REPLACE_REMAINDERF@
1750 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1752 # define remainderf rpl_remainderf
1754 _GL_FUNCDECL_RPL (remainderf
, float, (float x
, float y
));
1755 _GL_CXXALIAS_RPL (remainderf
, float, (float x
, float y
));
1757 # if !@HAVE_REMAINDERF@
1758 _GL_FUNCDECL_SYS (remainderf
, float, (float x
, float y
));
1760 _GL_CXXALIAS_SYS (remainderf
, float, (float x
, float y
));
1762 _GL_CXXALIASWARN (remainderf
);
1763 #elif defined GNULIB_POSIXCHECK
1765 # if HAVE_RAW_DECL_REMAINDERF
1766 _GL_WARN_ON_USE (remainderf
, "remainderf is unportable - "
1767 "use gnulib module remainderf for portability");
1771 #if @GNULIB_REMAINDER@
1772 # if @REPLACE_REMAINDER@
1773 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1775 # define remainder rpl_remainder
1777 _GL_FUNCDECL_RPL (remainder
, double, (double x
, double y
));
1778 _GL_CXXALIAS_RPL (remainder
, double, (double x
, double y
));
1780 # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
1781 _GL_FUNCDECL_SYS (remainder
, double, (double x
, double y
));
1783 _GL_CXXALIAS_SYS (remainder
, double, (double x
, double y
));
1785 _GL_CXXALIASWARN (remainder
);
1786 #elif defined GNULIB_POSIXCHECK
1788 # if HAVE_RAW_DECL_REMAINDER
1789 _GL_WARN_ON_USE (remainder
, "remainder is unportable - "
1790 "use gnulib module remainder for portability");
1794 #if @GNULIB_REMAINDERL@
1795 # if @REPLACE_REMAINDERL@
1796 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1798 # define remainderl rpl_remainderl
1800 _GL_FUNCDECL_RPL (remainderl
, long double, (long double x
, long double y
));
1801 _GL_CXXALIAS_RPL (remainderl
, long double, (long double x
, long double y
));
1803 # if !@HAVE_DECL_REMAINDERL@
1805 _GL_FUNCDECL_SYS (remainderl
, long double, (long double x
, long double y
));
1807 _GL_CXXALIAS_SYS (remainderl
, long double, (long double x
, long double y
));
1809 _GL_CXXALIASWARN (remainderl
);
1810 #elif defined GNULIB_POSIXCHECK
1812 # if HAVE_RAW_DECL_REMAINDERL
1813 _GL_WARN_ON_USE (remainderl
, "remainderl is unportable - "
1814 "use gnulib module remainderl for portability");
1820 # if !@HAVE_DECL_RINTF@
1821 _GL_FUNCDECL_SYS (rintf
, float, (float x
));
1823 _GL_CXXALIAS_SYS (rintf
, float, (float x
));
1824 _GL_CXXALIASWARN (rintf
);
1825 #elif defined GNULIB_POSIXCHECK
1827 # if HAVE_RAW_DECL_RINTF
1828 _GL_WARN_ON_USE (rintf
, "rintf is unportable - "
1829 "use gnulib module rintf for portability");
1835 _GL_FUNCDECL_SYS (rint
, double, (double x
));
1837 _GL_CXXALIAS_SYS (rint
, double, (double x
));
1838 _GL_CXXALIASWARN (rint
);
1839 #elif defined GNULIB_POSIXCHECK
1841 # if HAVE_RAW_DECL_RINT
1842 _GL_WARN_ON_USE (rint
, "rint is unportable - "
1843 "use gnulib module rint for portability");
1848 # if @REPLACE_RINTL@
1849 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1851 # define rintl rpl_rintl
1853 _GL_FUNCDECL_RPL (rintl
, long double, (long double x
));
1854 _GL_CXXALIAS_RPL (rintl
, long double, (long double x
));
1857 _GL_FUNCDECL_SYS (rintl
, long double, (long double x
));
1859 _GL_CXXALIAS_SYS (rintl
, long double, (long double x
));
1861 _GL_CXXALIASWARN (rintl
);
1862 #elif defined GNULIB_POSIXCHECK
1864 # if HAVE_RAW_DECL_RINTL
1865 _GL_WARN_ON_USE (rintl
, "rintl is unportable - "
1866 "use gnulib module rintl for portability");
1872 # if @REPLACE_ROUNDF@
1873 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1875 # define roundf rpl_roundf
1877 _GL_FUNCDECL_RPL (roundf
, float, (float x
));
1878 _GL_CXXALIAS_RPL (roundf
, float, (float x
));
1880 # if !@HAVE_DECL_ROUNDF@
1881 _GL_FUNCDECL_SYS (roundf
, float, (float x
));
1883 _GL_CXXALIAS_SYS (roundf
, float, (float x
));
1885 _GL_CXXALIASWARN (roundf
);
1886 #elif defined GNULIB_POSIXCHECK
1888 # if HAVE_RAW_DECL_ROUNDF
1889 _GL_WARN_ON_USE (roundf
, "roundf is unportable - "
1890 "use gnulib module roundf for portability");
1895 # if @REPLACE_ROUND@
1896 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1898 # define round rpl_round
1900 _GL_FUNCDECL_RPL (round
, double, (double x
));
1901 _GL_CXXALIAS_RPL (round
, double, (double x
));
1903 # if !@HAVE_DECL_ROUND@
1904 _GL_FUNCDECL_SYS (round
, double, (double x
));
1906 _GL_CXXALIAS_SYS (round
, double, (double x
));
1908 _GL_CXXALIASWARN (round
);
1909 #elif defined GNULIB_POSIXCHECK
1911 # if HAVE_RAW_DECL_ROUND
1912 _GL_WARN_ON_USE (round
, "round is unportable - "
1913 "use gnulib module round for portability");
1918 # if @REPLACE_ROUNDL@
1919 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1921 # define roundl rpl_roundl
1923 _GL_FUNCDECL_RPL (roundl
, long double, (long double x
));
1924 _GL_CXXALIAS_RPL (roundl
, long double, (long double x
));
1926 # if !@HAVE_DECL_ROUNDL@
1928 _GL_FUNCDECL_SYS (roundl
, long double, (long double x
));
1930 _GL_CXXALIAS_SYS (roundl
, long double, (long double x
));
1932 _GL_CXXALIASWARN (roundl
);
1933 #elif defined GNULIB_POSIXCHECK
1935 # if HAVE_RAW_DECL_ROUNDL
1936 _GL_WARN_ON_USE (roundl
, "roundl is unportable - "
1937 "use gnulib module roundl for portability");
1944 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1946 # define sinf rpl_sinf
1948 _GL_FUNCDECL_RPL (sinf
, float, (float x
));
1949 _GL_CXXALIAS_RPL (sinf
, float, (float x
));
1953 _GL_FUNCDECL_SYS (sinf
, float, (float x
));
1955 _GL_CXXALIAS_SYS (sinf
, float, (float x
));
1957 _GL_CXXALIASWARN (sinf
);
1958 #elif defined GNULIB_POSIXCHECK
1960 # if HAVE_RAW_DECL_SINF
1961 _GL_WARN_ON_USE (sinf
, "sinf is unportable - "
1962 "use gnulib module sinf for portability");
1967 # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
1969 _GL_FUNCDECL_SYS (sinl
, long double, (long double x
));
1971 _GL_CXXALIAS_SYS (sinl
, long double, (long double x
));
1972 _GL_CXXALIASWARN (sinl
);
1973 #elif defined GNULIB_POSIXCHECK
1975 # if HAVE_RAW_DECL_SINL
1976 _GL_WARN_ON_USE (sinl
, "sinl is unportable - "
1977 "use gnulib module sinl for portability");
1983 # if @REPLACE_SINHF@
1984 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1986 # define sinhf rpl_sinhf
1988 _GL_FUNCDECL_RPL (sinhf
, float, (float x
));
1989 _GL_CXXALIAS_RPL (sinhf
, float, (float x
));
1993 _GL_FUNCDECL_SYS (sinhf
, float, (float x
));
1995 _GL_CXXALIAS_SYS (sinhf
, float, (float x
));
1997 _GL_CXXALIASWARN (sinhf
);
1998 #elif defined GNULIB_POSIXCHECK
2000 # if HAVE_RAW_DECL_SINHF
2001 _GL_WARN_ON_USE (sinhf
, "sinhf is unportable - "
2002 "use gnulib module sinhf for portability");
2008 # if @REPLACE_SQRTF@
2009 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2011 # define sqrtf rpl_sqrtf
2013 _GL_FUNCDECL_RPL (sqrtf
, float, (float x
));
2014 _GL_CXXALIAS_RPL (sqrtf
, float, (float x
));
2018 _GL_FUNCDECL_SYS (sqrtf
, float, (float x
));
2020 _GL_CXXALIAS_SYS (sqrtf
, float, (float x
));
2022 _GL_CXXALIASWARN (sqrtf
);
2023 #elif defined GNULIB_POSIXCHECK
2025 # if HAVE_RAW_DECL_SQRTF
2026 _GL_WARN_ON_USE (sqrtf
, "sqrtf is unportable - "
2027 "use gnulib module sqrtf for portability");
2032 # if @REPLACE_SQRTL@
2033 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2035 # define sqrtl rpl_sqrtl
2037 _GL_FUNCDECL_RPL (sqrtl
, long double, (long double x
));
2038 _GL_CXXALIAS_RPL (sqrtl
, long double, (long double x
));
2040 # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
2042 _GL_FUNCDECL_SYS (sqrtl
, long double, (long double x
));
2044 _GL_CXXALIAS_SYS (sqrtl
, long double, (long double x
));
2046 _GL_CXXALIASWARN (sqrtl
);
2047 #elif defined GNULIB_POSIXCHECK
2049 # if HAVE_RAW_DECL_SQRTL
2050 _GL_WARN_ON_USE (sqrtl
, "sqrtl is unportable - "
2051 "use gnulib module sqrtl for portability");
2058 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2060 # define tanf rpl_tanf
2062 _GL_FUNCDECL_RPL (tanf
, float, (float x
));
2063 _GL_CXXALIAS_RPL (tanf
, float, (float x
));
2067 _GL_FUNCDECL_SYS (tanf
, float, (float x
));
2069 _GL_CXXALIAS_SYS (tanf
, float, (float x
));
2071 _GL_CXXALIASWARN (tanf
);
2072 #elif defined GNULIB_POSIXCHECK
2074 # if HAVE_RAW_DECL_TANF
2075 _GL_WARN_ON_USE (tanf
, "tanf is unportable - "
2076 "use gnulib module tanf for portability");
2081 # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
2083 _GL_FUNCDECL_SYS (tanl
, long double, (long double x
));
2085 _GL_CXXALIAS_SYS (tanl
, long double, (long double x
));
2086 _GL_CXXALIASWARN (tanl
);
2087 #elif defined GNULIB_POSIXCHECK
2089 # if HAVE_RAW_DECL_TANL
2090 _GL_WARN_ON_USE (tanl
, "tanl is unportable - "
2091 "use gnulib module tanl for portability");
2097 # if @REPLACE_TANHF@
2098 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2100 # define tanhf rpl_tanhf
2102 _GL_FUNCDECL_RPL (tanhf
, float, (float x
));
2103 _GL_CXXALIAS_RPL (tanhf
, float, (float x
));
2107 _GL_FUNCDECL_SYS (tanhf
, float, (float x
));
2109 _GL_CXXALIAS_SYS (tanhf
, float, (float x
));
2111 _GL_CXXALIASWARN (tanhf
);
2112 #elif defined GNULIB_POSIXCHECK
2114 # if HAVE_RAW_DECL_TANHF
2115 _GL_WARN_ON_USE (tanhf
, "tanhf is unportable - "
2116 "use gnulib module tanhf for portability");
2122 # if @REPLACE_TRUNCF@
2123 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2125 # define truncf rpl_truncf
2127 _GL_FUNCDECL_RPL (truncf
, float, (float x
));
2128 _GL_CXXALIAS_RPL (truncf
, float, (float x
));
2130 # if !@HAVE_DECL_TRUNCF@
2131 _GL_FUNCDECL_SYS (truncf
, float, (float x
));
2133 _GL_CXXALIAS_SYS (truncf
, float, (float x
));
2135 _GL_CXXALIASWARN (truncf
);
2136 #elif defined GNULIB_POSIXCHECK
2138 # if HAVE_RAW_DECL_TRUNCF
2139 _GL_WARN_ON_USE (truncf
, "truncf is unportable - "
2140 "use gnulib module truncf for portability");
2145 # if @REPLACE_TRUNC@
2146 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2148 # define trunc rpl_trunc
2150 _GL_FUNCDECL_RPL (trunc
, double, (double x
));
2151 _GL_CXXALIAS_RPL (trunc
, double, (double x
));
2153 # if !@HAVE_DECL_TRUNC@
2154 _GL_FUNCDECL_SYS (trunc
, double, (double x
));
2156 _GL_CXXALIAS_SYS (trunc
, double, (double x
));
2158 _GL_CXXALIASWARN (trunc
);
2159 #elif defined GNULIB_POSIXCHECK
2161 # if HAVE_RAW_DECL_TRUNC
2162 _GL_WARN_ON_USE (trunc
, "trunc is unportable - "
2163 "use gnulib module trunc for portability");
2168 # if @REPLACE_TRUNCL@
2169 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2171 # define truncl rpl_truncl
2173 _GL_FUNCDECL_RPL (truncl
, long double, (long double x
));
2174 _GL_CXXALIAS_RPL (truncl
, long double, (long double x
));
2176 # if !@HAVE_DECL_TRUNCL@
2177 _GL_FUNCDECL_SYS (truncl
, long double, (long double x
));
2179 _GL_CXXALIAS_SYS (truncl
, long double, (long double x
));
2181 _GL_CXXALIASWARN (truncl
);
2182 #elif defined GNULIB_POSIXCHECK
2184 # if HAVE_RAW_DECL_TRUNCL
2185 _GL_WARN_ON_USE (truncl
, "truncl is unportable - "
2186 "use gnulib module truncl for portability");
2191 /* Definitions of function-like macros come here, after the function
2195 #if @GNULIB_ISFINITE@
2196 # if @REPLACE_ISFINITE@
2197 _GL_EXTERN_C
int gl_isfinitef (float x
);
2198 _GL_EXTERN_C
int gl_isfinited (double x
);
2199 _GL_EXTERN_C
int gl_isfinitel (long double x
);
2201 # define isfinite(x) \
2202 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
2203 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
2207 # if defined isfinite || defined GNULIB_NAMESPACE
2208 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite
)
2210 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
)
2213 #elif defined GNULIB_POSIXCHECK
2214 # if defined isfinite
2215 _GL_WARN_REAL_FLOATING_DECL (isfinite
);
2217 # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
2223 # if @REPLACE_ISINF@
2224 _GL_EXTERN_C
int gl_isinff (float x
);
2225 _GL_EXTERN_C
int gl_isinfd (double x
);
2226 _GL_EXTERN_C
int gl_isinfl (long double x
);
2229 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
2230 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
2234 # if defined isinf || defined GNULIB_NAMESPACE
2235 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf
)
2237 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
)
2240 #elif defined GNULIB_POSIXCHECK
2242 _GL_WARN_REAL_FLOATING_DECL (isinf
);
2244 # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
2250 /* Test for NaN for 'float' numbers. */
2252 /* The original <math.h> included above provides a declaration of isnan macro
2253 or (older) isnanf function. */
2255 /* GCC 4.0 and newer provides three built-ins for isnan. */
2257 # define isnanf(x) __builtin_isnanf ((float)(x))
2258 # elif defined isnan
2260 # define isnanf(x) isnan ((float)(x))
2263 /* Test whether X is a NaN. */
2265 # define isnanf rpl_isnanf
2266 _GL_EXTERN_C
int isnanf (float x
);
2271 /* Test for NaN for 'double' numbers.
2272 This function is a gnulib extension, unlike isnan() which applied only
2273 to 'double' numbers earlier but now is a type-generic macro. */
2275 /* The original <math.h> included above provides a declaration of isnan
2278 /* GCC 4.0 and newer provides three built-ins for isnan. */
2280 # define isnand(x) __builtin_isnan ((double)(x))
2283 # define isnand(x) isnan ((double)(x))
2286 /* Test whether X is a NaN. */
2288 # define isnand rpl_isnand
2289 _GL_EXTERN_C
int isnand (double x
);
2294 /* Test for NaN for 'long double' numbers. */
2296 /* The original <math.h> included above provides a declaration of isnan
2297 macro or (older) isnanl function. */
2299 /* GCC 4.0 and newer provides three built-ins for isnan. */
2301 # define isnanl(x) __builtin_isnanl ((long double)(x))
2302 # elif defined isnan
2304 # define isnanl(x) isnan ((long double)(x))
2307 /* Test whether X is a NaN. */
2309 # define isnanl rpl_isnanl
2310 _GL_EXTERN_C
int isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2314 /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
2316 # if @REPLACE_ISNAN@
2317 /* We can't just use the isnanf macro (e.g.) as exposed by
2318 isnanf.h (e.g.) here, because those may end up being macros
2319 that recursively expand back to isnan. So use the gnulib
2320 replacements for them directly. */
2321 # if @HAVE_ISNANF@ && __GNUC__ >= 4
2322 # define gl_isnan_f(x) __builtin_isnanf ((float)(x))
2324 _GL_EXTERN_C
int rpl_isnanf (float x
);
2325 # define gl_isnan_f(x) rpl_isnanf (x)
2327 # if @HAVE_ISNAND@ && __GNUC__ >= 4
2328 # define gl_isnan_d(x) __builtin_isnan ((double)(x))
2330 _GL_EXTERN_C
int rpl_isnand (double x
);
2331 # define gl_isnan_d(x) rpl_isnand (x)
2333 # if @HAVE_ISNANL@ && __GNUC__ >= 4
2334 # define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
2336 _GL_EXTERN_C
int rpl_isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2337 # define gl_isnan_l(x) rpl_isnanl (x)
2341 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
2342 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
2344 # elif __GNUC__ >= 4
2347 (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \
2348 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
2349 __builtin_isnanf ((float)(x)))
2352 # if defined isnan || defined GNULIB_NAMESPACE
2353 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan
)
2355 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
)
2358 /* Ensure isnan is a macro. */
2360 # define isnan isnan
2363 #elif defined GNULIB_POSIXCHECK
2365 _GL_WARN_REAL_FLOATING_DECL (isnan
);
2367 # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
2372 #if @GNULIB_SIGNBIT@
2373 # if (@REPLACE_SIGNBIT_USING_GCC@ \
2374 && (!defined __cplusplus || __cplusplus < 201103))
2376 /* GCC 4.0 and newer provides three built-ins for signbit. */
2377 # define signbit(x) \
2378 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
2379 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
2380 __builtin_signbitf (x))
2382 # if @REPLACE_SIGNBIT@
2384 _GL_EXTERN_C
int gl_signbitf (float arg
);
2385 _GL_EXTERN_C
int gl_signbitd (double arg
);
2386 _GL_EXTERN_C
int gl_signbitl (long double arg
);
2387 # if __GNUC__ >= 2 && !defined __STRICT_ANSI__
2388 # define _GL_NUM_UINT_WORDS(type) \
2389 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
2390 # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
2391 # define gl_signbitf_OPTIMIZED_MACRO
2392 # define gl_signbitf(arg) \
2393 ({ union { float _value; \
2394 unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
2396 _m._value = (arg); \
2397 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
2400 # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
2401 # define gl_signbitd_OPTIMIZED_MACRO
2402 # define gl_signbitd(arg) \
2403 ({ union { double _value; \
2404 unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
2406 _m._value = (arg); \
2407 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
2410 # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
2411 # define gl_signbitl_OPTIMIZED_MACRO
2412 # define gl_signbitl(arg) \
2413 ({ union { long double _value; \
2414 unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
2416 _m._value = (arg); \
2417 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
2421 # define signbit(x) \
2422 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
2423 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
2427 # if defined signbit || defined GNULIB_NAMESPACE
2428 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit
)
2430 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
)
2433 #elif defined GNULIB_POSIXCHECK
2434 # if defined signbit
2435 _GL_WARN_REAL_FLOATING_DECL (signbit
);
2437 # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
2441 _GL_INLINE_HEADER_END
2443 #endif /* _@GUARD_PREFIX@_MATH_H */
2444 #endif /* _@GUARD_PREFIX@_MATH_H */