1 /* A GNU-like <math.h>.
3 Copyright (C) 2002-2003, 2007-2015 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)
409 # define ceil rpl_ceil
411 _GL_FUNCDECL_RPL (ceil
, double, (double x
));
412 _GL_CXXALIAS_RPL (ceil
, double, (double x
));
414 _GL_CXXALIAS_SYS (ceil
, double, (double x
));
416 _GL_CXXALIASWARN (ceil
);
421 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
423 # define ceill rpl_ceill
425 _GL_FUNCDECL_RPL (ceill
, long double, (long double x
));
426 _GL_CXXALIAS_RPL (ceill
, long double, (long double x
));
428 # if !@HAVE_DECL_CEILL@
430 _GL_FUNCDECL_SYS (ceill
, long double, (long double x
));
432 _GL_CXXALIAS_SYS (ceill
, long double, (long double x
));
434 _GL_CXXALIASWARN (ceill
);
435 #elif defined GNULIB_POSIXCHECK
437 # if HAVE_RAW_DECL_CEILL
438 _GL_WARN_ON_USE (ceill
, "ceill is unportable - "
439 "use gnulib module ceill for portability");
444 #if @GNULIB_COPYSIGNF@
445 # if !@HAVE_DECL_COPYSIGNF@
446 _GL_FUNCDECL_SYS (copysignf
, float, (float x
, float y
));
448 _GL_CXXALIAS_SYS (copysignf
, float, (float x
, float y
));
449 _GL_CXXALIASWARN (copysignf
);
450 #elif defined GNULIB_POSIXCHECK
452 # if HAVE_RAW_DECL_COPYSIGNF
453 _GL_WARN_ON_USE (copysignf
, "copysignf is unportable - "
454 "use gnulib module copysignf for portability");
458 #if @GNULIB_COPYSIGN@
459 # if !@HAVE_COPYSIGN@
460 _GL_FUNCDECL_SYS (copysign
, double, (double x
, double y
));
462 _GL_CXXALIAS_SYS (copysign
, double, (double x
, double y
));
463 _GL_CXXALIASWARN (copysign
);
464 #elif defined GNULIB_POSIXCHECK
466 # if HAVE_RAW_DECL_COPYSIGN
467 _GL_WARN_ON_USE (copysign
, "copysign is unportable - "
468 "use gnulib module copysign for portability");
472 #if @GNULIB_COPYSIGNL@
473 # if !@HAVE_COPYSIGNL@
474 _GL_FUNCDECL_SYS (copysignl
, long double, (long double x
, long double y
));
476 _GL_CXXALIAS_SYS (copysignl
, long double, (long double x
, long double y
));
477 _GL_CXXALIASWARN (copysignl
);
478 #elif defined GNULIB_POSIXCHECK
480 # if HAVE_RAW_DECL_COPYSIGNL
481 _GL_WARN_ON_USE (copysign
, "copysignl is unportable - "
482 "use gnulib module copysignl for portability");
490 _GL_FUNCDECL_SYS (cosf
, float, (float x
));
492 _GL_CXXALIAS_SYS (cosf
, float, (float x
));
493 _GL_CXXALIASWARN (cosf
);
494 #elif defined GNULIB_POSIXCHECK
496 # if HAVE_RAW_DECL_COSF
497 _GL_WARN_ON_USE (cosf
, "cosf is unportable - "
498 "use gnulib module cosf for portability");
503 # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
505 _GL_FUNCDECL_SYS (cosl
, long double, (long double x
));
507 _GL_CXXALIAS_SYS (cosl
, long double, (long double x
));
508 _GL_CXXALIASWARN (cosl
);
509 #elif defined GNULIB_POSIXCHECK
511 # if HAVE_RAW_DECL_COSL
512 _GL_WARN_ON_USE (cosl
, "cosl is unportable - "
513 "use gnulib module cosl for portability");
521 _GL_FUNCDECL_SYS (coshf
, float, (float x
));
523 _GL_CXXALIAS_SYS (coshf
, float, (float x
));
524 _GL_CXXALIASWARN (coshf
);
525 #elif defined GNULIB_POSIXCHECK
527 # if HAVE_RAW_DECL_COSHF
528 _GL_WARN_ON_USE (coshf
, "coshf is unportable - "
529 "use gnulib module coshf for portability");
537 _GL_FUNCDECL_SYS (expf
, float, (float x
));
539 _GL_CXXALIAS_SYS (expf
, float, (float x
));
540 _GL_CXXALIASWARN (expf
);
541 #elif defined GNULIB_POSIXCHECK
543 # if HAVE_RAW_DECL_EXPF
544 _GL_WARN_ON_USE (expf
, "expf is unportable - "
545 "use gnulib module expf for portability");
550 # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
552 _GL_FUNCDECL_SYS (expl
, long double, (long double x
));
554 _GL_CXXALIAS_SYS (expl
, long double, (long double x
));
555 _GL_CXXALIASWARN (expl
);
556 #elif defined GNULIB_POSIXCHECK
558 # if HAVE_RAW_DECL_EXPL
559 _GL_WARN_ON_USE (expl
, "expl is unportable - "
560 "use gnulib module expl for portability");
566 # if !@HAVE_DECL_EXP2F@
567 _GL_FUNCDECL_SYS (exp2f
, float, (float x
));
569 _GL_CXXALIAS_SYS (exp2f
, float, (float x
));
570 _GL_CXXALIASWARN (exp2f
);
571 #elif defined GNULIB_POSIXCHECK
573 # if HAVE_RAW_DECL_EXP2F
574 _GL_WARN_ON_USE (exp2f
, "exp2f is unportable - "
575 "use gnulib module exp2f for portability");
581 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
583 # define exp2 rpl_exp2
585 _GL_FUNCDECL_RPL (exp2
, double, (double x
));
586 _GL_CXXALIAS_RPL (exp2
, double, (double x
));
588 # if !@HAVE_DECL_EXP2@
589 _GL_FUNCDECL_SYS (exp2
, double, (double x
));
591 _GL_CXXALIAS_SYS (exp2
, double, (double x
));
593 _GL_CXXALIASWARN (exp2
);
594 #elif defined GNULIB_POSIXCHECK
596 # if HAVE_RAW_DECL_EXP2
597 _GL_WARN_ON_USE (exp2
, "exp2 is unportable - "
598 "use gnulib module exp2 for portability");
604 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
606 # define exp2l rpl_exp2l
608 _GL_FUNCDECL_RPL (exp2l
, long double, (long double x
));
609 _GL_CXXALIAS_RPL (exp2l
, long double, (long double x
));
611 # if !@HAVE_DECL_EXP2L@
613 _GL_FUNCDECL_SYS (exp2l
, long double, (long double x
));
615 _GL_CXXALIAS_SYS (exp2l
, long double, (long double x
));
617 _GL_CXXALIASWARN (exp2l
);
618 #elif defined GNULIB_POSIXCHECK
620 # if HAVE_RAW_DECL_EXP2L
621 _GL_WARN_ON_USE (exp2l
, "exp2l is unportable - "
622 "use gnulib module exp2l for portability");
628 # if @REPLACE_EXPM1F@
629 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
631 # define expm1f rpl_expm1f
633 _GL_FUNCDECL_RPL (expm1f
, float, (float x
));
634 _GL_CXXALIAS_RPL (expm1f
, float, (float x
));
637 _GL_FUNCDECL_SYS (expm1f
, float, (float x
));
639 _GL_CXXALIAS_SYS (expm1f
, float, (float x
));
641 _GL_CXXALIASWARN (expm1f
);
642 #elif defined GNULIB_POSIXCHECK
644 # if HAVE_RAW_DECL_EXPM1F
645 _GL_WARN_ON_USE (expm1f
, "expm1f is unportable - "
646 "use gnulib module expm1f for portability");
652 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
654 # define expm1 rpl_expm1
656 _GL_FUNCDECL_RPL (expm1
, double, (double x
));
657 _GL_CXXALIAS_RPL (expm1
, double, (double x
));
660 _GL_FUNCDECL_SYS (expm1
, double, (double x
));
662 _GL_CXXALIAS_SYS (expm1
, double, (double x
));
664 _GL_CXXALIASWARN (expm1
);
665 #elif defined GNULIB_POSIXCHECK
667 # if HAVE_RAW_DECL_EXPM1
668 _GL_WARN_ON_USE (expm1
, "expm1 is unportable - "
669 "use gnulib module expm1 for portability");
674 # if !@HAVE_DECL_EXPM1L@
676 _GL_FUNCDECL_SYS (expm1l
, long double, (long double x
));
678 _GL_CXXALIAS_SYS (expm1l
, long double, (long double x
));
679 _GL_CXXALIASWARN (expm1l
);
680 #elif defined GNULIB_POSIXCHECK
682 # if HAVE_RAW_DECL_EXPM1L
683 _GL_WARN_ON_USE (expm1l
, "expm1l is unportable - "
684 "use gnulib module expm1l for portability");
692 _GL_FUNCDECL_SYS (fabsf
, float, (float x
));
694 _GL_CXXALIAS_SYS (fabsf
, float, (float x
));
695 _GL_CXXALIASWARN (fabsf
);
696 #elif defined GNULIB_POSIXCHECK
698 # if HAVE_RAW_DECL_FABSF
699 _GL_WARN_ON_USE (fabsf
, "fabsf is unportable - "
700 "use gnulib module fabsf for portability");
706 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
708 # define fabsl rpl_fabsl
710 _GL_FUNCDECL_RPL (fabsl
, long double, (long double x
));
711 _GL_CXXALIAS_RPL (fabsl
, long double, (long double x
));
715 _GL_FUNCDECL_SYS (fabsl
, long double, (long double x
));
717 _GL_CXXALIAS_SYS (fabsl
, long double, (long double x
));
719 _GL_CXXALIASWARN (fabsl
);
720 #elif defined GNULIB_POSIXCHECK
722 # if HAVE_RAW_DECL_FABSL
723 _GL_WARN_ON_USE (fabsl
, "fabsl is unportable - "
724 "use gnulib module fabsl for portability");
730 # if @REPLACE_FLOORF@
731 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
733 # define floorf rpl_floorf
735 _GL_FUNCDECL_RPL (floorf
, float, (float x
));
736 _GL_CXXALIAS_RPL (floorf
, float, (float x
));
738 # if !@HAVE_DECL_FLOORF@
740 _GL_FUNCDECL_SYS (floorf
, float, (float x
));
742 _GL_CXXALIAS_SYS (floorf
, float, (float x
));
744 _GL_CXXALIASWARN (floorf
);
745 #elif defined GNULIB_POSIXCHECK
747 # if HAVE_RAW_DECL_FLOORF
748 _GL_WARN_ON_USE (floorf
, "floorf is unportable - "
749 "use gnulib module floorf for portability");
755 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
756 # define floor rpl_floor
758 _GL_FUNCDECL_RPL (floor
, double, (double x
));
759 _GL_CXXALIAS_RPL (floor
, double, (double x
));
761 _GL_CXXALIAS_SYS (floor
, double, (double x
));
763 _GL_CXXALIASWARN (floor
);
767 # if @REPLACE_FLOORL@
768 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
770 # define floorl rpl_floorl
772 _GL_FUNCDECL_RPL (floorl
, long double, (long double x
));
773 _GL_CXXALIAS_RPL (floorl
, long double, (long double x
));
775 # if !@HAVE_DECL_FLOORL@
777 _GL_FUNCDECL_SYS (floorl
, long double, (long double x
));
779 _GL_CXXALIAS_SYS (floorl
, long double, (long double x
));
781 _GL_CXXALIASWARN (floorl
);
782 #elif defined GNULIB_POSIXCHECK
784 # if HAVE_RAW_DECL_FLOORL
785 _GL_WARN_ON_USE (floorl
, "floorl is unportable - "
786 "use gnulib module floorl for portability");
793 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
795 # define fmaf rpl_fmaf
797 _GL_FUNCDECL_RPL (fmaf
, float, (float x
, float y
, float z
));
798 _GL_CXXALIAS_RPL (fmaf
, float, (float x
, float y
, float z
));
801 _GL_FUNCDECL_SYS (fmaf
, float, (float x
, float y
, float z
));
803 _GL_CXXALIAS_SYS (fmaf
, float, (float x
, float y
, float z
));
805 _GL_CXXALIASWARN (fmaf
);
806 #elif defined GNULIB_POSIXCHECK
808 # if HAVE_RAW_DECL_FMAF
809 _GL_WARN_ON_USE (fmaf
, "fmaf is unportable - "
810 "use gnulib module fmaf for portability");
816 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
820 _GL_FUNCDECL_RPL (fma
, double, (double x
, double y
, double z
));
821 _GL_CXXALIAS_RPL (fma
, double, (double x
, double y
, double z
));
824 _GL_FUNCDECL_SYS (fma
, double, (double x
, double y
, double z
));
826 _GL_CXXALIAS_SYS (fma
, double, (double x
, double y
, double z
));
828 _GL_CXXALIASWARN (fma
);
829 #elif defined GNULIB_POSIXCHECK
831 # if HAVE_RAW_DECL_FMA
832 _GL_WARN_ON_USE (fma
, "fma is unportable - "
833 "use gnulib module fma for portability");
839 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
841 # define fmal rpl_fmal
843 _GL_FUNCDECL_RPL (fmal
, long double,
844 (long double x
, long double y
, long double z
));
845 _GL_CXXALIAS_RPL (fmal
, long double,
846 (long double x
, long double y
, long double z
));
850 _GL_FUNCDECL_SYS (fmal
, long double,
851 (long double x
, long double y
, long double z
));
853 _GL_CXXALIAS_SYS (fmal
, long double,
854 (long double x
, long double y
, long double z
));
856 _GL_CXXALIASWARN (fmal
);
857 #elif defined GNULIB_POSIXCHECK
859 # if HAVE_RAW_DECL_FMAL
860 _GL_WARN_ON_USE (fmal
, "fmal is unportable - "
861 "use gnulib module fmal for portability");
868 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
870 # define fmodf rpl_fmodf
872 _GL_FUNCDECL_RPL (fmodf
, float, (float x
, float y
));
873 _GL_CXXALIAS_RPL (fmodf
, float, (float x
, float y
));
877 _GL_FUNCDECL_SYS (fmodf
, float, (float x
, float y
));
879 _GL_CXXALIAS_SYS (fmodf
, float, (float x
, float y
));
881 _GL_CXXALIASWARN (fmodf
);
882 #elif defined GNULIB_POSIXCHECK
884 # if HAVE_RAW_DECL_FMODF
885 _GL_WARN_ON_USE (fmodf
, "fmodf is unportable - "
886 "use gnulib module fmodf for portability");
892 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
894 # define fmod rpl_fmod
896 _GL_FUNCDECL_RPL (fmod
, double, (double x
, double y
));
897 _GL_CXXALIAS_RPL (fmod
, double, (double x
, double y
));
899 _GL_CXXALIAS_SYS (fmod
, double, (double x
, double y
));
901 _GL_CXXALIASWARN (fmod
);
902 #elif defined GNULIB_POSIXCHECK
904 # if HAVE_RAW_DECL_FMOD
905 _GL_WARN_ON_USE (fmod
, "fmod has portability problems - "
906 "use gnulib module fmod for portability");
912 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
914 # define fmodl rpl_fmodl
916 _GL_FUNCDECL_RPL (fmodl
, long double, (long double x
, long double y
));
917 _GL_CXXALIAS_RPL (fmodl
, long double, (long double x
, long double y
));
921 _GL_FUNCDECL_SYS (fmodl
, long double, (long double x
, long double y
));
923 _GL_CXXALIAS_SYS (fmodl
, long double, (long double x
, long double y
));
925 _GL_CXXALIASWARN (fmodl
);
926 #elif defined GNULIB_POSIXCHECK
928 # if HAVE_RAW_DECL_FMODL
929 _GL_WARN_ON_USE (fmodl
, "fmodl is unportable - "
930 "use gnulib module fmodl for portability");
938 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
939 If x is zero: mantissa = x, exp = 0.
940 If x is infinite or NaN: mantissa = x, exp unspecified.
941 Store exp in *EXPPTR and return mantissa. */
943 # if @REPLACE_FREXPF@
944 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
946 # define frexpf rpl_frexpf
948 _GL_FUNCDECL_RPL (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
949 _GL_CXXALIAS_RPL (frexpf
, float, (float x
, int *expptr
));
953 _GL_FUNCDECL_SYS (frexpf
, float, (float x
, int *expptr
) _GL_ARG_NONNULL ((2)));
955 _GL_CXXALIAS_SYS (frexpf
, float, (float x
, int *expptr
));
957 _GL_CXXALIASWARN (frexpf
);
958 #elif defined GNULIB_POSIXCHECK
960 # if HAVE_RAW_DECL_FREXPF
961 _GL_WARN_ON_USE (frexpf
, "frexpf is unportable - "
962 "use gnulib module frexpf for portability");
969 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
970 If x is zero: mantissa = x, exp = 0.
971 If x is infinite or NaN: mantissa = x, exp unspecified.
972 Store exp in *EXPPTR and return mantissa. */
975 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
976 # define frexp rpl_frexp
978 _GL_FUNCDECL_RPL (frexp
, double, (double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
979 _GL_CXXALIAS_RPL (frexp
, double, (double x
, int *expptr
));
981 _GL_CXXALIAS_SYS (frexp
, double, (double x
, int *expptr
));
983 _GL_CXXALIASWARN (frexp
);
984 #elif defined GNULIB_POSIXCHECK
986 /* Assume frexp is always declared. */
987 _GL_WARN_ON_USE (frexp
, "frexp is unportable - "
988 "use gnulib module frexp for portability");
994 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
995 If x is zero: mantissa = x, exp = 0.
996 If x is infinite or NaN: mantissa = x, exp unspecified.
997 Store exp in *EXPPTR and return mantissa. */
998 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
999 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1001 # define frexpl rpl_frexpl
1003 _GL_FUNCDECL_RPL (frexpl
, long double,
1004 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1005 _GL_CXXALIAS_RPL (frexpl
, long double, (long double x
, int *expptr
));
1007 # if !@HAVE_DECL_FREXPL@
1008 _GL_FUNCDECL_SYS (frexpl
, long double,
1009 (long double x
, int *expptr
) _GL_ARG_NONNULL ((2)));
1011 # if @GNULIB_FREXPL@
1012 _GL_CXXALIAS_SYS (frexpl
, long double, (long double x
, int *expptr
));
1015 #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
1016 _GL_CXXALIASWARN (frexpl
);
1018 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
1020 # if HAVE_RAW_DECL_FREXPL
1021 _GL_WARN_ON_USE (frexpl
, "frexpl is unportable - "
1022 "use gnulib module frexpl for portability");
1027 /* Return sqrt(x^2+y^2). */
1029 # if @REPLACE_HYPOTF@
1030 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1032 # define hypotf rpl_hypotf
1034 _GL_FUNCDECL_RPL (hypotf
, float, (float x
, float y
));
1035 _GL_CXXALIAS_RPL (hypotf
, float, (float x
, float y
));
1038 _GL_FUNCDECL_SYS (hypotf
, float, (float x
, float y
));
1040 _GL_CXXALIAS_SYS (hypotf
, float, (float x
, float y
));
1042 _GL_CXXALIASWARN (hypotf
);
1043 #elif defined GNULIB_POSIXCHECK
1045 # if HAVE_RAW_DECL_HYPOTF
1046 _GL_WARN_ON_USE (hypotf
, "hypotf is unportable - "
1047 "use gnulib module hypotf for portability");
1051 /* Return sqrt(x^2+y^2). */
1053 # if @REPLACE_HYPOT@
1054 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1056 # define hypot rpl_hypot
1058 _GL_FUNCDECL_RPL (hypot
, double, (double x
, double y
));
1059 _GL_CXXALIAS_RPL (hypot
, double, (double x
, double y
));
1061 _GL_CXXALIAS_SYS (hypot
, double, (double x
, double y
));
1063 _GL_CXXALIASWARN (hypot
);
1064 #elif defined GNULIB_POSIXCHECK
1066 # if HAVE_RAW_DECL_HYPOT
1067 _GL_WARN_ON_USE (hypotf
, "hypot has portability problems - "
1068 "use gnulib module hypot for portability");
1072 /* Return sqrt(x^2+y^2). */
1074 # if @REPLACE_HYPOTL@
1075 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1077 # define hypotl rpl_hypotl
1079 _GL_FUNCDECL_RPL (hypotl
, long double, (long double x
, long double y
));
1080 _GL_CXXALIAS_RPL (hypotl
, long double, (long double x
, long double y
));
1083 _GL_FUNCDECL_SYS (hypotl
, long double, (long double x
, long double y
));
1085 _GL_CXXALIAS_SYS (hypotl
, long double, (long double x
, long double y
));
1087 _GL_CXXALIASWARN (hypotl
);
1088 #elif defined GNULIB_POSIXCHECK
1090 # if HAVE_RAW_DECL_HYPOTL
1091 _GL_WARN_ON_USE (hypotl
, "hypotl is unportable - "
1092 "use gnulib module hypotl for portability");
1098 # if @REPLACE_ILOGBF@
1099 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1101 # define ilogbf rpl_ilogbf
1103 _GL_FUNCDECL_RPL (ilogbf
, int, (float x
));
1104 _GL_CXXALIAS_RPL (ilogbf
, int, (float x
));
1107 _GL_FUNCDECL_SYS (ilogbf
, int, (float x
));
1109 _GL_CXXALIAS_SYS (ilogbf
, int, (float x
));
1111 _GL_CXXALIASWARN (ilogbf
);
1112 #elif defined GNULIB_POSIXCHECK
1114 # if HAVE_RAW_DECL_ILOGBF
1115 _GL_WARN_ON_USE (ilogbf
, "ilogbf is unportable - "
1116 "use gnulib module ilogbf for portability");
1121 # if @REPLACE_ILOGB@
1122 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1124 # define ilogb rpl_ilogb
1126 _GL_FUNCDECL_RPL (ilogb
, int, (double x
));
1127 _GL_CXXALIAS_RPL (ilogb
, int, (double x
));
1130 _GL_FUNCDECL_SYS (ilogb
, int, (double x
));
1132 _GL_CXXALIAS_SYS (ilogb
, int, (double x
));
1134 _GL_CXXALIASWARN (ilogb
);
1135 #elif defined GNULIB_POSIXCHECK
1137 # if HAVE_RAW_DECL_ILOGB
1138 _GL_WARN_ON_USE (ilogb
, "ilogb is unportable - "
1139 "use gnulib module ilogb for portability");
1145 _GL_FUNCDECL_SYS (ilogbl
, int, (long double x
));
1147 _GL_CXXALIAS_SYS (ilogbl
, int, (long double x
));
1148 _GL_CXXALIASWARN (ilogbl
);
1149 #elif defined GNULIB_POSIXCHECK
1151 # if HAVE_RAW_DECL_ILOGBL
1152 _GL_WARN_ON_USE (ilogbl
, "ilogbl is unportable - "
1153 "use gnulib module ilogbl for portability");
1158 /* Return x * 2^exp. */
1162 _GL_FUNCDECL_SYS (ldexpf
, float, (float x
, int exp
));
1164 _GL_CXXALIAS_SYS (ldexpf
, float, (float x
, int exp
));
1165 _GL_CXXALIASWARN (ldexpf
);
1166 #elif defined GNULIB_POSIXCHECK
1168 # if HAVE_RAW_DECL_LDEXPF
1169 _GL_WARN_ON_USE (ldexpf
, "ldexpf is unportable - "
1170 "use gnulib module ldexpf for portability");
1174 /* Return x * 2^exp. */
1175 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
1176 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1178 # define ldexpl rpl_ldexpl
1180 _GL_FUNCDECL_RPL (ldexpl
, long double, (long double x
, int exp
));
1181 _GL_CXXALIAS_RPL (ldexpl
, long double, (long double x
, int exp
));
1183 # if !@HAVE_DECL_LDEXPL@
1184 _GL_FUNCDECL_SYS (ldexpl
, long double, (long double x
, int exp
));
1186 # if @GNULIB_LDEXPL@
1187 _GL_CXXALIAS_SYS (ldexpl
, long double, (long double x
, int exp
));
1191 _GL_CXXALIASWARN (ldexpl
);
1193 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
1195 # if HAVE_RAW_DECL_LDEXPL
1196 _GL_WARN_ON_USE (ldexpl
, "ldexpl is unportable - "
1197 "use gnulib module ldexpl for portability");
1204 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1206 # define logf rpl_logf
1208 _GL_FUNCDECL_RPL (logf
, float, (float x
));
1209 _GL_CXXALIAS_RPL (logf
, float, (float x
));
1213 _GL_FUNCDECL_SYS (logf
, float, (float x
));
1215 _GL_CXXALIAS_SYS (logf
, float, (float x
));
1217 _GL_CXXALIASWARN (logf
);
1218 #elif defined GNULIB_POSIXCHECK
1220 # if HAVE_RAW_DECL_LOGF
1221 _GL_WARN_ON_USE (logf
, "logf is unportable - "
1222 "use gnulib module logf for portability");
1228 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1230 # define log rpl_log
1232 _GL_FUNCDECL_RPL (log
, double, (double x
));
1233 _GL_CXXALIAS_RPL (log
, double, (double x
));
1235 _GL_CXXALIAS_SYS (log
, double, (double x
));
1237 _GL_CXXALIASWARN (log
);
1238 #elif defined GNULIB_POSIXCHECK
1240 # if HAVE_RAW_DECL_LOG
1241 _GL_WARN_ON_USE (log
, "log has portability problems - "
1242 "use gnulib module log for portability");
1248 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1250 # define logl rpl_logl
1252 _GL_FUNCDECL_RPL (logl
, long double, (long double x
));
1253 _GL_CXXALIAS_RPL (logl
, long double, (long double x
));
1255 # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
1257 _GL_FUNCDECL_SYS (logl
, long double, (long double x
));
1259 _GL_CXXALIAS_SYS (logl
, long double, (long double x
));
1261 _GL_CXXALIASWARN (logl
);
1262 #elif defined GNULIB_POSIXCHECK
1264 # if HAVE_RAW_DECL_LOGL
1265 _GL_WARN_ON_USE (logl
, "logl is unportable - "
1266 "use gnulib module logl for portability");
1272 # if @REPLACE_LOG10F@
1273 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1275 # define log10f rpl_log10f
1277 _GL_FUNCDECL_RPL (log10f
, float, (float x
));
1278 _GL_CXXALIAS_RPL (log10f
, float, (float x
));
1282 _GL_FUNCDECL_SYS (log10f
, float, (float x
));
1284 _GL_CXXALIAS_SYS (log10f
, float, (float x
));
1286 _GL_CXXALIASWARN (log10f
);
1287 #elif defined GNULIB_POSIXCHECK
1289 # if HAVE_RAW_DECL_LOG10F
1290 _GL_WARN_ON_USE (log10f
, "log10f is unportable - "
1291 "use gnulib module log10f for portability");
1296 # if @REPLACE_LOG10@
1297 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1299 # define log10 rpl_log10
1301 _GL_FUNCDECL_RPL (log10
, double, (double x
));
1302 _GL_CXXALIAS_RPL (log10
, double, (double x
));
1304 _GL_CXXALIAS_SYS (log10
, double, (double x
));
1306 _GL_CXXALIASWARN (log10
);
1307 #elif defined GNULIB_POSIXCHECK
1309 # if HAVE_RAW_DECL_LOG10
1310 _GL_WARN_ON_USE (log10
, "log10 has portability problems - "
1311 "use gnulib module log10 for portability");
1316 # if @REPLACE_LOG10L@
1317 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1319 # define log10l rpl_log10l
1321 _GL_FUNCDECL_RPL (log10l
, long double, (long double x
));
1322 _GL_CXXALIAS_RPL (log10l
, long double, (long double x
));
1324 # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
1326 _GL_FUNCDECL_SYS (log10l
, long double, (long double x
));
1328 _GL_CXXALIAS_SYS (log10l
, long double, (long double x
));
1330 _GL_CXXALIASWARN (log10l
);
1331 #elif defined GNULIB_POSIXCHECK
1333 # if HAVE_RAW_DECL_LOG10L
1334 _GL_WARN_ON_USE (log10l
, "log10l is unportable - "
1335 "use gnulib module log10l for portability");
1341 # if @REPLACE_LOG1PF@
1342 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1344 # define log1pf rpl_log1pf
1346 _GL_FUNCDECL_RPL (log1pf
, float, (float x
));
1347 _GL_CXXALIAS_RPL (log1pf
, float, (float x
));
1350 _GL_FUNCDECL_SYS (log1pf
, float, (float x
));
1352 _GL_CXXALIAS_SYS (log1pf
, float, (float x
));
1354 _GL_CXXALIASWARN (log1pf
);
1355 #elif defined GNULIB_POSIXCHECK
1357 # if HAVE_RAW_DECL_LOG1PF
1358 _GL_WARN_ON_USE (log1pf
, "log1pf is unportable - "
1359 "use gnulib module log1pf for portability");
1364 # if @REPLACE_LOG1P@
1365 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1367 # define log1p rpl_log1p
1369 _GL_FUNCDECL_RPL (log1p
, double, (double x
));
1370 _GL_CXXALIAS_RPL (log1p
, double, (double x
));
1373 _GL_FUNCDECL_SYS (log1p
, double, (double x
));
1375 _GL_CXXALIAS_SYS (log1p
, double, (double x
));
1377 _GL_CXXALIASWARN (log1p
);
1378 #elif defined GNULIB_POSIXCHECK
1380 # if HAVE_RAW_DECL_LOG1P
1381 _GL_WARN_ON_USE (log1p
, "log1p has portability problems - "
1382 "use gnulib module log1p for portability");
1387 # if @REPLACE_LOG1PL@
1388 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1390 # define log1pl rpl_log1pl
1392 _GL_FUNCDECL_RPL (log1pl
, long double, (long double x
));
1393 _GL_CXXALIAS_RPL (log1pl
, long double, (long double x
));
1396 _GL_FUNCDECL_SYS (log1pl
, long double, (long double x
));
1398 _GL_CXXALIAS_SYS (log1pl
, long double, (long double x
));
1400 _GL_CXXALIASWARN (log1pl
);
1401 #elif defined GNULIB_POSIXCHECK
1403 # if HAVE_RAW_DECL_LOG1PL
1404 _GL_WARN_ON_USE (log1pl
, "log1pl has portability problems - "
1405 "use gnulib module log1pl for portability");
1411 # if @REPLACE_LOG2F@
1412 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1414 # define log2f rpl_log2f
1416 _GL_FUNCDECL_RPL (log2f
, float, (float x
));
1417 _GL_CXXALIAS_RPL (log2f
, float, (float x
));
1419 # if !@HAVE_DECL_LOG2F@
1421 _GL_FUNCDECL_SYS (log2f
, float, (float x
));
1423 _GL_CXXALIAS_SYS (log2f
, float, (float x
));
1425 _GL_CXXALIASWARN (log2f
);
1426 #elif defined GNULIB_POSIXCHECK
1428 # if HAVE_RAW_DECL_LOG2F
1429 _GL_WARN_ON_USE (log2f
, "log2f is unportable - "
1430 "use gnulib module log2f for portability");
1436 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1438 # define log2 rpl_log2
1440 _GL_FUNCDECL_RPL (log2
, double, (double x
));
1441 _GL_CXXALIAS_RPL (log2
, double, (double x
));
1443 # if !@HAVE_DECL_LOG2@
1445 _GL_FUNCDECL_SYS (log2
, double, (double x
));
1447 _GL_CXXALIAS_SYS (log2
, double, (double x
));
1449 _GL_CXXALIASWARN (log2
);
1450 #elif defined GNULIB_POSIXCHECK
1452 # if HAVE_RAW_DECL_LOG2
1453 _GL_WARN_ON_USE (log2
, "log2 is unportable - "
1454 "use gnulib module log2 for portability");
1459 # if @REPLACE_LOG2L@
1460 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1462 # define log2l rpl_log2l
1464 _GL_FUNCDECL_RPL (log2l
, long double, (long double x
));
1465 _GL_CXXALIAS_RPL (log2l
, long double, (long double x
));
1467 # if !@HAVE_DECL_LOG2L@
1468 _GL_FUNCDECL_SYS (log2l
, long double, (long double x
));
1470 _GL_CXXALIAS_SYS (log2l
, long double, (long double x
));
1472 _GL_CXXALIASWARN (log2l
);
1473 #elif defined GNULIB_POSIXCHECK
1475 # if HAVE_RAW_DECL_LOG2L
1476 _GL_WARN_ON_USE (log2l
, "log2l is unportable - "
1477 "use gnulib module log2l for portability");
1483 # if @REPLACE_LOGBF@
1484 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1486 # define logbf rpl_logbf
1488 _GL_FUNCDECL_RPL (logbf
, float, (float x
));
1489 _GL_CXXALIAS_RPL (logbf
, float, (float x
));
1492 _GL_FUNCDECL_SYS (logbf
, float, (float x
));
1494 _GL_CXXALIAS_SYS (logbf
, float, (float x
));
1496 _GL_CXXALIASWARN (logbf
);
1497 #elif defined GNULIB_POSIXCHECK
1499 # if HAVE_RAW_DECL_LOGBF
1500 _GL_WARN_ON_USE (logbf
, "logbf is unportable - "
1501 "use gnulib module logbf for portability");
1507 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1509 # define logb rpl_logb
1511 _GL_FUNCDECL_RPL (logb
, double, (double x
));
1512 _GL_CXXALIAS_RPL (logb
, double, (double x
));
1514 # if !@HAVE_DECL_LOGB@
1515 _GL_FUNCDECL_SYS (logb
, double, (double x
));
1517 _GL_CXXALIAS_SYS (logb
, double, (double x
));
1519 _GL_CXXALIASWARN (logb
);
1520 #elif defined GNULIB_POSIXCHECK
1522 # if HAVE_RAW_DECL_LOGB
1523 _GL_WARN_ON_USE (logb
, "logb is unportable - "
1524 "use gnulib module logb for portability");
1529 # if @REPLACE_LOGBL@
1530 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1532 # define logbl rpl_logbl
1534 _GL_FUNCDECL_RPL (logbl
, long double, (long double x
));
1535 _GL_CXXALIAS_RPL (logbl
, long double, (long double x
));
1538 _GL_FUNCDECL_SYS (logbl
, long double, (long double x
));
1540 _GL_CXXALIAS_SYS (logbl
, long double, (long double x
));
1542 _GL_CXXALIASWARN (logbl
);
1543 #elif defined GNULIB_POSIXCHECK
1545 # if HAVE_RAW_DECL_LOGBL
1546 _GL_WARN_ON_USE (logbl
, "logbl is unportable - "
1547 "use gnulib module logbl for portability");
1553 # if @REPLACE_MODFF@
1554 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1556 # define modff rpl_modff
1558 _GL_FUNCDECL_RPL (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1559 _GL_CXXALIAS_RPL (modff
, float, (float x
, float *iptr
));
1563 _GL_FUNCDECL_SYS (modff
, float, (float x
, float *iptr
) _GL_ARG_NONNULL ((2)));
1565 _GL_CXXALIAS_SYS (modff
, float, (float x
, float *iptr
));
1567 _GL_CXXALIASWARN (modff
);
1568 #elif defined GNULIB_POSIXCHECK
1570 # if HAVE_RAW_DECL_MODFF
1571 _GL_WARN_ON_USE (modff
, "modff is unportable - "
1572 "use gnulib module modff for portability");
1578 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1580 # define modf rpl_modf
1582 _GL_FUNCDECL_RPL (modf
, double, (double x
, double *iptr
) _GL_ARG_NONNULL ((2)));
1583 _GL_CXXALIAS_RPL (modf
, double, (double x
, double *iptr
));
1585 _GL_CXXALIAS_SYS (modf
, double, (double x
, double *iptr
));
1587 _GL_CXXALIASWARN (modf
);
1588 #elif defined GNULIB_POSIXCHECK
1590 # if HAVE_RAW_DECL_MODF
1591 _GL_WARN_ON_USE (modf
, "modf has portability problems - "
1592 "use gnulib module modf for portability");
1597 # if @REPLACE_MODFL@
1598 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1600 # define modfl rpl_modfl
1602 _GL_FUNCDECL_RPL (modfl
, long double, (long double x
, long double *iptr
)
1603 _GL_ARG_NONNULL ((2)));
1604 _GL_CXXALIAS_RPL (modfl
, long double, (long double x
, long double *iptr
));
1608 _GL_FUNCDECL_SYS (modfl
, long double, (long double x
, long double *iptr
)
1609 _GL_ARG_NONNULL ((2)));
1611 _GL_CXXALIAS_SYS (modfl
, long double, (long double x
, long double *iptr
));
1613 _GL_CXXALIASWARN (modfl
);
1614 #elif defined GNULIB_POSIXCHECK
1616 # if HAVE_RAW_DECL_MODFL
1617 _GL_WARN_ON_USE (modfl
, "modfl is unportable - "
1618 "use gnulib module modfl for portability");
1626 _GL_FUNCDECL_SYS (powf
, float, (float x
, float y
));
1628 _GL_CXXALIAS_SYS (powf
, float, (float x
, float y
));
1629 _GL_CXXALIASWARN (powf
);
1630 #elif defined GNULIB_POSIXCHECK
1632 # if HAVE_RAW_DECL_POWF
1633 _GL_WARN_ON_USE (powf
, "powf is unportable - "
1634 "use gnulib module powf for portability");
1639 #if @GNULIB_REMAINDERF@
1640 # if @REPLACE_REMAINDERF@
1641 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1643 # define remainderf rpl_remainderf
1645 _GL_FUNCDECL_RPL (remainderf
, float, (float x
, float y
));
1646 _GL_CXXALIAS_RPL (remainderf
, float, (float x
, float y
));
1648 # if !@HAVE_REMAINDERF@
1649 _GL_FUNCDECL_SYS (remainderf
, float, (float x
, float y
));
1651 _GL_CXXALIAS_SYS (remainderf
, float, (float x
, float y
));
1653 _GL_CXXALIASWARN (remainderf
);
1654 #elif defined GNULIB_POSIXCHECK
1656 # if HAVE_RAW_DECL_REMAINDERF
1657 _GL_WARN_ON_USE (remainderf
, "remainderf is unportable - "
1658 "use gnulib module remainderf for portability");
1662 #if @GNULIB_REMAINDER@
1663 # if @REPLACE_REMAINDER@
1664 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1666 # define remainder rpl_remainder
1668 _GL_FUNCDECL_RPL (remainder
, double, (double x
, double y
));
1669 _GL_CXXALIAS_RPL (remainder
, double, (double x
, double y
));
1671 # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
1672 _GL_FUNCDECL_SYS (remainder
, double, (double x
, double y
));
1674 _GL_CXXALIAS_SYS (remainder
, double, (double x
, double y
));
1676 _GL_CXXALIASWARN (remainder
);
1677 #elif defined GNULIB_POSIXCHECK
1679 # if HAVE_RAW_DECL_REMAINDER
1680 _GL_WARN_ON_USE (remainder
, "remainder is unportable - "
1681 "use gnulib module remainder for portability");
1685 #if @GNULIB_REMAINDERL@
1686 # if @REPLACE_REMAINDERL@
1687 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1689 # define remainderl rpl_remainderl
1691 _GL_FUNCDECL_RPL (remainderl
, long double, (long double x
, long double y
));
1692 _GL_CXXALIAS_RPL (remainderl
, long double, (long double x
, long double y
));
1694 # if !@HAVE_DECL_REMAINDERL@
1696 _GL_FUNCDECL_SYS (remainderl
, long double, (long double x
, long double y
));
1698 _GL_CXXALIAS_SYS (remainderl
, long double, (long double x
, long double y
));
1700 _GL_CXXALIASWARN (remainderl
);
1701 #elif defined GNULIB_POSIXCHECK
1703 # if HAVE_RAW_DECL_REMAINDERL
1704 _GL_WARN_ON_USE (remainderl
, "remainderl is unportable - "
1705 "use gnulib module remainderl for portability");
1711 # if !@HAVE_DECL_RINTF@
1712 _GL_FUNCDECL_SYS (rintf
, float, (float x
));
1714 _GL_CXXALIAS_SYS (rintf
, float, (float x
));
1715 _GL_CXXALIASWARN (rintf
);
1716 #elif defined GNULIB_POSIXCHECK
1718 # if HAVE_RAW_DECL_RINTF
1719 _GL_WARN_ON_USE (rintf
, "rintf is unportable - "
1720 "use gnulib module rintf for portability");
1726 _GL_FUNCDECL_SYS (rint
, double, (double x
));
1728 _GL_CXXALIAS_SYS (rint
, double, (double x
));
1729 _GL_CXXALIASWARN (rint
);
1730 #elif defined GNULIB_POSIXCHECK
1732 # if HAVE_RAW_DECL_RINT
1733 _GL_WARN_ON_USE (rint
, "rint is unportable - "
1734 "use gnulib module rint for portability");
1740 _GL_FUNCDECL_SYS (rintl
, long double, (long double x
));
1742 _GL_CXXALIAS_SYS (rintl
, long double, (long double x
));
1743 _GL_CXXALIASWARN (rintl
);
1744 #elif defined GNULIB_POSIXCHECK
1746 # if HAVE_RAW_DECL_RINTL
1747 _GL_WARN_ON_USE (rintl
, "rintl is unportable - "
1748 "use gnulib module rintl for portability");
1754 # if @REPLACE_ROUNDF@
1755 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1757 # define roundf rpl_roundf
1759 _GL_FUNCDECL_RPL (roundf
, float, (float x
));
1760 _GL_CXXALIAS_RPL (roundf
, float, (float x
));
1762 # if !@HAVE_DECL_ROUNDF@
1763 _GL_FUNCDECL_SYS (roundf
, float, (float x
));
1765 _GL_CXXALIAS_SYS (roundf
, float, (float x
));
1767 _GL_CXXALIASWARN (roundf
);
1768 #elif defined GNULIB_POSIXCHECK
1770 # if HAVE_RAW_DECL_ROUNDF
1771 _GL_WARN_ON_USE (roundf
, "roundf is unportable - "
1772 "use gnulib module roundf for portability");
1777 # if @REPLACE_ROUND@
1778 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1780 # define round rpl_round
1782 _GL_FUNCDECL_RPL (round
, double, (double x
));
1783 _GL_CXXALIAS_RPL (round
, double, (double x
));
1785 # if !@HAVE_DECL_ROUND@
1786 _GL_FUNCDECL_SYS (round
, double, (double x
));
1788 _GL_CXXALIAS_SYS (round
, double, (double x
));
1790 _GL_CXXALIASWARN (round
);
1791 #elif defined GNULIB_POSIXCHECK
1793 # if HAVE_RAW_DECL_ROUND
1794 _GL_WARN_ON_USE (round
, "round is unportable - "
1795 "use gnulib module round for portability");
1800 # if @REPLACE_ROUNDL@
1801 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1803 # define roundl rpl_roundl
1805 _GL_FUNCDECL_RPL (roundl
, long double, (long double x
));
1806 _GL_CXXALIAS_RPL (roundl
, long double, (long double x
));
1808 # if !@HAVE_DECL_ROUNDL@
1810 _GL_FUNCDECL_SYS (roundl
, long double, (long double x
));
1812 _GL_CXXALIAS_SYS (roundl
, long double, (long double x
));
1814 _GL_CXXALIASWARN (roundl
);
1815 #elif defined GNULIB_POSIXCHECK
1817 # if HAVE_RAW_DECL_ROUNDL
1818 _GL_WARN_ON_USE (roundl
, "roundl is unportable - "
1819 "use gnulib module roundl for portability");
1827 _GL_FUNCDECL_SYS (sinf
, float, (float x
));
1829 _GL_CXXALIAS_SYS (sinf
, float, (float x
));
1830 _GL_CXXALIASWARN (sinf
);
1831 #elif defined GNULIB_POSIXCHECK
1833 # if HAVE_RAW_DECL_SINF
1834 _GL_WARN_ON_USE (sinf
, "sinf is unportable - "
1835 "use gnulib module sinf for portability");
1840 # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
1842 _GL_FUNCDECL_SYS (sinl
, long double, (long double x
));
1844 _GL_CXXALIAS_SYS (sinl
, long double, (long double x
));
1845 _GL_CXXALIASWARN (sinl
);
1846 #elif defined GNULIB_POSIXCHECK
1848 # if HAVE_RAW_DECL_SINL
1849 _GL_WARN_ON_USE (sinl
, "sinl is unportable - "
1850 "use gnulib module sinl for portability");
1858 _GL_FUNCDECL_SYS (sinhf
, float, (float x
));
1860 _GL_CXXALIAS_SYS (sinhf
, float, (float x
));
1861 _GL_CXXALIASWARN (sinhf
);
1862 #elif defined GNULIB_POSIXCHECK
1864 # if HAVE_RAW_DECL_SINHF
1865 _GL_WARN_ON_USE (sinhf
, "sinhf is unportable - "
1866 "use gnulib module sinhf for portability");
1874 _GL_FUNCDECL_SYS (sqrtf
, float, (float x
));
1876 _GL_CXXALIAS_SYS (sqrtf
, float, (float x
));
1877 _GL_CXXALIASWARN (sqrtf
);
1878 #elif defined GNULIB_POSIXCHECK
1880 # if HAVE_RAW_DECL_SQRTF
1881 _GL_WARN_ON_USE (sqrtf
, "sqrtf is unportable - "
1882 "use gnulib module sqrtf for portability");
1887 # if @REPLACE_SQRTL@
1888 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1890 # define sqrtl rpl_sqrtl
1892 _GL_FUNCDECL_RPL (sqrtl
, long double, (long double x
));
1893 _GL_CXXALIAS_RPL (sqrtl
, long double, (long double x
));
1895 # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
1897 _GL_FUNCDECL_SYS (sqrtl
, long double, (long double x
));
1899 _GL_CXXALIAS_SYS (sqrtl
, long double, (long double x
));
1901 _GL_CXXALIASWARN (sqrtl
);
1902 #elif defined GNULIB_POSIXCHECK
1904 # if HAVE_RAW_DECL_SQRTL
1905 _GL_WARN_ON_USE (sqrtl
, "sqrtl is unportable - "
1906 "use gnulib module sqrtl for portability");
1914 _GL_FUNCDECL_SYS (tanf
, float, (float x
));
1916 _GL_CXXALIAS_SYS (tanf
, float, (float x
));
1917 _GL_CXXALIASWARN (tanf
);
1918 #elif defined GNULIB_POSIXCHECK
1920 # if HAVE_RAW_DECL_TANF
1921 _GL_WARN_ON_USE (tanf
, "tanf is unportable - "
1922 "use gnulib module tanf for portability");
1927 # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
1929 _GL_FUNCDECL_SYS (tanl
, long double, (long double x
));
1931 _GL_CXXALIAS_SYS (tanl
, long double, (long double x
));
1932 _GL_CXXALIASWARN (tanl
);
1933 #elif defined GNULIB_POSIXCHECK
1935 # if HAVE_RAW_DECL_TANL
1936 _GL_WARN_ON_USE (tanl
, "tanl is unportable - "
1937 "use gnulib module tanl for portability");
1945 _GL_FUNCDECL_SYS (tanhf
, float, (float x
));
1947 _GL_CXXALIAS_SYS (tanhf
, float, (float x
));
1948 _GL_CXXALIASWARN (tanhf
);
1949 #elif defined GNULIB_POSIXCHECK
1951 # if HAVE_RAW_DECL_TANHF
1952 _GL_WARN_ON_USE (tanhf
, "tanhf is unportable - "
1953 "use gnulib module tanhf for portability");
1959 # if @REPLACE_TRUNCF@
1960 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1961 # define truncf rpl_truncf
1963 _GL_FUNCDECL_RPL (truncf
, float, (float x
));
1964 _GL_CXXALIAS_RPL (truncf
, float, (float x
));
1966 # if !@HAVE_DECL_TRUNCF@
1967 _GL_FUNCDECL_SYS (truncf
, float, (float x
));
1969 _GL_CXXALIAS_SYS (truncf
, float, (float x
));
1971 _GL_CXXALIASWARN (truncf
);
1972 #elif defined GNULIB_POSIXCHECK
1974 # if HAVE_RAW_DECL_TRUNCF
1975 _GL_WARN_ON_USE (truncf
, "truncf is unportable - "
1976 "use gnulib module truncf for portability");
1981 # if @REPLACE_TRUNC@
1982 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1983 # define trunc rpl_trunc
1985 _GL_FUNCDECL_RPL (trunc
, double, (double x
));
1986 _GL_CXXALIAS_RPL (trunc
, double, (double x
));
1988 # if !@HAVE_DECL_TRUNC@
1989 _GL_FUNCDECL_SYS (trunc
, double, (double x
));
1991 _GL_CXXALIAS_SYS (trunc
, double, (double x
));
1993 _GL_CXXALIASWARN (trunc
);
1994 #elif defined GNULIB_POSIXCHECK
1996 # if HAVE_RAW_DECL_TRUNC
1997 _GL_WARN_ON_USE (trunc
, "trunc is unportable - "
1998 "use gnulib module trunc for portability");
2003 # if @REPLACE_TRUNCL@
2004 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2006 # define truncl rpl_truncl
2008 _GL_FUNCDECL_RPL (truncl
, long double, (long double x
));
2009 _GL_CXXALIAS_RPL (truncl
, long double, (long double x
));
2011 # if !@HAVE_DECL_TRUNCL@
2012 _GL_FUNCDECL_SYS (truncl
, long double, (long double x
));
2014 _GL_CXXALIAS_SYS (truncl
, long double, (long double x
));
2016 _GL_CXXALIASWARN (truncl
);
2017 #elif defined GNULIB_POSIXCHECK
2019 # if HAVE_RAW_DECL_TRUNCL
2020 _GL_WARN_ON_USE (truncl
, "truncl is unportable - "
2021 "use gnulib module truncl for portability");
2026 /* Definitions of function-like macros come here, after the function
2030 #if @GNULIB_ISFINITE@
2031 # if @REPLACE_ISFINITE@
2032 _GL_EXTERN_C
int gl_isfinitef (float x
);
2033 _GL_EXTERN_C
int gl_isfinited (double x
);
2034 _GL_EXTERN_C
int gl_isfinitel (long double x
);
2036 # define isfinite(x) \
2037 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
2038 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
2043 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite
)
2045 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite
)
2048 #elif defined GNULIB_POSIXCHECK
2049 # if defined isfinite
2050 _GL_WARN_REAL_FLOATING_DECL (isfinite
);
2052 # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
2058 # if @REPLACE_ISINF@
2059 _GL_EXTERN_C
int gl_isinff (float x
);
2060 _GL_EXTERN_C
int gl_isinfd (double x
);
2061 _GL_EXTERN_C
int gl_isinfl (long double x
);
2064 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
2065 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
2070 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf
)
2072 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf
)
2075 #elif defined GNULIB_POSIXCHECK
2077 _GL_WARN_REAL_FLOATING_DECL (isinf
);
2079 # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
2085 /* Test for NaN for 'float' numbers. */
2087 /* The original <math.h> included above provides a declaration of isnan macro
2088 or (older) isnanf function. */
2090 /* GCC 4.0 and newer provides three built-ins for isnan. */
2092 # define isnanf(x) __builtin_isnanf ((float)(x))
2093 # elif defined isnan
2095 # define isnanf(x) isnan ((float)(x))
2098 /* Test whether X is a NaN. */
2100 # define isnanf rpl_isnanf
2101 _GL_EXTERN_C
int isnanf (float x
);
2106 /* Test for NaN for 'double' numbers.
2107 This function is a gnulib extension, unlike isnan() which applied only
2108 to 'double' numbers earlier but now is a type-generic macro. */
2110 /* The original <math.h> included above provides a declaration of isnan
2113 /* GCC 4.0 and newer provides three built-ins for isnan. */
2115 # define isnand(x) __builtin_isnan ((double)(x))
2118 # define isnand(x) isnan ((double)(x))
2121 /* Test whether X is a NaN. */
2123 # define isnand rpl_isnand
2124 _GL_EXTERN_C
int isnand (double x
);
2129 /* Test for NaN for 'long double' numbers. */
2131 /* The original <math.h> included above provides a declaration of isnan
2132 macro or (older) isnanl function. */
2134 /* GCC 4.0 and newer provides three built-ins for isnan. */
2136 # define isnanl(x) __builtin_isnanl ((long double)(x))
2137 # elif defined isnan
2139 # define isnanl(x) isnan ((long double)(x))
2142 /* Test whether X is a NaN. */
2144 # define isnanl rpl_isnanl
2145 _GL_EXTERN_C
int isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2149 /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
2151 # if @REPLACE_ISNAN@
2152 /* We can't just use the isnanf macro (e.g.) as exposed by
2153 isnanf.h (e.g.) here, because those may end up being macros
2154 that recursively expand back to isnan. So use the gnulib
2155 replacements for them directly. */
2156 # if @HAVE_ISNANF@ && __GNUC__ >= 4
2157 # define gl_isnan_f(x) __builtin_isnanf ((float)(x))
2159 _GL_EXTERN_C
int rpl_isnanf (float x
);
2160 # define gl_isnan_f(x) rpl_isnanf (x)
2162 # if @HAVE_ISNAND@ && __GNUC__ >= 4
2163 # define gl_isnan_d(x) __builtin_isnan ((double)(x))
2165 _GL_EXTERN_C
int rpl_isnand (double x
);
2166 # define gl_isnan_d(x) rpl_isnand (x)
2168 # if @HAVE_ISNANL@ && __GNUC__ >= 4
2169 # define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
2171 _GL_EXTERN_C
int rpl_isnanl (long double x
) _GL_ATTRIBUTE_CONST
;
2172 # define gl_isnan_l(x) rpl_isnanl (x)
2176 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
2177 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
2179 # elif __GNUC__ >= 4
2182 (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \
2183 sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
2184 __builtin_isnanf ((float)(x)))
2188 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan
)
2190 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan
)
2193 /* Ensure isnan is a macro. */
2195 # define isnan isnan
2198 #elif defined GNULIB_POSIXCHECK
2200 _GL_WARN_REAL_FLOATING_DECL (isnan
);
2202 # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
2207 #if @GNULIB_SIGNBIT@
2208 # if @REPLACE_SIGNBIT_USING_GCC@
2210 /* GCC 4.0 and newer provides three built-ins for signbit. */
2211 # define signbit(x) \
2212 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
2213 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
2214 __builtin_signbitf (x))
2216 # if @REPLACE_SIGNBIT@
2218 _GL_EXTERN_C
int gl_signbitf (float arg
);
2219 _GL_EXTERN_C
int gl_signbitd (double arg
);
2220 _GL_EXTERN_C
int gl_signbitl (long double arg
);
2221 # if __GNUC__ >= 2 && !defined __STRICT_ANSI__
2222 # define _GL_NUM_UINT_WORDS(type) \
2223 ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
2224 # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
2225 # define gl_signbitf_OPTIMIZED_MACRO
2226 # define gl_signbitf(arg) \
2227 ({ union { float _value; \
2228 unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
2230 _m._value = (arg); \
2231 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
2234 # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
2235 # define gl_signbitd_OPTIMIZED_MACRO
2236 # define gl_signbitd(arg) \
2237 ({ union { double _value; \
2238 unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
2240 _m._value = (arg); \
2241 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
2244 # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
2245 # define gl_signbitl_OPTIMIZED_MACRO
2246 # define gl_signbitl(arg) \
2247 ({ union { long double _value; \
2248 unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
2250 _m._value = (arg); \
2251 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
2255 # define signbit(x) \
2256 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
2257 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
2262 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit
)
2264 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit
)
2267 #elif defined GNULIB_POSIXCHECK
2268 # if defined signbit
2269 _GL_WARN_REAL_FLOATING_DECL (signbit
);
2271 # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
2275 _GL_INLINE_HEADER_END
2277 #endif /* _@GUARD_PREFIX@_MATH_H */
2278 #endif /* _@GUARD_PREFIX@_MATH_H */
This page took 0.146935 seconds and 4 git commands to generate.