1 /* A GNU-like <math.h>.
3 Copyright (C) 2002-2003, 2007-2016 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 <http://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 #ifndef _GL_INLINE_HEADER_BEGIN
32 #error "Please include config.h first."
34 _GL_INLINE_HEADER_BEGIN
35 #ifndef _GL_MATH_INLINE
36 # define _GL_MATH_INLINE _GL_INLINE
39 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
41 /* The definition of _GL_ARG_NONNULL is copied here. */
43 /* The definition of _GL_WARN_ON_USE is copied here. */
46 /* Helper macros to define type-generic function FUNC as overloaded functions,
47 rather than as macros like in C. POSIX declares these with an argument of
48 real-floating (that is, one of float, double, or long double). */
49 # define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \
51 _gl_cxx_ ## func ## f (float f) \
56 _gl_cxx_ ## func ## d (double d) \
61 _gl_cxx_ ## func ## l (long double l) \
65 # define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \
69 return _gl_cxx_ ## func ## f (f); \
74 return _gl_cxx_ ## func ## d (d); \
77 func (long double l) \
79 return _gl_cxx_ ## func ## l (l); \
83 /* Helper macros to define a portability warning for the
84 classification macro FUNC called with VALUE. POSIX declares the
85 classification macros with an argument of real-floating (that is,
86 one of float, double, or long double). */
87 #define _GL_WARN_REAL_FLOATING_DECL(func) \
89 rpl_ ## func ## f (float f) \
94 rpl_ ## func ## d (double d) \
99 rpl_ ## func ## l (long double l) \
103 _GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - " \
104 "use gnulib module " #func " for portability"); \
105 _GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - " \
106 "use gnulib module " #func " for portability"); \
107 _GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \
108 "use gnulib module " #func " for portability")
109 #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
110 (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \
111 : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \
112 : rpl_ ## func ## l (value))
116 /* Pull in a function that fixes the 'int' to 'long double' conversion
118 _GL_EXTERN_C
void _Qp_itoq (long double *, int);
119 static void (*_gl_math_fix_itold
) (long double *, int) = _Qp_itoq
;
123 /* POSIX allows platforms that don't support NAN. But all major
124 machines in the past 15 years have supported something close to
125 IEEE NaN, so we define this unconditionally. We also must define
126 it on platforms like Solaris 10, where NAN is present but defined
127 as a function pointer rather than a floating point constant. */
128 #if !defined NAN || @REPLACE_NAN@
129 # if !GNULIB_defined_NAN
131 /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
132 choke on the expression 0.0 / 0.0. */
133 # if defined __DECC || defined _MSC_VER
134 _GL_MATH_INLINE
float
137 static float zero
= 0.0f
;
140 # define NAN (_NaN())
142 # define NAN (0.0f / 0.0f)
144 # define GNULIB_defined_NAN 1
148 /* Solaris 10 defines HUGE_VAL, but as a function pointer rather
149 than a floating point constant. */
150 #if @REPLACE_HUGE_VAL@
152 # define HUGE_VALF (1.0f / 0.0f)
154 # define HUGE_VAL (1.0 / 0.0)
156 # define HUGE_VALL (1.0L / 0.0L)
159 /* HUGE_VALF is a 'float' Infinity. */
161 # if defined _MSC_VER
162 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
163 # define HUGE_VALF (1e25f * 1e25f)
165 # define HUGE_VALF (1.0f / 0.0f)
169 /* HUGE_VAL is a 'double' Infinity. */
171 # if defined _MSC_VER
172 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
173 # define HUGE_VAL (1e250 * 1e250)
175 # define HUGE_VAL (1.0 / 0.0)
179 /* HUGE_VALL is a 'long double' Infinity. */
181 # if defined _MSC_VER
182 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
183 # define HUGE_VALL (1e250L * 1e250L)
185 # define HUGE_VALL (1.0L / 0.0L)
190 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
191 #if !(defined FP_ILOGB0 && defined FP_ILOGBNAN)
192 # if defined __NetBSD__ || defined __sgi
193 /* NetBSD, IRIX 6.5: match what ilogb() does */
194 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
195 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
197 /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
198 # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
199 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
201 /* Solaris 9: match what ilogb() does */
202 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
203 # define FP_ILOGBNAN 2147483647 /* INT_MAX */
205 /* Gnulib defined values. */
206 # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
207 # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
215 _GL_FUNCDECL_SYS (acosf
, float, (float x
));
217 _GL_CXXALIAS_SYS (acosf
, float, (float x
));
218 _GL_CXXALIASWARN (acosf
);
219 #elif defined GNULIB_POSIXCHECK
221 # if HAVE_RAW_DECL_ACOSF
222 _GL_WARN_ON_USE (acosf
, "acosf is unportable - "
223 "use gnulib module acosf for portability");
228 # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
230 _GL_FUNCDECL_SYS (acosl
, long double, (long double x
));
232 _GL_CXXALIAS_SYS (acosl
, long double, (long double x
));
233 _GL_CXXALIASWARN (acosl
);
234 #elif defined GNULIB_POSIXCHECK
236 # if HAVE_RAW_DECL_ACOSL
237 _GL_WARN_ON_USE (acosl
, "acosl is unportable - "
238 "use gnulib module acosl for portability");
246 _GL_FUNCDECL_SYS (asinf
, float, (float x
));
248 _GL_CXXALIAS_SYS (asinf
, float, (float x
));
249 _GL_CXXALIASWARN (asinf
);
250 #elif defined GNULIB_POSIXCHECK
252 # if HAVE_RAW_DECL_ASINF
253 _GL_WARN_ON_USE (asinf
, "asinf is unportable - "
254 "use gnulib module asinf for portability");
259 # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
261 _GL_FUNCDECL_SYS (asinl
, long double, (long double x
));
263 _GL_CXXALIAS_SYS (asinl
, long double, (long double x
));
264 _GL_CXXALIASWARN (asinl
);
265 #elif defined GNULIB_POSIXCHECK
267 # if HAVE_RAW_DECL_ASINL
268 _GL_WARN_ON_USE (asinl
, "asinl is unportable - "
269 "use gnulib module asinl for portability");
277 _GL_FUNCDECL_SYS (atanf
, float, (float x
));
279 _GL_CXXALIAS_SYS (atanf
, float, (float x
));
280 _GL_CXXALIASWARN (atanf
);
281 #elif defined GNULIB_POSIXCHECK
283 # if HAVE_RAW_DECL_ATANF
284 _GL_WARN_ON_USE (atanf
, "atanf is unportable - "
285 "use gnulib module atanf for portability");
290 # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
292 _GL_FUNCDECL_SYS (atanl
, long double, (long double x
));
294 _GL_CXXALIAS_SYS (atanl
, long double, (long double x
));
295 _GL_CXXALIASWARN (atanl
);
296 #elif defined GNULIB_POSIXCHECK
298 # if HAVE_RAW_DECL_ATANL
299 _GL_WARN_ON_USE (atanl
, "atanl is unportable - "
300 "use gnulib module atanl for portability");
308 _GL_FUNCDECL_SYS (atan2f
, float, (float y
, float x
));
310 _GL_CXXALIAS_SYS (atan2f
, float, (float y
, float x
));
311 _GL_CXXALIASWARN (atan2f
);
312 #elif defined GNULIB_POSIXCHECK
314 # if HAVE_RAW_DECL_ATAN2F
315 _GL_WARN_ON_USE (atan2f
, "atan2f is unportable - "
316 "use gnulib module atan2f for portability");
323 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
325 # define cbrtf rpl_cbrtf
327 _GL_FUNCDECL_RPL (cbrtf
, float, (float x
));
328 _GL_CXXALIAS_RPL (cbrtf
, float, (float x
));
330 # if !@HAVE_DECL_CBRTF@
331 _GL_FUNCDECL_SYS (cbrtf
, float, (float x
));
333 _GL_CXXALIAS_SYS (cbrtf
, float, (float x
));
335 _GL_CXXALIASWARN (cbrtf
);
336 #elif defined GNULIB_POSIXCHECK
338 # if HAVE_RAW_DECL_CBRTF
339 _GL_WARN_ON_USE (cbrtf
, "cbrtf is unportable - "
340 "use gnulib module cbrtf for portability");
346 _GL_FUNCDECL_SYS (cbrt
, double, (double x
));
348 _GL_CXXALIAS_SYS (cbrt
, double, (double x
));
349 _GL_CXXALIASWARN (cbrt
);
350 #elif defined GNULIB_POSIXCHECK
352 # if HAVE_RAW_DECL_CBRT
353 _GL_WARN_ON_USE (cbrt
, "cbrt is unportable - "
354 "use gnulib module cbrt for portability");
360 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
362 # define cbrtl rpl_cbrtl
364 _GL_FUNCDECL_RPL (cbrtl
, long double, (long double x
));
365 _GL_CXXALIAS_RPL (cbrtl
, long double, (long double x
));
367 # if !@HAVE_DECL_CBRTL@
368 _GL_FUNCDECL_SYS (cbrtl
, long double, (long double x
));
370 _GL_CXXALIAS_SYS (cbrtl
, long double, (long double x
));
372 _GL_CXXALIASWARN (cbrtl
);
373 #elif defined GNULIB_POSIXCHECK
375 # if HAVE_RAW_DECL_CBRTL
376 _GL_WARN_ON_USE (cbrtl
, "cbrtl is unportable - "
377 "use gnulib module cbrtl for portability");
384 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
386 # define ceilf rpl_ceilf
388 _GL_FUNCDECL_RPL (ceilf
, float, (float x
));
389 _GL_CXXALIAS_RPL (ceilf
, float, (float x
));
391 # if !@HAVE_DECL_CEILF@
393 _GL_FUNCDECL_SYS (ceilf
, float, (float x
));
395 _GL_CXXALIAS_SYS (ceilf
, float, (float x
));
397 _GL_CXXALIASWARN (ceilf
);
398 #elif defined GNULIB_POSIXCHECK
400 # if HAVE_RAW_DECL_CEILF
401 _GL_WARN_ON_USE (ceilf
, "ceilf is unportable - "
402 "use gnulib module ceilf for portability");
408 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
410 # define ceil rpl_ceil
412 _GL_FUNCDECL_RPL (ceil
, double, (double x
));
413 _GL_CXXALIAS_RPL (ceil
, double, (double x
));
415 _GL_CXXALIAS_SYS (ceil
, double, (double x
));
417 _GL_CXXALIASWARN (ceil
);
422 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
424 # define ceill rpl_ceill
426 _GL_FUNCDECL_RPL (ceill
, long double, (long double x
));
427 _GL_CXXALIAS_RPL (ceill
, long double, (long double x
));
429 # if !@HAVE_DECL_CEILL@
431 _GL_FUNCDECL_SYS (ceill
, long double, (long double x
));
433 _GL_CXXALIAS_SYS (ceill
, long double, (long double x
));
435 _GL_CXXALIASWARN (ceill
);
436 #elif defined GNULIB_POSIXCHECK
438 # if HAVE_RAW_DECL_CEILL
439 _GL_WARN_ON_USE (ceill
, "ceill is unportable - "
440 "use gnulib module ceill for portability");
445 #if @GNULIB_COPYSIGNF@
446 # if !@HAVE_DECL_COPYSIGNF@
447 _GL_FUNCDECL_SYS (copysignf
, float, (float x
, float y
));
449 _GL_CXXALIAS_SYS (copysignf
, float, (float x
, float y
));
450 _GL_CXXALIASWARN (copysignf
);
451 #elif defined GNULIB_POSIXCHECK
453 # if HAVE_RAW_DECL_COPYSIGNF
454 _GL_WARN_ON_USE (copysignf
, "copysignf is unportable - "
455 "use gnulib module copysignf for portability");
459 #if @GNULIB_COPYSIGN@
460 # if !@HAVE_COPYSIGN@
461 _GL_FUNCDECL_SYS (copysign
, double, (double x
, double y
));
463 _GL_CXXALIAS_SYS (copysign
, double, (double x
, double y
));
464 _GL_CXXALIASWARN (copysign
);
465 #elif defined GNULIB_POSIXCHECK
467 # if HAVE_RAW_DECL_COPYSIGN
468 _GL_WARN_ON_USE (copysign
, "copysign is unportable - "
469 "use gnulib module copysign for portability");
473 #if @GNULIB_COPYSIGNL@
474 # if !@HAVE_COPYSIGNL@
475 _GL_FUNCDECL_SYS (copysignl
, long double, (long double x
, long double y
));
477 _GL_CXXALIAS_SYS (copysignl
, long double, (long double x
, long double y
));
478 _GL_CXXALIASWARN (copysignl
);
479 #elif defined GNULIB_POSIXCHECK
481 # if HAVE_RAW_DECL_COPYSIGNL
482 _GL_WARN_ON_USE (copysign
, "copysignl is unportable - "
483 "use gnulib module copysignl for portability");
491 _GL_FUNCDECL_SYS (cosf
, float, (float x
));
493 _GL_CXXALIAS_SYS (cosf
, float, (float x
));
494 _GL_CXXALIASWARN (cosf
);
495 #elif defined GNULIB_POSIXCHECK
497 # if HAVE_RAW_DECL_COSF
498 _GL_WARN_ON_USE (cosf
, "cosf is unportable - "
499 "use gnulib module cosf for portability");
504 # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
506 _GL_FUNCDECL_SYS (cosl
, long double, (long double x
));
508 _GL_CXXALIAS_SYS (cosl
, long double, (long double x
));
509 _GL_CXXALIASWARN (cosl
);
510 #elif defined GNULIB_POSIXCHECK
512 # if HAVE_RAW_DECL_COSL
513 _GL_WARN_ON_USE (cosl
, "cosl is unportable - "
514 "use gnulib module cosl for portability");
522 _GL_FUNCDECL_SYS (coshf
, float, (float x
));
524 _GL_CXXALIAS_SYS (coshf
, float, (float x
));
525 _GL_CXXALIASWARN (coshf
);
526 #elif defined GNULIB_POSIXCHECK
528 # if HAVE_RAW_DECL_COSHF
529 _GL_WARN_ON_USE (coshf
, "coshf is unportable - "
530 "use gnulib module coshf for portability");
538 _GL_FUNCDECL_SYS (expf
, float, (float x
));
540 _GL_CXXALIAS_SYS (expf
, float, (float x
));
541 _GL_CXXALIASWARN (expf
);
542 #elif defined GNULIB_POSIXCHECK
544 # if HAVE_RAW_DECL_EXPF
545 _GL_WARN_ON_USE (expf
, "expf is unportable - "
546 "use gnulib module expf for portability");
551 # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
553 _GL_FUNCDECL_SYS (expl
, long double, (long double x
));
555 _GL_CXXALIAS_SYS (expl
, long double, (long double x
));
556 _GL_CXXALIASWARN (expl
);
557 #elif defined GNULIB_POSIXCHECK
559 # if HAVE_RAW_DECL_EXPL
560 _GL_WARN_ON_USE (expl
, "expl is unportable - "
561 "use gnulib module expl for portability");
567 # if !@HAVE_DECL_EXP2F@
568 _GL_FUNCDECL_SYS (exp2f
, float, (float x
));
570 _GL_CXXALIAS_SYS (exp2f
, float, (float x
));
571 _GL_CXXALIASWARN (exp2f
);
572 #elif defined GNULIB_POSIXCHECK
574 # if HAVE_RAW_DECL_EXP2F
575 _GL_WARN_ON_USE (exp2f
, "exp2f is unportable - "
576 "use gnulib module exp2f for portability");
582 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
584 # define exp2 rpl_exp2
586 _GL_FUNCDECL_RPL (exp2
, double, (double x
));
587 _GL_CXXALIAS_RPL (exp2
, double, (double x
));
589 # if !@HAVE_DECL_EXP2@
590 _GL_FUNCDECL_SYS (exp2
, double, (double x
));
592 _GL_CXXALIAS_SYS (exp2
, double, (double x
));
594 _GL_CXXALIASWARN (exp2
);
595 #elif defined GNULIB_POSIXCHECK
597 # if HAVE_RAW_DECL_EXP2
598 _GL_WARN_ON_USE (exp2
, "exp2 is unportable - "
599 "use gnulib module exp2 for portability");
605 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
607 # define exp2l rpl_exp2l
609 _GL_FUNCDECL_RPL (exp2l
, long double, (long double x
));
610 _GL_CXXALIAS_RPL (exp2l
, long double, (long double x
));
612 # if !@HAVE_DECL_EXP2L@
614 _GL_FUNCDECL_SYS (exp2l
, long double, (long double x
));
616 _GL_CXXALIAS_SYS (exp2l
, long double, (long double x
));
618 _GL_CXXALIASWARN (exp2l
);
619 #elif defined GNULIB_POSIXCHECK
621 # if HAVE_RAW_DECL_EXP2L
622 _GL_WARN_ON_USE (exp2l
, "exp2l is unportable - "
623 "use gnulib module exp2l for portability");
629 # if @REPLACE_EXPM1F@
630 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
632 # define expm1f rpl_expm1f
634 _GL_FUNCDECL_RPL (expm1f
, float, (float x
));
635 _GL_CXXALIAS_RPL (expm1f
, float, (float x
));
638 _GL_FUNCDECL_SYS (expm1f
, float, (float x
));
640 _GL_CXXALIAS_SYS (expm1f
, float, (float x
));
642 _GL_CXXALIASWARN (expm1f
);
643 #elif defined GNULIB_POSIXCHECK
645 # if HAVE_RAW_DECL_EXPM1F
646 _GL_WARN_ON_USE (expm1f
, "expm1f is unportable - "
647 "use gnulib module expm1f for portability");
653 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
655 # define expm1 rpl_expm1
657 _GL_FUNCDECL_RPL (expm1
, double, (double x
));
658 _GL_CXXALIAS_RPL (expm1
, double, (double x
));
661 _GL_FUNCDECL_SYS (expm1
, double, (double x
));
663 _GL_CXXALIAS_SYS (expm1
, double, (double x
));
665 _GL_CXXALIASWARN (expm1
);
666 #elif defined GNULIB_POSIXCHECK
668 # if HAVE_RAW_DECL_EXPM1
669 _GL_WARN_ON_USE (expm1
, "expm1 is unportable - "
670 "use gnulib module expm1 for portability");
675 # if !@HAVE_DECL_EXPM1L@
677 _GL_FUNCDECL_SYS (expm1l
, long double, (long double x
));
679 _GL_CXXALIAS_SYS (expm1l
, long double, (long double x
));
680 _GL_CXXALIASWARN (expm1l
);
681 #elif defined GNULIB_POSIXCHECK
683 # if HAVE_RAW_DECL_EXPM1L
684 _GL_WARN_ON_USE (expm1l
, "expm1l is unportable - "
685 "use gnulib module expm1l for portability");
693 _GL_FUNCDECL_SYS (fabsf
, float, (float x
));
695 _GL_CXXALIAS_SYS (fabsf
, float, (float x
));
696 _GL_CXXALIASWARN (fabsf
);
697 #elif defined GNULIB_POSIXCHECK
699 # if HAVE_RAW_DECL_FABSF
700 _GL_WARN_ON_USE (fabsf
, "fabsf is unportable - "
701 "use gnulib module fabsf for portability");
707 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
709 # define fabsl rpl_fabsl
711 _GL_FUNCDECL_RPL (fabsl
, long double, (long double x
));
712 _GL_CXXALIAS_RPL (fabsl
, long double, (long double x
));
716 _GL_FUNCDECL_SYS (fabsl
, long double, (long double x
));
718 _GL_CXXALIAS_SYS (fabsl
, long double, (long double x
));
720 _GL_CXXALIASWARN (fabsl
);
721 #elif defined GNULIB_POSIXCHECK
723 # if HAVE_RAW_DECL_FABSL
724 _GL_WARN_ON_USE (fabsl
, "fabsl is unportable - "
725 "use gnulib module fabsl for portability");
731 # if @REPLACE_FLOORF@
732 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
734 # define floorf rpl_floorf
736 _GL_FUNCDECL_RPL (floorf
, float, (float x
));
737 _GL_CXXALIAS_RPL (floorf
, float, (float x
));
739 # if !@HAVE_DECL_FLOORF@
741 _GL_FUNCDECL_SYS (floorf
, float, (float x
));
743 _GL_CXXALIAS_SYS (floorf
, float, (float x
));
745 _GL_CXXALIASWARN (floorf
);
746 #elif defined GNULIB_POSIXCHECK
748 # if HAVE_RAW_DECL_FLOORF
749 _GL_WARN_ON_USE (floorf
, "floorf is unportable - "
750 "use gnulib module floorf for portability");
756 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
758 # define floor rpl_floor
760 _GL_FUNCDECL_RPL (floor
, double, (double x
));
761 _GL_CXXALIAS_RPL (floor
, double, (double x
));
763 _GL_CXXALIAS_SYS (floor
, double, (double x
));
765 _GL_CXXALIASWARN (floor
);
769 # if @REPLACE_FLOORL@
770 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
772 # define floorl rpl_floorl
774 _GL_FUNCDECL_RPL (floorl
, long double, (long double x
));
775 _GL_CXXALIAS_RPL (floorl
, long double, (long double x
));
777 # if !@HAVE_DECL_FLOORL@
779 _GL_FUNCDECL_SYS (floorl
, long double, (long double x
));
781 _GL_CXXALIAS_SYS (floorl
, long double, (long double x
));
783 _GL_CXXALIASWARN (floorl
);
784 #elif defined GNULIB_POSIXCHECK
786 # if HAVE_RAW_DECL_FLOORL
787 _GL_WARN_ON_USE (floorl
, "floorl is unportable - "
788 "use gnulib module floorl for portability");
795 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
797 # define fmaf rpl_fmaf
799 _GL_FUNCDECL_RPL (fmaf
, float, (float x
, float y
, float z
));
800 _GL_CXXALIAS_RPL (fmaf
, float, (float x
, float y
, float z
));
803 _GL_FUNCDECL_SYS (fmaf
, float, (float x
, float y
, float z
));
805 _GL_CXXALIAS_SYS (fmaf
, float, (float x
, float y
, float z
));
807 _GL_CXXALIASWARN (fmaf
);
808 #elif defined GNULIB_POSIXCHECK
810 # if HAVE_RAW_DECL_FMAF
811 _GL_WARN_ON_USE (fmaf
, "fmaf is unportable - "
812 "use gnulib module fmaf for portability");
818 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
822 _GL_FUNCDECL_RPL (fma
, double, (double x
, double y
, double z
));
823 _GL_CXXALIAS_RPL (fma
, double, (double x
, double y
, double z
));
826 _GL_FUNCDECL_SYS (fma
, double, (double x
, double y
, double z
));
828 _GL_CXXALIAS_SYS (fma
, double, (double x
, double y
, double z
));
830 _GL_CXXALIASWARN (fma
);
831 #elif defined GNULIB_POSIXCHECK
833 # if HAVE_RAW_DECL_FMA
834 _GL_WARN_ON_USE (fma
, "fma is unportable - "
835 "use gnulib module fma for portability");
841 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
843 # define fmal rpl_fmal
845 _GL_FUNCDECL_RPL (fmal
, long double,
846 (long double x
, long double y
, long double z
));
847 _GL_CXXALIAS_RPL (fmal
, long double,
848 (long double x
, long double y
, long double z
));
852 _GL_FUNCDECL_SYS (fmal
, long double,
853 (long double x
, long double y
, long double z
));
855 _GL_CXXALIAS_SYS (fmal
, long double,
856 (long double x
, long double y
, long double z
));
858 _GL_CXXALIASWARN (fmal
);
859 #elif defined GNULIB_POSIXCHECK
861 # if HAVE_RAW_DECL_FMAL
862 _GL_WARN_ON_USE (fmal
, "fmal is unportable - "
863 "use gnulib module fmal for portability");
870 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
872 # define fmodf rpl_fmodf
874 _GL_FUNCDECL_RPL (fmodf
, float, (float x
, float y
));
875 _GL_CXXALIAS_RPL (fmodf
, float, (float x
, float y
));
879 _GL_FUNCDECL_SYS (fmodf
, float, (float x
, float y
));
881 _GL_CXXALIAS_SYS (fmodf
, float, (float x
, float y
));
883 _GL_CXXALIASWARN (fmodf
);
884 #elif defined GNULIB_POSIXCHECK
886 # if HAVE_RAW_DECL_FMODF
887 _GL_WARN_ON_USE (fmodf
, "fmodf is unportable - "
888 "use gnulib module fmodf for portability");
894 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
896 # define fmod rpl_fmod
898 _GL_FUNCDECL_RPL (fmod
, double, (double x
, double y
));
899 _GL_CXXALIAS_RPL (fmod
, double, (double x
, double y
));
901 _GL_CXXALIAS_SYS (fmod
, double, (double x
, double y
));
903 _GL_CXXALIASWARN (fmod
);
904 #elif defined GNULIB_POSIXCHECK
906 # if HAVE_RAW_DECL_FMOD
907 _GL_WARN_ON_USE (fmod
, "fmod has portability problems - "
908 "use gnulib module fmod for portability");
914 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
916 # define fmodl rpl_fmodl
918 _GL_FUNCDECL_RPL (fmodl
, long double, (long double x
, long double y
));
919 _GL_CXXALIAS_RPL (fmodl
, long double, (long double x
, long double y
));
923 _GL_FUNCDECL_SYS (fmodl
, long double, (long double x
, long double y
));
925 _GL_CXXALIAS_SYS (fmodl
, long double, (long double x
, long double y
));
927 _GL_CXXALIASWARN (fmodl
);
928 #elif defined GNULIB_POSIXCHECK
930 # if HAVE_RAW_DECL_FMODL
931 _GL_WARN_ON_USE (fmodl
, "fmodl is unportable - "
932 "use gnulib module fmodl for portability");
940 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
941 If x is zero: mantissa = x, exp = 0.
942 If x is infinite or NaN: mantissa = x, exp unspecified.
943 Store exp in *EXPPTR and return mantissa. */
945 # if @REPLACE_FREXPF@
946 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
948 # define frexpf rpl_frexpf
950 _GL_FUNCDECL_RPL (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
951 _GL_CXXALIAS_RPL (frexpf
, float, (float x
, int *expptr
));
955 _GL_FUNCDECL_SYS (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
957 _GL_CXXALIAS_SYS (frexpf
, float, (float x
, int *expptr
));
959 _GL_CXXALIASWARN (frexpf
);
960 #elif defined GNULIB_POSIXCHECK
962 # if HAVE_RAW_DECL_FREXPF
963 _GL_WARN_ON_USE (frexpf
, "frexpf is unportable - "
964 "use gnulib module frexpf for portability");
971 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
972 If x is zero: mantissa = x, exp = 0.
973 If x is infinite or NaN: mantissa = x, exp unspecified.
974 Store exp in *EXPPTR and return mantissa. */
977 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
979 # define frexp rpl_frexp
981 _GL_FUNCDECL_RPL (frexp
, double, (double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
982 _GL_CXXALIAS_RPL (frexp
, double, (double x
, int *expptr
));
984 _GL_CXXALIAS_SYS (frexp
, double, (double x
, int *expptr
));
986 _GL_CXXALIASWARN (frexp
);
987 #elif defined GNULIB_POSIXCHECK
989 /* Assume frexp is always declared. */
990 _GL_WARN_ON_USE (frexp
, "frexp is unportable - "
991 "use gnulib module frexp for portability");
997 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
998 If x is zero: mantissa = x, exp = 0.
999 If x is infinite or NaN: mantissa = x, exp unspecified.
1000 Store exp in *EXPPTR and return mantissa. */
1001 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
1002 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1004 # define frexpl rpl_frexpl
1006 _GL_FUNCDECL_RPL (frexpl
, long double,
1007 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1008 _GL_CXXALIAS_RPL (frexpl
, long double, (long double x
, int *expptr
));
1010 # if !@HAVE_DECL_FREXPL@
1011 _GL_FUNCDECL_SYS (frexpl
, long double,
1012 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1014 # if @GNULIB_FREXPL@
1015 _GL_CXXALIAS_SYS (frexpl
, long double, (long double x
, int *expptr
));
1018 #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
1019 _GL_CXXALIASWARN (frexpl
);
1021 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
1023 # if HAVE_RAW_DECL_FREXPL
1024 _GL_WARN_ON_USE (frexpl
, "frexpl is unportable - "
1025 "use gnulib module frexpl for portability");
1030 /* Return sqrt(x^2+y^2). */
1032 # if @REPLACE_HYPOTF@
1033 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1035 # define hypotf rpl_hypotf
1037 _GL_FUNCDECL_RPL (hypotf
, float, (float x
, float y
));
1038 _GL_CXXALIAS_RPL (hypotf
, float, (float x
, float y
));
1041 _GL_FUNCDECL_SYS (hypotf
, float, (float x
, float y
));
1043 _GL_CXXALIAS_SYS (hypotf
, float, (float x
, float y
));
1045 _GL_CXXALIASWARN (hypotf
);
1046 #elif defined GNULIB_POSIXCHECK
1048 # if HAVE_RAW_DECL_HYPOTF
1049 _GL_WARN_ON_USE (hypotf
, "hypotf is unportable - "
1050 "use gnulib module hypotf for portability");
1054 /* Return sqrt(x^2+y^2). */
1056 # if @REPLACE_HYPOT@
1057 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1059 # define hypot rpl_hypot
1061 _GL_FUNCDECL_RPL (hypot
, double, (double x
, double y
));
1062 _GL_CXXALIAS_RPL (hypot
, double, (double x
, double y
));
1064 _GL_CXXALIAS_SYS (hypot
, double, (double x
, double y
));
1066 _GL_CXXALIASWARN (hypot
);
1067 #elif defined GNULIB_POSIXCHECK
1069 # if HAVE_RAW_DECL_HYPOT
1070 _GL_WARN_ON_USE (hypotf
, "hypot has portability problems - "
1071 "use gnulib module hypot for portability");
1075 /* Return sqrt(x^2+y^2). */
1077 # if @REPLACE_HYPOTL@
1078 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1080 # define hypotl rpl_hypotl
1082 _GL_FUNCDECL_RPL (hypotl
, long double, (long double x
, long double y
));
1083 _GL_CXXALIAS_RPL (hypotl
, long double, (long double x
, long double y
));
1086 _GL_FUNCDECL_SYS (hypotl
, long double, (long double x
, long double y
));
1088 _GL_CXXALIAS_SYS (hypotl
, long double, (long double x
, long double y
));
1090 _GL_CXXALIASWARN (hypotl
);
1091 #elif defined GNULIB_POSIXCHECK
1093 # if HAVE_RAW_DECL_HYPOTL
1094 _GL_WARN_ON_USE (hypotl
, "hypotl is unportable - "
1095 "use gnulib module hypotl for portability");
1101 # if @REPLACE_ILOGBF@
1102 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1104 # define ilogbf rpl_ilogbf
1106 _GL_FUNCDECL_RPL (ilogbf
, int, (float x
));
1107 _GL_CXXALIAS_RPL (ilogbf
, int, (float x
));
1110 _GL_FUNCDECL_SYS (ilogbf
, int, (float x
));
1112 _GL_CXXALIAS_SYS (ilogbf
, int, (float x
));
1114 _GL_CXXALIASWARN (ilogbf
);
1115 #elif defined GNULIB_POSIXCHECK
1117 # if HAVE_RAW_DECL_ILOGBF
1118 _GL_WARN_ON_USE (ilogbf
, "ilogbf is unportable - "
1119 "use gnulib module ilogbf for portability");
1124 # if @REPLACE_ILOGB@
1125 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1127 # define ilogb rpl_ilogb
1129 _GL_FUNCDECL_RPL (ilogb
, int, (double x
));
1130 _GL_CXXALIAS_RPL (ilogb
, int, (double x
));
1133 _GL_FUNCDECL_SYS (ilogb
, int, (double x
));
1135 _GL_CXXALIAS_SYS (ilogb
, int, (double x
));
1137 _GL_CXXALIASWARN (ilogb
);
1138 #elif defined GNULIB_POSIXCHECK
1140 # if HAVE_RAW_DECL_ILOGB
1141 _GL_WARN_ON_USE (ilogb
, "ilogb is unportable - "
1142 "use gnulib module ilogb for portability");
1148 _GL_FUNCDECL_SYS (ilogbl
, int, (long double x
));
1150 _GL_CXXALIAS_SYS (ilogbl
, int, (long double x
));
1151 _GL_CXXALIASWARN (ilogbl
);
1152 #elif defined GNULIB_POSIXCHECK
1154 # if HAVE_RAW_DECL_ILOGBL
1155 _GL_WARN_ON_USE (ilogbl
, "ilogbl is unportable - "
1156 "use gnulib module ilogbl for portability");
1161 /* Return x * 2^exp. */
1165 _GL_FUNCDECL_SYS (ldexpf
, float, (float x
, int exp
));
1167 _GL_CXXALIAS_SYS (ldexpf
, float, (float x
, int exp
));
1168 _GL_CXXALIASWARN (ldexpf
);
1169 #elif defined GNULIB_POSIXCHECK
1171 # if HAVE_RAW_DECL_LDEXPF
1172 _GL_WARN_ON_USE (ldexpf
, "ldexpf is unportable - "
1173 "use gnulib module ldexpf for portability");
1177 /* Return x * 2^exp. */
1178 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
1179 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1181 # define ldexpl rpl_ldexpl
1183 _GL_FUNCDECL_RPL (ldexpl
, long double, (long double x
, int exp
));
1184 _GL_CXXALIAS_RPL (ldexpl
, long double, (long double x
, int exp
));
1186 # if !@HAVE_DECL_LDEXPL@
1187 _GL_FUNCDECL_SYS (ldexpl
, long double, (long double x
, int exp
));
1189 # if @GNULIB_LDEXPL@
1190 _GL_CXXALIAS_SYS (ldexpl
, long double, (long double x
, int exp
));
1194 _GL_CXXALIASWARN (ldexpl
);
1196 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
1198 # if HAVE_RAW_DECL_LDEXPL
1199 _GL_WARN_ON_USE (ldexpl
, "ldexpl is unportable - "
1200 "use gnulib module ldexpl for portability");
1207 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1209 # define logf rpl_logf
1211 _GL_FUNCDECL_RPL (logf
, float, (float x
));
1212 _GL_CXXALIAS_RPL (logf
, float, (float x
));
1216 _GL_FUNCDECL_SYS (logf
, float, (float x
));
1218 _GL_CXXALIAS_SYS (logf
, float, (float x
));
1220 _GL_CXXALIASWARN (logf
);
1221 #elif defined GNULIB_POSIXCHECK
1223 # if HAVE_RAW_DECL_LOGF
1224 _GL_WARN_ON_USE (logf
, "logf is unportable - "
1225 "use gnulib module logf for portability");
1231 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1233 # define log rpl_log
1235 _GL_FUNCDECL_RPL (log
, double, (double x
));
1236 _GL_CXXALIAS_RPL (log
, double, (double x
));
1238 _GL_CXXALIAS_SYS (log
, double, (double x
));
1240 _GL_CXXALIASWARN (log
);
1241 #elif defined GNULIB_POSIXCHECK
1243 # if HAVE_RAW_DECL_LOG
1244 _GL_WARN_ON_USE (log
, "log has portability problems - "
1245 "use gnulib module log for portability");
1251 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1253 # define logl rpl_logl
1255 _GL_FUNCDECL_RPL (logl
, long double, (long double x
));
1256 _GL_CXXALIAS_RPL (logl
, long double, (long double x
));
1258 # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
1260 _GL_FUNCDECL_SYS (logl
, long double, (long double x
));
1262 _GL_CXXALIAS_SYS (logl
, long double, (long double x
));
1264 _GL_CXXALIASWARN (logl
);
1265 #elif defined GNULIB_POSIXCHECK
1267 # if HAVE_RAW_DECL_LOGL
1268 _GL_WARN_ON_USE (logl
, "logl is unportable - "
1269 "use gnulib module logl for portability");
1275 # if @REPLACE_LOG10F@
1276 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1278 # define log10f rpl_log10f
1280 _GL_FUNCDECL_RPL (log10f
, float, (float x
));
1281 _GL_CXXALIAS_RPL (log10f
, float, (float x
));
1285 _GL_FUNCDECL_SYS (log10f
, float, (float x
));
1287 _GL_CXXALIAS_SYS (log10f
, float, (float x
));
1289 _GL_CXXALIASWARN (log10f
);
1290 #elif defined GNULIB_POSIXCHECK
1292 # if HAVE_RAW_DECL_LOG10F
1293 _GL_WARN_ON_USE (log10f
, "log10f is unportable - "
1294 "use gnulib module log10f for portability");
1299 # if @REPLACE_LOG10@
1300 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1302 # define log10 rpl_log10
1304 _GL_FUNCDECL_RPL (log10
, double, (double x
));
1305 _GL_CXXALIAS_RPL (log10
, double, (double x
));
1307 _GL_CXXALIAS_SYS (log10
, double, (double x
));
1309 _GL_CXXALIASWARN (log10
);
1310 #elif defined GNULIB_POSIXCHECK
1312 # if HAVE_RAW_DECL_LOG10
1313 _GL_WARN_ON_USE (log10
, "log10 has portability problems - "
1314 "use gnulib module log10 for portability");
1319 # if @REPLACE_LOG10L@
1320 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1322 # define log10l rpl_log10l
1324 _GL_FUNCDECL_RPL (log10l
, long double, (long double x
));
1325 _GL_CXXALIAS_RPL (log10l
, long double, (long double x
));
1327 # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
1329 _GL_FUNCDECL_SYS (log10l
, long double, (long double x
));
1331 _GL_CXXALIAS_SYS (log10l
, long double, (long double x
));
1333 _GL_CXXALIASWARN (log10l
);
1334 #elif defined GNULIB_POSIXCHECK
1336 # if HAVE_RAW_DECL_LOG10L
1337 _GL_WARN_ON_USE (log10l
, "log10l is unportable - "
1338 "use gnulib module log10l for portability");
1344 # if @REPLACE_LOG1PF@
1345 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1347 # define log1pf rpl_log1pf
1349 _GL_FUNCDECL_RPL (log1pf
, float, (float x
));
1350 _GL_CXXALIAS_RPL (log1pf
, float, (float x
));
1353 _GL_FUNCDECL_SYS (log1pf
, float, (float x
));
1355 _GL_CXXALIAS_SYS (log1pf
, float, (float x
));
1357 _GL_CXXALIASWARN (log1pf
);
1358 #elif defined GNULIB_POSIXCHECK
1360 # if HAVE_RAW_DECL_LOG1PF
1361 _GL_WARN_ON_USE (log1pf
, "log1pf is unportable - "
1362 "use gnulib module log1pf for portability");
1367 # if @REPLACE_LOG1P@
1368 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1370 # define log1p rpl_log1p
1372 _GL_FUNCDECL_RPL (log1p
, double, (double x
));
1373 _GL_CXXALIAS_RPL (log1p
, double, (double x
));
1376 _GL_FUNCDECL_SYS (log1p
, double, (double x
));
1378 _GL_CXXALIAS_SYS (log1p
, double, (double x
));
1380 _GL_CXXALIASWARN (log1p
);
1381 #elif defined GNULIB_POSIXCHECK
1383 # if HAVE_RAW_DECL_LOG1P
1384 _GL_WARN_ON_USE (log1p
, "log1p has portability problems - "
1385 "use gnulib module log1p for portability");
1390 # if @REPLACE_LOG1PL@
1391 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1393 # define log1pl rpl_log1pl
1395 _GL_FUNCDECL_RPL (log1pl
, long double, (long double x
));
1396 _GL_CXXALIAS_RPL (log1pl
, long double, (long double x
));
1399 _GL_FUNCDECL_SYS (log1pl
, long double, (long double x
));
1401 _GL_CXXALIAS_SYS (log1pl
, long double, (long double x
));
1403 _GL_CXXALIASWARN (log1pl
);
1404 #elif defined GNULIB_POSIXCHECK
1406 # if HAVE_RAW_DECL_LOG1PL
1407 _GL_WARN_ON_USE (log1pl
, "log1pl has portability problems - "
1408 "use gnulib module log1pl for portability");
1414 # if @REPLACE_LOG2F@
1415 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1417 # define log2f rpl_log2f
1419 _GL_FUNCDECL_RPL (log2f
, float, (float x
));
1420 _GL_CXXALIAS_RPL (log2f
, float, (float x
));
1422 # if !@HAVE_DECL_LOG2F@
1424 _GL_FUNCDECL_SYS (log2f
, float, (float x
));
1426 _GL_CXXALIAS_SYS (log2f
, float, (float x
));
1428 _GL_CXXALIASWARN (log2f
);
1429 #elif defined GNULIB_POSIXCHECK
1431 # if HAVE_RAW_DECL_LOG2F
1432 _GL_WARN_ON_USE (log2f
, "log2f is unportable - "
1433 "use gnulib module log2f for portability");
1439 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1441 # define log2 rpl_log2
1443 _GL_FUNCDECL_RPL (log2
, double, (double x
));
1444 _GL_CXXALIAS_RPL (log2
, double, (double x
));
1446 # if !@HAVE_DECL_LOG2@
1448 _GL_FUNCDECL_SYS (log2
, double, (double x
));
1450 _GL_CXXALIAS_SYS (log2
, double, (double x
));
1452 _GL_CXXALIASWARN (log2
);
1453 #elif defined GNULIB_POSIXCHECK
1455 # if HAVE_RAW_DECL_LOG2
1456 _GL_WARN_ON_USE (log2
, "log2 is unportable - "
1457 "use gnulib module log2 for portability");
1462 # if @REPLACE_LOG2L@
1463 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1465 # define log2l rpl_log2l
1467 _GL_FUNCDECL_RPL (log2l
, long double, (long double x
));
1468 _GL_CXXALIAS_RPL (log2l
, long double, (long double x
));
1470 # if !@HAVE_DECL_LOG2L@
1471 _GL_FUNCDECL_SYS (log2l
, long double, (long double x
));
1473 _GL_CXXALIAS_SYS (log2l
, long double, (long double x
));
1475 _GL_CXXALIASWARN (log2l
);
1476 #elif defined GNULIB_POSIXCHECK
1478 # if HAVE_RAW_DECL_LOG2L
1479 _GL_WARN_ON_USE (log2l
, "log2l is unportable - "
1480 "use gnulib module log2l for portability");
1486 # if @REPLACE_LOGBF@
1487 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1489 # define logbf rpl_logbf
1491 _GL_FUNCDECL_RPL (logbf
, float, (float x
));
1492 _GL_CXXALIAS_RPL (logbf
, float, (float x
));
1495 _GL_FUNCDECL_SYS (logbf
, float, (float x
));
1497 _GL_CXXALIAS_SYS (logbf
, float, (float x
));
1499 _GL_CXXALIASWARN (logbf
);
1500 #elif defined GNULIB_POSIXCHECK
1502 # if HAVE_RAW_DECL_LOGBF
1503 _GL_WARN_ON_USE (logbf
, "logbf is unportable - "
1504 "use gnulib module logbf for portability");
1510 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1512 # define logb rpl_logb
1514 _GL_FUNCDECL_RPL (logb
, double, (double x
));
1515 _GL_CXXALIAS_RPL (logb
, double, (double x
));
1517 # if !@HAVE_DECL_LOGB@
1518 _GL_FUNCDECL_SYS (logb
, double, (double x
));
1520 _GL_CXXALIAS_SYS (logb
, double, (double x
));
1522 _GL_CXXALIASWARN (logb
);
1523 #elif defined GNULIB_POSIXCHECK
1525 # if HAVE_RAW_DECL_LOGB
1526 _GL_WARN_ON_USE (logb
, "logb is unportable - "
1527 "use gnulib module logb for portability");
1532 # if @REPLACE_LOGBL@
1533 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1535 # define logbl rpl_logbl
1537 _GL_FUNCDECL_RPL (logbl
, long double, (long double x
));
1538 _GL_CXXALIAS_RPL (logbl
, long double, (long double x
));
1541 _GL_FUNCDECL_SYS (logbl
, long double, (long double x
));
1543 _GL_CXXALIAS_SYS (logbl
, long double, (long double x
));
1545 _GL_CXXALIASWARN (logbl
);
1546 #elif defined GNULIB_POSIXCHECK
1548 # if HAVE_RAW_DECL_LOGBL
1549 _GL_WARN_ON_USE (logbl
, "logbl is unportable - "
1550 "use gnulib module logbl for portability");
1556 # if @REPLACE_MODFF@
1557 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1559 # define modff rpl_modff
1561 _GL_FUNCDECL_RPL (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1562 _GL_CXXALIAS_RPL (modff
, float, (float x
, float *iptr
));
1566 _GL_FUNCDECL_SYS (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1568 _GL_CXXALIAS_SYS (modff
, float, (float x
, float *iptr
));
1570 _GL_CXXALIASWARN (modff
);
1571 #elif defined GNULIB_POSIXCHECK
1573 # if HAVE_RAW_DECL_MODFF
1574 _GL_WARN_ON_USE (modff
, "modff is unportable - "
1575 "use gnulib module modff for portability");
1581 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1583 # define modf rpl_modf
1585 _GL_FUNCDECL_RPL (modf
, double, (double x
, double *iptr
) _GL_ARG_NONNULL ((2)));
1586 _GL_CXXALIAS_RPL (modf
, double, (double x
, double *iptr
));
1588 _GL_CXXALIAS_SYS (modf
, double, (double x
, double *iptr
));
1590 _GL_CXXALIASWARN (modf
);
1591 #elif defined GNULIB_POSIXCHECK
1593 # if HAVE_RAW_DECL_MODF
1594 _GL_WARN_ON_USE (modf
, "modf has portability problems - "
1595 "use gnulib module modf for portability");
1600 # if @REPLACE_MODFL@
1601 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1603 # define modfl rpl_modfl
1605 _GL_FUNCDECL_RPL (modfl
, long double, (long double x
, long double *iptr
)
1606 _GL_ARG_NONNULL ((2)));
1607 _GL_CXXALIAS_RPL (modfl
, long double, (long double x
, long double *iptr
));
1611 _GL_FUNCDECL_SYS (modfl
, long double, (long double x
, long double *iptr
)
1612 _GL_ARG_NONNULL ((2)));
1614 _GL_CXXALIAS_SYS (modfl
, long double, (long double x
, long double *iptr
));
1616 _GL_CXXALIASWARN (modfl
);
1617 #elif defined GNULIB_POSIXCHECK
1619 # if HAVE_RAW_DECL_MODFL
1620 _GL_WARN_ON_USE (modfl
, "modfl is unportable - "
1621 "use gnulib module modfl for portability");
1629 _GL_FUNCDECL_SYS (powf
, float, (float x
, float y
));
1631 _GL_CXXALIAS_SYS (powf
, float, (float x
, float y
));
1632 _GL_CXXALIASWARN (powf
);
1633 #elif defined GNULIB_POSIXCHECK
1635 # if HAVE_RAW_DECL_POWF
1636 _GL_WARN_ON_USE (powf
, "powf is unportable - "
1637 "use gnulib module powf for portability");
1642 #if @GNULIB_REMAINDERF@
1643 # if @REPLACE_REMAINDERF@
1644 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1646 # define remainderf rpl_remainderf
1648 _GL_FUNCDECL_RPL (remainderf
, float, (float x
, float y
));
1649 _GL_CXXALIAS_RPL (remainderf
, float, (float x
, float y
));
1651 # if !@HAVE_REMAINDERF@
1652 _GL_FUNCDECL_SYS (remainderf
, float, (float x
, float y
));
1654 _GL_CXXALIAS_SYS (remainderf
, float, (float x
, float y
));
1656 _GL_CXXALIASWARN (remainderf
);
1657 #elif defined GNULIB_POSIXCHECK
1659 # if HAVE_RAW_DECL_REMAINDERF
1660 _GL_WARN_ON_USE (remainderf
, "remainderf is unportable - "
1661 "use gnulib module remainderf for portability");
1665 #if @GNULIB_REMAINDER@
1666 # if @REPLACE_REMAINDER@
1667 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1669 # define remainder rpl_remainder
1671 _GL_FUNCDECL_RPL (remainder
, double, (double x
, double y
));
1672 _GL_CXXALIAS_RPL (remainder
, double, (double x
, double y
));
1674 # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
1675 _GL_FUNCDECL_SYS (remainder
, double, (double x
, double y
));
1677 _GL_CXXALIAS_SYS (remainder
, double, (double x
, double y
));
1679 _GL_CXXALIASWARN (remainder
);
1680 #elif defined GNULIB_POSIXCHECK
1682 # if HAVE_RAW_DECL_REMAINDER
1683 _GL_WARN_ON_USE (remainder
, "remainder is unportable - "
1684 "use gnulib module remainder for portability");
1688 #if @GNULIB_REMAINDERL@
1689 # if @REPLACE_REMAINDERL@
1690 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1692 # define remainderl rpl_remainderl
1694 _GL_FUNCDECL_RPL (remainderl
, long double, (long double x
, long double y
));
1695 _GL_CXXALIAS_RPL (remainderl
, long double, (long double x
, long double y
));
1697 # if !@HAVE_DECL_REMAINDERL@
1699 _GL_FUNCDECL_SYS (remainderl
, long double, (long double x
, long double y
));
1701 _GL_CXXALIAS_SYS (remainderl
, long double, (long double x
, long double y
));
1703 _GL_CXXALIASWARN (remainderl
);
1704 #elif defined GNULIB_POSIXCHECK
1706 # if HAVE_RAW_DECL_REMAINDERL
1707 _GL_WARN_ON_USE (remainderl
, "remainderl is unportable - "
1708 "use gnulib module remainderl for portability");
1714 # if !@HAVE_DECL_RINTF@
1715 _GL_FUNCDECL_SYS (rintf
, float, (float x
));
1717 _GL_CXXALIAS_SYS (rintf
, float, (float x
));
1718 _GL_CXXALIASWARN (rintf
);
1719 #elif defined GNULIB_POSIXCHECK
1721 # if HAVE_RAW_DECL_RINTF
1722 _GL_WARN_ON_USE (rintf
, "rintf is unportable - "
1723 "use gnulib module rintf for portability");
1729 _GL_FUNCDECL_SYS (rint
, double, (double x
));
1731 _GL_CXXALIAS_SYS (rint
, double, (double x
));
1732 _GL_CXXALIASWARN (rint
);
1733 #elif defined GNULIB_POSIXCHECK
1735 # if HAVE_RAW_DECL_RINT
1736 _GL_WARN_ON_USE (rint
, "rint is unportable - "
1737 "use gnulib module rint for portability");
1743 _GL_FUNCDECL_SYS (rintl
, long double, (long double x
));
1745 _GL_CXXALIAS_SYS (rintl
, long double, (long double x
));
1746 _GL_CXXALIASWARN (rintl
);
1747 #elif defined GNULIB_POSIXCHECK
1749 # if HAVE_RAW_DECL_RINTL
1750 _GL_WARN_ON_USE (rintl
, "rintl is unportable - "
1751 "use gnulib module rintl for portability");
1757 # if @REPLACE_ROUNDF@
1758 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1760 # define roundf rpl_roundf
1762 _GL_FUNCDECL_RPL (roundf
, float, (float x
));
1763 _GL_CXXALIAS_RPL (roundf
, float, (float x
));
1765 # if !@HAVE_DECL_ROUNDF@
1766 _GL_FUNCDECL_SYS (roundf
, float, (float x
));
1768 _GL_CXXALIAS_SYS (roundf
, float, (float x
));
1770 _GL_CXXALIASWARN (roundf
);
1771 #elif defined GNULIB_POSIXCHECK
1773 # if HAVE_RAW_DECL_ROUNDF
1774 _GL_WARN_ON_USE (roundf
, "roundf is unportable - "
1775 "use gnulib module roundf for portability");
1780 # if @REPLACE_ROUND@
1781 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1783 # define round rpl_round
1785 _GL_FUNCDECL_RPL (round
, double, (double x
));
1786 _GL_CXXALIAS_RPL (round
, double, (double x
));
1788 # if !@HAVE_DECL_ROUND@
1789 _GL_FUNCDECL_SYS (round
, double, (double x
));
1791 _GL_CXXALIAS_SYS (round
, double, (double x
));
1793 _GL_CXXALIASWARN (round
);
1794 #elif defined GNULIB_POSIXCHECK
1796 # if HAVE_RAW_DECL_ROUND
1797 _GL_WARN_ON_USE (round
, "round is unportable - "
1798 "use gnulib module round for portability");
1803 # if @REPLACE_ROUNDL@
1804 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1806 # define roundl rpl_roundl
1808 _GL_FUNCDECL_RPL (roundl
, long double, (long double x
));
1809 _GL_CXXALIAS_RPL (roundl
, long double, (long double x
));
1811 # if !@HAVE_DECL_ROUNDL@
1813 _GL_FUNCDECL_SYS (roundl
, long double, (long double x
));
1815 _GL_CXXALIAS_SYS (roundl
, long double, (long double x
));
1817 _GL_CXXALIASWARN (roundl
);
1818 #elif defined GNULIB_POSIXCHECK
1820 # if HAVE_RAW_DECL_ROUNDL
1821 _GL_WARN_ON_USE (roundl
, "roundl is unportable - "
1822 "use gnulib module roundl for portability");
1830 _GL_FUNCDECL_SYS (sinf
, float, (float x
));
1832 _GL_CXXALIAS_SYS (sinf
, float, (float x
));
1833 _GL_CXXALIASWARN (sinf
);
1834 #elif defined GNULIB_POSIXCHECK
1836 # if HAVE_RAW_DECL_SINF
1837 _GL_WARN_ON_USE (sinf
, "sinf is unportable - "
1838 "use gnulib module sinf for portability");
1843 # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
1845 _GL_FUNCDECL_SYS (sinl
, long double, (long double x
));
1847 _GL_CXXALIAS_SYS (sinl
, long double, (long double x
));
1848 _GL_CXXALIASWARN (sinl
);
1849 #elif defined GNULIB_POSIXCHECK
1851 # if HAVE_RAW_DECL_SINL
1852 _GL_WARN_ON_USE (sinl
, "sinl is unportable - "
1853 "use gnulib module sinl for portability");
1861 _GL_FUNCDECL_SYS (sinhf
, float, (float x
));
1863 _GL_CXXALIAS_SYS (sinhf
, float, (float x
));
1864 _GL_CXXALIASWARN (sinhf
);
1865 #elif defined GNULIB_POSIXCHECK
1867 # if HAVE_RAW_DECL_SINHF
1868 _GL_WARN_ON_USE (sinhf
, "sinhf is unportable - "
1869 "use gnulib module sinhf for portability");
1877 _GL_FUNCDECL_SYS (sqrtf
, float, (float x
));
1879 _GL_CXXALIAS_SYS (sqrtf
, float, (float x
));
1880 _GL_CXXALIASWARN (sqrtf
);
1881 #elif defined GNULIB_POSIXCHECK
1883 # if HAVE_RAW_DECL_SQRTF
1884 _GL_WARN_ON_USE (sqrtf
, "sqrtf is unportable - "
1885 "use gnulib module sqrtf for portability");
1890 # if @REPLACE_SQRTL@
1891 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1893 # define sqrtl rpl_sqrtl
1895 _GL_FUNCDECL_RPL (sqrtl
, long double, (long double x
));
1896 _GL_CXXALIAS_RPL (sqrtl
, long double, (long double x
));
1898 # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
1900 _GL_FUNCDECL_SYS (sqrtl
, long double, (long double x
));
1902 _GL_CXXALIAS_SYS (sqrtl
, long double, (long double x
));
1904 _GL_CXXALIASWARN (sqrtl
);
1905 #elif defined GNULIB_POSIXCHECK
1907 # if HAVE_RAW_DECL_SQRTL
1908 _GL_WARN_ON_USE (sqrtl
, "sqrtl is unportable - "
1909 "use gnulib module sqrtl for portability");
1917 _GL_FUNCDECL_SYS (tanf
, float, (float x
));
1919 _GL_CXXALIAS_SYS (tanf
, float, (float x
));
1920 _GL_CXXALIASWARN (tanf
);
1921 #elif defined GNULIB_POSIXCHECK
1923 # if HAVE_RAW_DECL_TANF
1924 _GL_WARN_ON_USE (tanf
, "tanf is unportable - "
1925 "use gnulib module tanf for portability");
1930 # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
1932 _GL_FUNCDECL_SYS (tanl
, long double, (long double x
));
1934 _GL_CXXALIAS_SYS (tanl
, long double, (long double x
));
1935 _GL_CXXALIASWARN (tanl
);
1936 #elif defined GNULIB_POSIXCHECK
1938 # if HAVE_RAW_DECL_TANL
1939 _GL_WARN_ON_USE (tanl
, "tanl is unportable - "
1940 "use gnulib module tanl for portability");
1948 _GL_FUNCDECL_SYS (tanhf
, float, (float x
));
1950 _GL_CXXALIAS_SYS (tanhf
, float, (float x
));
1951 _GL_CXXALIASWARN (tanhf
);
1952 #elif defined GNULIB_POSIXCHECK
1954 # if HAVE_RAW_DECL_TANHF
1955 _GL_WARN_ON_USE (tanhf
, "tanhf is unportable - "
1956 "use gnulib module tanhf for portability");
1962 # if @REPLACE_TRUNCF@
1963 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1965 # define truncf rpl_truncf
1967 _GL_FUNCDECL_RPL (truncf
, float, (float x
));
1968 _GL_CXXALIAS_RPL (truncf
, float, (float x
));
1970 # if !@HAVE_DECL_TRUNCF@
1971 _GL_FUNCDECL_SYS (truncf
, float, (float x
));
1973 _GL_CXXALIAS_SYS (truncf
, float, (float x
));
1975 _GL_CXXALIASWARN (truncf
);
1976 #elif defined GNULIB_POSIXCHECK
1978 # if HAVE_RAW_DECL_TRUNCF
1979 _GL_WARN_ON_USE (truncf
, "truncf is unportable - "
1980 "use gnulib module truncf for portability");
1985 # if @REPLACE_TRUNC@
1986 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1988 # define trunc rpl_trunc
1990 _GL_FUNCDECL_RPL (trunc
, double, (double x
));
1991 _GL_CXXALIAS_RPL (trunc
, double, (double x
));
1993 # if !@HAVE_DECL_TRUNC@
1994 _GL_FUNCDECL_SYS (trunc
, double, (double x
));
1996 _GL_CXXALIAS_SYS (trunc
, double, (double x
));
1998 _GL_CXXALIASWARN (trunc
);
1999 #elif defined GNULIB_POSIXCHECK
2001 # if HAVE_RAW_DECL_TRUNC
2002 _GL_WARN_ON_USE (trunc
, "trunc is unportable - "
2003 "use gnulib module trunc for portability");
2008 # if @REPLACE_TRUNCL@
2009 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2011 # define truncl rpl_truncl
2013 _GL_FUNCDECL_RPL (truncl
, long double, (long double x
));
2014 _GL_CXXALIAS_RPL (truncl
, long double, (long double x
));
2016 # if !@HAVE_DECL_TRUNCL@
2017 _GL_FUNCDECL_SYS (truncl
, long double, (long double x
));
2019 _GL_CXXALIAS_SYS (truncl
, long double, (long double x
));
2021 _GL_CXXALIASWARN (truncl
);
2022 #elif defined GNULIB_POSIXCHECK
2024 # if HAVE_RAW_DECL_TRUNCL
2025 _GL_WARN_ON_USE (truncl
, "truncl is unportable - "
2026 "use gnulib module truncl for portability");
2031 /* Definitions of function-like macros come here, after the function
2035 #if @GNULIB_ISFINITE@
2036 # if @REPLACE_ISFINITE@
2037 _GL_EXTERN_C
int gl_isfinitef (float x
);
2038 _GL_EXTERN_C
int gl_isfinited (double x
);
2039 _GL_EXTERN_C
int gl_isfinitel (long double x
);
2041 # define isfinite(x) \
2042 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
2043 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
2048 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite
)
2050 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
)
2053 #elif defined GNULIB_POSIXCHECK
2054 # if defined isfinite
2055 _GL_WARN_REAL_FLOATING_DECL (isfinite
);
2057 # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
2063 # if @REPLACE_ISINF@
2064 _GL_EXTERN_C
int gl_isinff (float x
);
2065 _GL_EXTERN_C
int gl_isinfd (double x
);
2066 _GL_EXTERN_C
int gl_isinfl (long double x
);
2069 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
2070 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
2075 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf
)
2077 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
)
2080 #elif defined GNULIB_POSIXCHECK
2082 _GL_WARN_REAL_FLOATING_DECL (isinf
);
2084 # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
2090 /* Test for NaN for 'float' numbers. */
2092 /* The original <math.h> included above provides a declaration of isnan macro
2093 or (older) isnanf function. */
2095 /* GCC 4.0 and newer provides three built-ins for isnan. */
2097 # define isnanf(x) __builtin_isnanf ((float)(x))
2098 # elif defined isnan
2100 # define isnanf(x) isnan ((float)(x))
2103 /* Test whether X is a NaN. */
2105 # define isnanf rpl_isnanf
2106 _GL_EXTERN_C
int isnanf (float x
);
2111 /* Test for NaN for 'double' numbers.
2112 This function is a gnulib extension, unlike isnan() which applied only
2113 to 'double' numbers earlier but now is a type-generic macro. */
2115 /* The original <math.h> included above provides a declaration of isnan
2118 /* GCC 4.0 and newer provides three built-ins for isnan. */
2120 # define isnand(x) __builtin_isnan ((double)(x))
2123 # define isnand(x) isnan ((double)(x))
2126 /* Test whether X is a NaN. */
2128 # define isnand rpl_isnand
2129 _GL_EXTERN_C
int isnand (double x
);
2134 /* Test for NaN for 'long double' numbers. */
2136 /* The original <math.h> included above provides a declaration of isnan
2137 macro or (older) isnanl function. */
2139 /* GCC 4.0 and newer provides three built-ins for isnan. */
2141 # define isnanl(x) __builtin_isnanl ((long double)(x))
2142 # elif defined isnan
2144 # define isnanl(x) isnan ((long double)(x))
2147 /* Test whether X is a NaN. */
2149 # define isnanl rpl_isnanl
2150 _GL_EXTERN_C
int isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2154 /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
2156 # if @REPLACE_ISNAN@
2157 /* We can't just use the isnanf macro (e.g.) as exposed by
2158 isnanf.h (e.g.) here, because those may end up being macros
2159 that recursively expand back to isnan. So use the gnulib
2160 replacements for them directly. */
2161 # if @HAVE_ISNANF@ && __GNUC__ >= 4
2162 # define gl_isnan_f(x) __builtin_isnanf ((float)(x))
2164 _GL_EXTERN_C
int rpl_isnanf (float x
);
2165 # define gl_isnan_f(x) rpl_isnanf (x)
2167 # if @HAVE_ISNAND@ && __GNUC__ >= 4
2168 # define gl_isnan_d(x) __builtin_isnan ((double)(x))
2170 _GL_EXTERN_C
int rpl_isnand (double x
);
2171 # define gl_isnan_d(x) rpl_isnand (x)
2173 # if @HAVE_ISNANL@ && __GNUC__ >= 4
2174 # define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
2176 _GL_EXTERN_C
int rpl_isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2177 # define gl_isnan_l(x) rpl_isnanl (x)
2181 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
2182 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
2184 # elif __GNUC__ >= 4
2187 (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \
2188 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
2189 __builtin_isnanf ((float)(x)))
2193 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan
)
2195 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
)
2198 /* Ensure isnan is a macro. */
2200 # define isnan isnan
2203 #elif defined GNULIB_POSIXCHECK
2205 _GL_WARN_REAL_FLOATING_DECL (isnan
);
2207 # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
2212 #if @GNULIB_SIGNBIT@
2213 # if (@REPLACE_SIGNBIT_USING_GCC@ \
2214 && (!defined __cplusplus || __cplusplus < 201103))
2216 /* GCC 4.0 and newer provides three built-ins for signbit. */
2217 # define signbit(x) \
2218 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
2219 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
2220 __builtin_signbitf (x))
2222 # if @REPLACE_SIGNBIT@
2224 _GL_EXTERN_C
int gl_signbitf (float arg
);
2225 _GL_EXTERN_C
int gl_signbitd (double arg
);
2226 _GL_EXTERN_C
int gl_signbitl (long double arg
);
2227 # if __GNUC__ >= 2 && !defined __STRICT_ANSI__
2228 # define _GL_NUM_UINT_WORDS(type) \
2229 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
2230 # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
2231 # define gl_signbitf_OPTIMIZED_MACRO
2232 # define gl_signbitf(arg) \
2233 ({ union { float _value; \
2234 unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
2236 _m._value = (arg); \
2237 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
2240 # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
2241 # define gl_signbitd_OPTIMIZED_MACRO
2242 # define gl_signbitd(arg) \
2243 ({ union { double _value; \
2244 unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
2246 _m._value = (arg); \
2247 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
2250 # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
2251 # define gl_signbitl_OPTIMIZED_MACRO
2252 # define gl_signbitl(arg) \
2253 ({ union { long double _value; \
2254 unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
2256 _m._value = (arg); \
2257 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
2261 # define signbit(x) \
2262 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
2263 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
2268 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit
)
2270 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
)
2273 #elif defined GNULIB_POSIXCHECK
2274 # if defined signbit
2275 _GL_WARN_REAL_FLOATING_DECL (signbit
);
2277 # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
2281 _GL_INLINE_HEADER_END
2283 #endif /* _@GUARD_PREFIX@_MATH_H */
2284 #endif /* _@GUARD_PREFIX@_MATH_H */
This page took 0.07703 seconds and 4 git commands to generate.