• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/* A GNU-like <math.h>.
2
3   Copyright (C) 2002-2003, 2007-2019 Free Software Foundation, Inc.
4
5   This program is free software: you can redistribute it and/or modify
6   it under the terms of the GNU Lesser General Public License as published by
7   the Free Software Foundation; either version 2.1 of the License, or
8   (at your option) any later version.
9
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 Lesser General Public License for more details.
14
15   You should have received a copy of the GNU Lesser General Public License
16   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
17
18#ifndef _@GUARD_PREFIX@_MATH_H
19
20#if __GNUC__ >= 3
21@PRAGMA_SYSTEM_HEADER@
22#endif
23@PRAGMA_COLUMNS@
24
25/* The include_next requires a split double-inclusion guard.  */
26#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
27
28/* The __const__ attribute was added in gcc 2.95.  */
29#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
30# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
31#else
32# define _GL_ATTRIBUTE_CONST /* empty */
33#endif
34
35#ifndef _@GUARD_PREFIX@_MATH_H
36#define _@GUARD_PREFIX@_MATH_H
37
38/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in <fp.h>.  */
39#if defined __VMS && ! defined NAN
40# include <fp.h>
41#endif
42
43#ifndef _GL_INLINE_HEADER_BEGIN
44 #error "Please include config.h first."
45#endif
46_GL_INLINE_HEADER_BEGIN
47#ifndef _GL_MATH_INLINE
48# define _GL_MATH_INLINE _GL_INLINE
49#endif
50
51#include "c++defs.h"
52
53#include "arg-nonnull.h"
54
55/* The definition of _GL_WARN_ON_USE is copied here.  */
56
57#ifdef __cplusplus
58/* Helper macros to define type-generic function FUNC as overloaded functions,
59   rather than as macros like in C.  POSIX declares these with an argument of
60   real-floating (that is, one of float, double, or long double).  */
61# define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \
62static inline int                                                   \
63_gl_cxx_ ## func ## f (float f)                                     \
64{                                                                   \
65  return func (f);                                                  \
66}                                                                   \
67static inline int                                                   \
68_gl_cxx_ ## func ## d (double d)                                    \
69{                                                                   \
70  return func (d);                                                  \
71}                                                                   \
72static inline int                                                   \
73_gl_cxx_ ## func ## l (long double l)                               \
74{                                                                   \
75  return func (l);                                                  \
76}
77# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \
78_GL_BEGIN_NAMESPACE                                                 \
79inline int                                                          \
80func (float f)                                                      \
81{                                                                   \
82  return _gl_cxx_ ## func ## f (f);                                 \
83}                                                                   \
84inline int                                                          \
85func (double d)                                                     \
86{                                                                   \
87  return _gl_cxx_ ## func ## d (d);                                 \
88}                                                                   \
89inline int                                                          \
90func (long double l)                                                \
91{                                                                   \
92  return _gl_cxx_ ## func ## l (l);                                 \
93}                                                                   \
94_GL_END_NAMESPACE
95#endif
96
97/* Helper macros to define a portability warning for the
98   classification macro FUNC called with VALUE.  POSIX declares the
99   classification macros with an argument of real-floating (that is,
100   one of float, double, or long double).  */
101#define _GL_WARN_REAL_FLOATING_DECL(func) \
102_GL_MATH_INLINE int                                                       \
103_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - "                      \
104                           "use gnulib module " #func " for portability") \
105rpl_ ## func ## f (float f)                                               \
106{                                                                         \
107  return func (f);                                                        \
108}                                                                         \
109_GL_MATH_INLINE int                                                       \
110_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - "                      \
111                           "use gnulib module " #func " for portability") \
112rpl_ ## func ## d (double d)                                              \
113{                                                                         \
114  return func (d);                                                        \
115}                                                                         \
116_GL_MATH_INLINE int                                                       \
117_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - "                      \
118                           "use gnulib module " #func " for portability") \
119rpl_ ## func ## l (long double l)                                         \
120{                                                                         \
121  return func (l);                                                        \
122}
123#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
124  (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value)     \
125   : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value)  \
126   : rpl_ ## func ## l (value))
127
128
129#if @REPLACE_ITOLD@
130/* Pull in a function that fixes the 'int' to 'long double' conversion
131   of glibc 2.7.  */
132_GL_EXTERN_C void _Qp_itoq (long double *, int);
133static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq;
134#endif
135
136
137/* POSIX allows platforms that don't support NAN.  But all major
138   machines in the past 15 years have supported something close to
139   IEEE NaN, so we define this unconditionally.  We also must define
140   it on platforms like Solaris 10, where NAN is present but defined
141   as a function pointer rather than a floating point constant.  */
142#if !defined NAN || @REPLACE_NAN@
143# if !GNULIB_defined_NAN
144#  undef NAN
145  /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
146     choke on the expression 0.0 / 0.0.  */
147#  if defined __DECC || defined _MSC_VER
148_GL_MATH_INLINE float
149_NaN ()
150{
151  static float zero = 0.0f;
152  return zero / zero;
153}
154#   define NAN (_NaN())
155#  else
156#   define NAN (0.0f / 0.0f)
157#  endif
158#  define GNULIB_defined_NAN 1
159# endif
160#endif
161
162/* Solaris 10 defines HUGE_VAL, but as a function pointer rather
163   than a floating point constant.  */
164#if @REPLACE_HUGE_VAL@
165# undef HUGE_VALF
166# define HUGE_VALF (1.0f / 0.0f)
167# undef HUGE_VAL
168# define HUGE_VAL (1.0 / 0.0)
169# undef HUGE_VALL
170# define HUGE_VALL (1.0L / 0.0L)
171#endif
172
173/* HUGE_VALF is a 'float' Infinity.  */
174#ifndef HUGE_VALF
175# if defined _MSC_VER
176/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f.  */
177#  define HUGE_VALF (1e25f * 1e25f)
178# else
179#  define HUGE_VALF (1.0f / 0.0f)
180# endif
181#endif
182
183/* HUGE_VAL is a 'double' Infinity.  */
184#ifndef HUGE_VAL
185# if defined _MSC_VER
186/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0.  */
187#  define HUGE_VAL (1e250 * 1e250)
188# else
189#  define HUGE_VAL (1.0 / 0.0)
190# endif
191#endif
192
193/* HUGE_VALL is a 'long double' Infinity.  */
194#ifndef HUGE_VALL
195# if defined _MSC_VER
196/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L.  */
197#  define HUGE_VALL (1e250L * 1e250L)
198# else
199#  define HUGE_VALL (1.0L / 0.0L)
200# endif
201#endif
202
203
204#if defined FP_ILOGB0 && defined FP_ILOGBNAN
205 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct.  */
206# if defined __HAIKU__
207  /* Haiku: match what ilogb() does */
208#  undef FP_ILOGB0
209#  undef FP_ILOGBNAN
210#  define FP_ILOGB0   (- 2147483647 - 1) /* INT_MIN */
211#  define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
212# endif
213#else
214 /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined.  */
215# if defined __NetBSD__ || defined __sgi
216  /* NetBSD, IRIX 6.5: match what ilogb() does */
217#  define FP_ILOGB0   (- 2147483647 - 1) /* INT_MIN */
218#  define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
219# elif defined _AIX
220  /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
221#  define FP_ILOGB0   (- 2147483647 - 1) /* INT_MIN */
222#  define FP_ILOGBNAN 2147483647 /* INT_MAX */
223# elif defined __sun
224  /* Solaris 9: match what ilogb() does */
225#  define FP_ILOGB0   (- 2147483647) /* - INT_MAX */
226#  define FP_ILOGBNAN 2147483647 /* INT_MAX */
227# else
228  /* Gnulib defined values.  */
229#  define FP_ILOGB0   (- 2147483647) /* - INT_MAX */
230#  define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
231# endif
232#endif
233
234
235#if @GNULIB_ACOSF@
236# if @REPLACE_ACOSF@
237#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
238#   undef acosf
239#   define acosf rpl_acosf
240#  endif
241_GL_FUNCDECL_RPL (acosf, float, (float x));
242_GL_CXXALIAS_RPL (acosf, float, (float x));
243# else
244#  if !@HAVE_ACOSF@
245#   undef acosf
246_GL_FUNCDECL_SYS (acosf, float, (float x));
247#  endif
248_GL_CXXALIAS_SYS (acosf, float, (float x));
249# endif
250_GL_CXXALIASWARN (acosf);
251#elif defined GNULIB_POSIXCHECK
252# undef acosf
253# if HAVE_RAW_DECL_ACOSF
254_GL_WARN_ON_USE (acosf, "acosf is unportable - "
255                 "use gnulib module acosf for portability");
256# endif
257#endif
258
259#if @GNULIB_ACOSL@
260# if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
261#  undef acosl
262_GL_FUNCDECL_SYS (acosl, long double, (long double x));
263# endif
264_GL_CXXALIAS_SYS (acosl, long double, (long double x));
265_GL_CXXALIASWARN (acosl);
266#elif defined GNULIB_POSIXCHECK
267# undef acosl
268# if HAVE_RAW_DECL_ACOSL
269_GL_WARN_ON_USE (acosl, "acosl is unportable - "
270                 "use gnulib module acosl for portability");
271# endif
272#endif
273
274
275#if @GNULIB_ASINF@
276# if @REPLACE_ASINF@
277#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
278#   undef asinf
279#   define asinf rpl_asinf
280#  endif
281_GL_FUNCDECL_RPL (asinf, float, (float x));
282_GL_CXXALIAS_RPL (asinf, float, (float x));
283# else
284#  if !@HAVE_ASINF@
285#   undef asinf
286_GL_FUNCDECL_SYS (asinf, float, (float x));
287#  endif
288_GL_CXXALIAS_SYS (asinf, float, (float x));
289# endif
290_GL_CXXALIASWARN (asinf);
291#elif defined GNULIB_POSIXCHECK
292# undef asinf
293# if HAVE_RAW_DECL_ASINF
294_GL_WARN_ON_USE (asinf, "asinf is unportable - "
295                 "use gnulib module asinf for portability");
296# endif
297#endif
298
299#if @GNULIB_ASINL@
300# if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
301#  undef asinl
302_GL_FUNCDECL_SYS (asinl, long double, (long double x));
303# endif
304_GL_CXXALIAS_SYS (asinl, long double, (long double x));
305_GL_CXXALIASWARN (asinl);
306#elif defined GNULIB_POSIXCHECK
307# undef asinl
308# if HAVE_RAW_DECL_ASINL
309_GL_WARN_ON_USE (asinl, "asinl is unportable - "
310                 "use gnulib module asinl for portability");
311# endif
312#endif
313
314
315#if @GNULIB_ATANF@
316# if @REPLACE_ATANF@
317#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
318#   undef atanf
319#   define atanf rpl_atanf
320#  endif
321_GL_FUNCDECL_RPL (atanf, float, (float x));
322_GL_CXXALIAS_RPL (atanf, float, (float x));
323# else
324#  if !@HAVE_ATANF@
325#   undef atanf
326_GL_FUNCDECL_SYS (atanf, float, (float x));
327#  endif
328_GL_CXXALIAS_SYS (atanf, float, (float x));
329# endif
330_GL_CXXALIASWARN (atanf);
331#elif defined GNULIB_POSIXCHECK
332# undef atanf
333# if HAVE_RAW_DECL_ATANF
334_GL_WARN_ON_USE (atanf, "atanf is unportable - "
335                 "use gnulib module atanf for portability");
336# endif
337#endif
338
339#if @GNULIB_ATANL@
340# if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
341#  undef atanl
342_GL_FUNCDECL_SYS (atanl, long double, (long double x));
343# endif
344_GL_CXXALIAS_SYS (atanl, long double, (long double x));
345_GL_CXXALIASWARN (atanl);
346#elif defined GNULIB_POSIXCHECK
347# undef atanl
348# if HAVE_RAW_DECL_ATANL
349_GL_WARN_ON_USE (atanl, "atanl is unportable - "
350                 "use gnulib module atanl for portability");
351# endif
352#endif
353
354
355#if @GNULIB_ATAN2F@
356# if @REPLACE_ATAN2F@
357#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
358#   undef atan2f
359#   define atan2f rpl_atan2f
360#  endif
361_GL_FUNCDECL_RPL (atan2f, float, (float y, float x));
362_GL_CXXALIAS_RPL (atan2f, float, (float y, float x));
363# else
364#  if !@HAVE_ATAN2F@
365#   undef atan2f
366_GL_FUNCDECL_SYS (atan2f, float, (float y, float x));
367#  endif
368_GL_CXXALIAS_SYS (atan2f, float, (float y, float x));
369# endif
370_GL_CXXALIASWARN (atan2f);
371#elif defined GNULIB_POSIXCHECK
372# undef atan2f
373# if HAVE_RAW_DECL_ATAN2F
374_GL_WARN_ON_USE (atan2f, "atan2f is unportable - "
375                 "use gnulib module atan2f for portability");
376# endif
377#endif
378
379
380#if @GNULIB_CBRTF@
381# if @REPLACE_CBRTF@
382#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
383#   undef cbrtf
384#   define cbrtf rpl_cbrtf
385#  endif
386_GL_FUNCDECL_RPL (cbrtf, float, (float x));
387_GL_CXXALIAS_RPL (cbrtf, float, (float x));
388# else
389#  if !@HAVE_DECL_CBRTF@
390_GL_FUNCDECL_SYS (cbrtf, float, (float x));
391#  endif
392_GL_CXXALIAS_SYS (cbrtf, float, (float x));
393# endif
394_GL_CXXALIASWARN (cbrtf);
395#elif defined GNULIB_POSIXCHECK
396# undef cbrtf
397# if HAVE_RAW_DECL_CBRTF
398_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - "
399                 "use gnulib module cbrtf for portability");
400# endif
401#endif
402
403#if @GNULIB_CBRT@
404# if !@HAVE_CBRT@
405_GL_FUNCDECL_SYS (cbrt, double, (double x));
406# endif
407_GL_CXXALIAS_SYS (cbrt, double, (double x));
408_GL_CXXALIASWARN (cbrt);
409#elif defined GNULIB_POSIXCHECK
410# undef cbrt
411# if HAVE_RAW_DECL_CBRT
412_GL_WARN_ON_USE (cbrt, "cbrt is unportable - "
413                 "use gnulib module cbrt for portability");
414# endif
415#endif
416
417#if @GNULIB_CBRTL@
418# if @REPLACE_CBRTL@
419#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
420#   undef cbrtl
421#   define cbrtl rpl_cbrtl
422#  endif
423_GL_FUNCDECL_RPL (cbrtl, long double, (long double x));
424_GL_CXXALIAS_RPL (cbrtl, long double, (long double x));
425# else
426#  if !@HAVE_DECL_CBRTL@
427_GL_FUNCDECL_SYS (cbrtl, long double, (long double x));
428#  endif
429_GL_CXXALIAS_SYS (cbrtl, long double, (long double x));
430# endif
431_GL_CXXALIASWARN (cbrtl);
432#elif defined GNULIB_POSIXCHECK
433# undef cbrtl
434# if HAVE_RAW_DECL_CBRTL
435_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - "
436                 "use gnulib module cbrtl for portability");
437# endif
438#endif
439
440
441#if @GNULIB_CEILF@
442# if @REPLACE_CEILF@
443#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
444#   undef ceilf
445#   define ceilf rpl_ceilf
446#  endif
447_GL_FUNCDECL_RPL (ceilf, float, (float x));
448_GL_CXXALIAS_RPL (ceilf, float, (float x));
449# else
450#  if !@HAVE_DECL_CEILF@
451#   undef ceilf
452_GL_FUNCDECL_SYS (ceilf, float, (float x));
453#  endif
454_GL_CXXALIAS_SYS (ceilf, float, (float x));
455# endif
456_GL_CXXALIASWARN (ceilf);
457#elif defined GNULIB_POSIXCHECK
458# undef ceilf
459# if HAVE_RAW_DECL_CEILF
460_GL_WARN_ON_USE (ceilf, "ceilf is unportable - "
461                 "use gnulib module ceilf for portability");
462# endif
463#endif
464
465#if @GNULIB_CEIL@
466# if @REPLACE_CEIL@
467#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
468#   undef ceil
469#   define ceil rpl_ceil
470#  endif
471_GL_FUNCDECL_RPL (ceil, double, (double x));
472_GL_CXXALIAS_RPL (ceil, double, (double x));
473# else
474_GL_CXXALIAS_SYS (ceil, double, (double x));
475# endif
476_GL_CXXALIASWARN (ceil);
477#endif
478
479#if @GNULIB_CEILL@
480# if @REPLACE_CEILL@
481#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
482#   undef ceill
483#   define ceill rpl_ceill
484#  endif
485_GL_FUNCDECL_RPL (ceill, long double, (long double x));
486_GL_CXXALIAS_RPL (ceill, long double, (long double x));
487# else
488#  if !@HAVE_DECL_CEILL@
489#   undef ceill
490_GL_FUNCDECL_SYS (ceill, long double, (long double x));
491#  endif
492_GL_CXXALIAS_SYS (ceill, long double, (long double x));
493# endif
494_GL_CXXALIASWARN (ceill);
495#elif defined GNULIB_POSIXCHECK
496# undef ceill
497# if HAVE_RAW_DECL_CEILL
498_GL_WARN_ON_USE (ceill, "ceill is unportable - "
499                 "use gnulib module ceill for portability");
500# endif
501#endif
502
503
504#if @GNULIB_COPYSIGNF@
505# if !@HAVE_DECL_COPYSIGNF@
506_GL_FUNCDECL_SYS (copysignf, float, (float x, float y));
507# endif
508_GL_CXXALIAS_SYS (copysignf, float, (float x, float y));
509_GL_CXXALIASWARN (copysignf);
510#elif defined GNULIB_POSIXCHECK
511# undef copysignf
512# if HAVE_RAW_DECL_COPYSIGNF
513_GL_WARN_ON_USE (copysignf, "copysignf is unportable - "
514                 "use gnulib module copysignf for portability");
515# endif
516#endif
517
518#if @GNULIB_COPYSIGN@
519# if !@HAVE_COPYSIGN@
520_GL_FUNCDECL_SYS (copysign, double, (double x, double y));
521# endif
522_GL_CXXALIAS_SYS (copysign, double, (double x, double y));
523_GL_CXXALIASWARN (copysign);
524#elif defined GNULIB_POSIXCHECK
525# undef copysign
526# if HAVE_RAW_DECL_COPYSIGN
527_GL_WARN_ON_USE (copysign, "copysign is unportable - "
528                 "use gnulib module copysign for portability");
529# endif
530#endif
531
532#if @GNULIB_COPYSIGNL@
533# if !@HAVE_COPYSIGNL@
534_GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y));
535# endif
536_GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y));
537_GL_CXXALIASWARN (copysignl);
538#elif defined GNULIB_POSIXCHECK
539# undef copysignl
540# if HAVE_RAW_DECL_COPYSIGNL
541_GL_WARN_ON_USE (copysign, "copysignl is unportable - "
542                 "use gnulib module copysignl for portability");
543# endif
544#endif
545
546
547#if @GNULIB_COSF@
548# if @REPLACE_COSF@
549#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
550#   undef cosf
551#   define cosf rpl_cosf
552#  endif
553_GL_FUNCDECL_RPL (cosf, float, (float x));
554_GL_CXXALIAS_RPL (cosf, float, (float x));
555# else
556#  if !@HAVE_COSF@
557#   undef cosf
558_GL_FUNCDECL_SYS (cosf, float, (float x));
559#  endif
560_GL_CXXALIAS_SYS (cosf, float, (float x));
561# endif
562_GL_CXXALIASWARN (cosf);
563#elif defined GNULIB_POSIXCHECK
564# undef cosf
565# if HAVE_RAW_DECL_COSF
566_GL_WARN_ON_USE (cosf, "cosf is unportable - "
567                 "use gnulib module cosf for portability");
568# endif
569#endif
570
571#if @GNULIB_COSL@
572# if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
573#  undef cosl
574_GL_FUNCDECL_SYS (cosl, long double, (long double x));
575# endif
576_GL_CXXALIAS_SYS (cosl, long double, (long double x));
577_GL_CXXALIASWARN (cosl);
578#elif defined GNULIB_POSIXCHECK
579# undef cosl
580# if HAVE_RAW_DECL_COSL
581_GL_WARN_ON_USE (cosl, "cosl is unportable - "
582                 "use gnulib module cosl for portability");
583# endif
584#endif
585
586
587#if @GNULIB_COSHF@
588# if @REPLACE_COSHF@
589#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
590#   undef coshf
591#   define coshf rpl_coshf
592#  endif
593_GL_FUNCDECL_RPL (coshf, float, (float x));
594_GL_CXXALIAS_RPL (coshf, float, (float x));
595# else
596#  if !@HAVE_COSHF@
597#   undef coshf
598_GL_FUNCDECL_SYS (coshf, float, (float x));
599#  endif
600_GL_CXXALIAS_SYS (coshf, float, (float x));
601# endif
602_GL_CXXALIASWARN (coshf);
603#elif defined GNULIB_POSIXCHECK
604# undef coshf
605# if HAVE_RAW_DECL_COSHF
606_GL_WARN_ON_USE (coshf, "coshf is unportable - "
607                 "use gnulib module coshf for portability");
608# endif
609#endif
610
611
612#if @GNULIB_EXPF@
613# if @REPLACE_EXPF@
614#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
615#   undef expf
616#   define expf rpl_expf
617#  endif
618_GL_FUNCDECL_RPL (expf, float, (float x));
619_GL_CXXALIAS_RPL (expf, float, (float x));
620# else
621#  if !@HAVE_EXPF@
622#   undef expf
623_GL_FUNCDECL_SYS (expf, float, (float x));
624#  endif
625_GL_CXXALIAS_SYS (expf, float, (float x));
626# endif
627_GL_CXXALIASWARN (expf);
628#elif defined GNULIB_POSIXCHECK
629# undef expf
630# if HAVE_RAW_DECL_EXPF
631_GL_WARN_ON_USE (expf, "expf is unportable - "
632                 "use gnulib module expf for portability");
633# endif
634#endif
635
636#if @GNULIB_EXPL@
637# if @REPLACE_EXPL@
638#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
639#   undef expl
640#   define expl rpl_expl
641#  endif
642_GL_FUNCDECL_RPL (expl, long double, (long double x));
643_GL_CXXALIAS_RPL (expl, long double, (long double x));
644# else
645#  if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
646#   undef expl
647_GL_FUNCDECL_SYS (expl, long double, (long double x));
648#  endif
649_GL_CXXALIAS_SYS (expl, long double, (long double x));
650# endif
651_GL_CXXALIASWARN (expl);
652#elif defined GNULIB_POSIXCHECK
653# undef expl
654# if HAVE_RAW_DECL_EXPL
655_GL_WARN_ON_USE (expl, "expl is unportable - "
656                 "use gnulib module expl for portability");
657# endif
658#endif
659
660
661#if @GNULIB_EXP2F@
662# if !@HAVE_DECL_EXP2F@
663_GL_FUNCDECL_SYS (exp2f, float, (float x));
664# endif
665_GL_CXXALIAS_SYS (exp2f, float, (float x));
666_GL_CXXALIASWARN (exp2f);
667#elif defined GNULIB_POSIXCHECK
668# undef exp2f
669# if HAVE_RAW_DECL_EXP2F
670_GL_WARN_ON_USE (exp2f, "exp2f is unportable - "
671                 "use gnulib module exp2f for portability");
672# endif
673#endif
674
675#if @GNULIB_EXP2@
676# if @REPLACE_EXP2@
677#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
678#   undef exp2
679#   define exp2 rpl_exp2
680#  endif
681_GL_FUNCDECL_RPL (exp2, double, (double x));
682_GL_CXXALIAS_RPL (exp2, double, (double x));
683# else
684#  if !@HAVE_DECL_EXP2@
685_GL_FUNCDECL_SYS (exp2, double, (double x));
686#  endif
687_GL_CXXALIAS_SYS (exp2, double, (double x));
688# endif
689_GL_CXXALIASWARN (exp2);
690#elif defined GNULIB_POSIXCHECK
691# undef exp2
692# if HAVE_RAW_DECL_EXP2
693_GL_WARN_ON_USE (exp2, "exp2 is unportable - "
694                 "use gnulib module exp2 for portability");
695# endif
696#endif
697
698#if @GNULIB_EXP2L@
699# if @REPLACE_EXP2L@
700#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
701#   undef exp2l
702#   define exp2l rpl_exp2l
703#  endif
704_GL_FUNCDECL_RPL (exp2l, long double, (long double x));
705_GL_CXXALIAS_RPL (exp2l, long double, (long double x));
706# else
707#  if !@HAVE_DECL_EXP2L@
708#   undef exp2l
709_GL_FUNCDECL_SYS (exp2l, long double, (long double x));
710#  endif
711_GL_CXXALIAS_SYS (exp2l, long double, (long double x));
712# endif
713_GL_CXXALIASWARN (exp2l);
714#elif defined GNULIB_POSIXCHECK
715# undef exp2l
716# if HAVE_RAW_DECL_EXP2L
717_GL_WARN_ON_USE (exp2l, "exp2l is unportable - "
718                 "use gnulib module exp2l for portability");
719# endif
720#endif
721
722
723#if @GNULIB_EXPM1F@
724# if @REPLACE_EXPM1F@
725#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
726#   undef expm1f
727#   define expm1f rpl_expm1f
728#  endif
729_GL_FUNCDECL_RPL (expm1f, float, (float x));
730_GL_CXXALIAS_RPL (expm1f, float, (float x));
731# else
732#  if !@HAVE_EXPM1F@
733_GL_FUNCDECL_SYS (expm1f, float, (float x));
734#  endif
735_GL_CXXALIAS_SYS (expm1f, float, (float x));
736# endif
737_GL_CXXALIASWARN (expm1f);
738#elif defined GNULIB_POSIXCHECK
739# undef expm1f
740# if HAVE_RAW_DECL_EXPM1F
741_GL_WARN_ON_USE (expm1f, "expm1f is unportable - "
742                 "use gnulib module expm1f for portability");
743# endif
744#endif
745
746#if @GNULIB_EXPM1@
747# if @REPLACE_EXPM1@
748#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
749#   undef expm1
750#   define expm1 rpl_expm1
751#  endif
752_GL_FUNCDECL_RPL (expm1, double, (double x));
753_GL_CXXALIAS_RPL (expm1, double, (double x));
754# else
755#  if !@HAVE_EXPM1@
756_GL_FUNCDECL_SYS (expm1, double, (double x));
757#  endif
758_GL_CXXALIAS_SYS (expm1, double, (double x));
759# endif
760_GL_CXXALIASWARN (expm1);
761#elif defined GNULIB_POSIXCHECK
762# undef expm1
763# if HAVE_RAW_DECL_EXPM1
764_GL_WARN_ON_USE (expm1, "expm1 is unportable - "
765                 "use gnulib module expm1 for portability");
766# endif
767#endif
768
769#if @GNULIB_EXPM1L@
770# if @REPLACE_EXPM1L@
771#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
772#   undef expm1l
773#   define expm1l rpl_expm1l
774#  endif
775_GL_FUNCDECL_RPL (expm1l, long double, (long double x));
776_GL_CXXALIAS_RPL (expm1l, long double, (long double x));
777# else
778#  if !@HAVE_DECL_EXPM1L@
779#   undef expm1l
780_GL_FUNCDECL_SYS (expm1l, long double, (long double x));
781#  endif
782_GL_CXXALIAS_SYS (expm1l, long double, (long double x));
783# endif
784_GL_CXXALIASWARN (expm1l);
785#elif defined GNULIB_POSIXCHECK
786# undef expm1l
787# if HAVE_RAW_DECL_EXPM1L
788_GL_WARN_ON_USE (expm1l, "expm1l is unportable - "
789                 "use gnulib module expm1l for portability");
790# endif
791#endif
792
793
794#if @GNULIB_FABSF@
795# if !@HAVE_FABSF@
796#  undef fabsf
797_GL_FUNCDECL_SYS (fabsf, float, (float x));
798# endif
799_GL_CXXALIAS_SYS (fabsf, float, (float x));
800_GL_CXXALIASWARN (fabsf);
801#elif defined GNULIB_POSIXCHECK
802# undef fabsf
803# if HAVE_RAW_DECL_FABSF
804_GL_WARN_ON_USE (fabsf, "fabsf is unportable - "
805                 "use gnulib module fabsf for portability");
806# endif
807#endif
808
809#if @GNULIB_FABSL@
810# if @REPLACE_FABSL@
811#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
812#   undef fabsl
813#   define fabsl rpl_fabsl
814#  endif
815_GL_FUNCDECL_RPL (fabsl, long double, (long double x));
816_GL_CXXALIAS_RPL (fabsl, long double, (long double x));
817# else
818#  if !@HAVE_FABSL@
819#   undef fabsl
820_GL_FUNCDECL_SYS (fabsl, long double, (long double x));
821#  endif
822_GL_CXXALIAS_SYS (fabsl, long double, (long double x));
823# endif
824_GL_CXXALIASWARN (fabsl);
825#elif defined GNULIB_POSIXCHECK
826# undef fabsl
827# if HAVE_RAW_DECL_FABSL
828_GL_WARN_ON_USE (fabsl, "fabsl is unportable - "
829                 "use gnulib module fabsl for portability");
830# endif
831#endif
832
833
834#if @GNULIB_FLOORF@
835# if @REPLACE_FLOORF@
836#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
837#   undef floorf
838#   define floorf rpl_floorf
839#  endif
840_GL_FUNCDECL_RPL (floorf, float, (float x));
841_GL_CXXALIAS_RPL (floorf, float, (float x));
842# else
843#  if !@HAVE_DECL_FLOORF@
844#   undef floorf
845_GL_FUNCDECL_SYS (floorf, float, (float x));
846#  endif
847_GL_CXXALIAS_SYS (floorf, float, (float x));
848# endif
849_GL_CXXALIASWARN (floorf);
850#elif defined GNULIB_POSIXCHECK
851# undef floorf
852# if HAVE_RAW_DECL_FLOORF
853_GL_WARN_ON_USE (floorf, "floorf is unportable - "
854                 "use gnulib module floorf for portability");
855# endif
856#endif
857
858#if @GNULIB_FLOOR@
859# if @REPLACE_FLOOR@
860#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
861#   undef floor
862#   define floor rpl_floor
863#  endif
864_GL_FUNCDECL_RPL (floor, double, (double x));
865_GL_CXXALIAS_RPL (floor, double, (double x));
866# else
867_GL_CXXALIAS_SYS (floor, double, (double x));
868# endif
869_GL_CXXALIASWARN (floor);
870#endif
871
872#if @GNULIB_FLOORL@
873# if @REPLACE_FLOORL@
874#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
875#   undef floorl
876#   define floorl rpl_floorl
877#  endif
878_GL_FUNCDECL_RPL (floorl, long double, (long double x));
879_GL_CXXALIAS_RPL (floorl, long double, (long double x));
880# else
881#  if !@HAVE_DECL_FLOORL@
882#   undef floorl
883_GL_FUNCDECL_SYS (floorl, long double, (long double x));
884#  endif
885_GL_CXXALIAS_SYS (floorl, long double, (long double x));
886# endif
887_GL_CXXALIASWARN (floorl);
888#elif defined GNULIB_POSIXCHECK
889# undef floorl
890# if HAVE_RAW_DECL_FLOORL
891_GL_WARN_ON_USE (floorl, "floorl is unportable - "
892                 "use gnulib module floorl for portability");
893# endif
894#endif
895
896
897#if @GNULIB_FMAF@
898# if @REPLACE_FMAF@
899#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
900#   undef fmaf
901#   define fmaf rpl_fmaf
902#  endif
903_GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z));
904_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z));
905# else
906#  if !@HAVE_FMAF@
907_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z));
908#  endif
909_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z));
910# endif
911_GL_CXXALIASWARN (fmaf);
912#elif defined GNULIB_POSIXCHECK
913# undef fmaf
914# if HAVE_RAW_DECL_FMAF
915_GL_WARN_ON_USE (fmaf, "fmaf is unportable - "
916                 "use gnulib module fmaf for portability");
917# endif
918#endif
919
920#if @GNULIB_FMA@
921# if @REPLACE_FMA@
922#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
923#   undef fma
924#   define fma rpl_fma
925#  endif
926_GL_FUNCDECL_RPL (fma, double, (double x, double y, double z));
927_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z));
928# else
929#  if !@HAVE_FMA@
930_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z));
931#  endif
932_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z));
933# endif
934_GL_CXXALIASWARN (fma);
935#elif defined GNULIB_POSIXCHECK
936# undef fma
937# if HAVE_RAW_DECL_FMA
938_GL_WARN_ON_USE (fma, "fma is unportable - "
939                 "use gnulib module fma for portability");
940# endif
941#endif
942
943#if @GNULIB_FMAL@
944# if @REPLACE_FMAL@
945#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
946#   undef fmal
947#   define fmal rpl_fmal
948#  endif
949_GL_FUNCDECL_RPL (fmal, long double,
950                  (long double x, long double y, long double z));
951_GL_CXXALIAS_RPL (fmal, long double,
952                  (long double x, long double y, long double z));
953# else
954#  if !@HAVE_FMAL@
955#   undef fmal
956_GL_FUNCDECL_SYS (fmal, long double,
957                  (long double x, long double y, long double z));
958#  endif
959_GL_CXXALIAS_SYS (fmal, long double,
960                  (long double x, long double y, long double z));
961# endif
962_GL_CXXALIASWARN (fmal);
963#elif defined GNULIB_POSIXCHECK
964# undef fmal
965# if HAVE_RAW_DECL_FMAL
966_GL_WARN_ON_USE (fmal, "fmal is unportable - "
967                 "use gnulib module fmal for portability");
968# endif
969#endif
970
971
972#if @GNULIB_FMODF@
973# if @REPLACE_FMODF@
974#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
975#   undef fmodf
976#   define fmodf rpl_fmodf
977#  endif
978_GL_FUNCDECL_RPL (fmodf, float, (float x, float y));
979_GL_CXXALIAS_RPL (fmodf, float, (float x, float y));
980# else
981#  if !@HAVE_FMODF@
982#   undef fmodf
983_GL_FUNCDECL_SYS (fmodf, float, (float x, float y));
984#  endif
985_GL_CXXALIAS_SYS (fmodf, float, (float x, float y));
986# endif
987_GL_CXXALIASWARN (fmodf);
988#elif defined GNULIB_POSIXCHECK
989# undef fmodf
990# if HAVE_RAW_DECL_FMODF
991_GL_WARN_ON_USE (fmodf, "fmodf is unportable - "
992                 "use gnulib module fmodf for portability");
993# endif
994#endif
995
996#if @GNULIB_FMOD@
997# if @REPLACE_FMOD@
998#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
999#   undef fmod
1000#   define fmod rpl_fmod
1001#  endif
1002_GL_FUNCDECL_RPL (fmod, double, (double x, double y));
1003_GL_CXXALIAS_RPL (fmod, double, (double x, double y));
1004# else
1005_GL_CXXALIAS_SYS (fmod, double, (double x, double y));
1006# endif
1007_GL_CXXALIASWARN (fmod);
1008#elif defined GNULIB_POSIXCHECK
1009# undef fmod
1010# if HAVE_RAW_DECL_FMOD
1011_GL_WARN_ON_USE (fmod, "fmod has portability problems - "
1012                 "use gnulib module fmod for portability");
1013# endif
1014#endif
1015
1016#if @GNULIB_FMODL@
1017# if @REPLACE_FMODL@
1018#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1019#   undef fmodl
1020#   define fmodl rpl_fmodl
1021#  endif
1022_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y));
1023_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y));
1024# else
1025#  if !@HAVE_FMODL@
1026#   undef fmodl
1027_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y));
1028#  endif
1029_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y));
1030# endif
1031_GL_CXXALIASWARN (fmodl);
1032#elif defined GNULIB_POSIXCHECK
1033# undef fmodl
1034# if HAVE_RAW_DECL_FMODL
1035_GL_WARN_ON_USE (fmodl, "fmodl is unportable - "
1036                 "use gnulib module fmodl for portability");
1037# endif
1038#endif
1039
1040
1041/* Write x as
1042     x = mantissa * 2^exp
1043   where
1044     If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1045     If x is zero: mantissa = x, exp = 0.
1046     If x is infinite or NaN: mantissa = x, exp unspecified.
1047   Store exp in *EXPPTR and return mantissa.  */
1048#if @GNULIB_FREXPF@
1049# if @REPLACE_FREXPF@
1050#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1051#   undef frexpf
1052#   define frexpf rpl_frexpf
1053#  endif
1054_GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2)));
1055_GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr));
1056# else
1057#  if !@HAVE_FREXPF@
1058#   undef frexpf
1059_GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2)));
1060#  endif
1061_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr));
1062# endif
1063_GL_CXXALIASWARN (frexpf);
1064#elif defined GNULIB_POSIXCHECK
1065# undef frexpf
1066# if HAVE_RAW_DECL_FREXPF
1067_GL_WARN_ON_USE (frexpf, "frexpf is unportable - "
1068                 "use gnulib module frexpf for portability");
1069# endif
1070#endif
1071
1072/* Write x as
1073     x = mantissa * 2^exp
1074   where
1075     If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1076     If x is zero: mantissa = x, exp = 0.
1077     If x is infinite or NaN: mantissa = x, exp unspecified.
1078   Store exp in *EXPPTR and return mantissa.  */
1079#if @GNULIB_FREXP@
1080# if @REPLACE_FREXP@
1081#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1082#   undef frexp
1083#   define frexp rpl_frexp
1084#  endif
1085_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2)));
1086_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr));
1087# else
1088_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr));
1089# endif
1090_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr));
1091#elif defined GNULIB_POSIXCHECK
1092# undef frexp
1093/* Assume frexp is always declared.  */
1094_GL_WARN_ON_USE (frexp, "frexp is unportable - "
1095                 "use gnulib module frexp for portability");
1096#endif
1097
1098/* Write x as
1099     x = mantissa * 2^exp
1100   where
1101     If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
1102     If x is zero: mantissa = x, exp = 0.
1103     If x is infinite or NaN: mantissa = x, exp unspecified.
1104   Store exp in *EXPPTR and return mantissa.  */
1105#if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
1106# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1107#  undef frexpl
1108#  define frexpl rpl_frexpl
1109# endif
1110_GL_FUNCDECL_RPL (frexpl, long double,
1111                  (long double x, int *expptr) _GL_ARG_NONNULL ((2)));
1112_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr));
1113#else
1114# if !@HAVE_DECL_FREXPL@
1115_GL_FUNCDECL_SYS (frexpl, long double,
1116                  (long double x, int *expptr) _GL_ARG_NONNULL ((2)));
1117# endif
1118# if @GNULIB_FREXPL@
1119_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr));
1120# endif
1121#endif
1122#if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
1123_GL_CXXALIASWARN (frexpl);
1124#endif
1125#if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
1126# undef frexpl
1127# if HAVE_RAW_DECL_FREXPL
1128_GL_WARN_ON_USE (frexpl, "frexpl is unportable - "
1129                 "use gnulib module frexpl for portability");
1130# endif
1131#endif
1132
1133
1134/* Return sqrt(x^2+y^2).  */
1135#if @GNULIB_HYPOTF@
1136# if @REPLACE_HYPOTF@
1137#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1138#   undef hypotf
1139#   define hypotf rpl_hypotf
1140#  endif
1141_GL_FUNCDECL_RPL (hypotf, float, (float x, float y));
1142_GL_CXXALIAS_RPL (hypotf, float, (float x, float y));
1143# else
1144#  if !@HAVE_HYPOTF@
1145_GL_FUNCDECL_SYS (hypotf, float, (float x, float y));
1146#  endif
1147_GL_CXXALIAS_SYS (hypotf, float, (float x, float y));
1148# endif
1149_GL_CXXALIASWARN (hypotf);
1150#elif defined GNULIB_POSIXCHECK
1151# undef hypotf
1152# if HAVE_RAW_DECL_HYPOTF
1153_GL_WARN_ON_USE (hypotf, "hypotf is unportable - "
1154                 "use gnulib module hypotf for portability");
1155# endif
1156#endif
1157
1158/* Return sqrt(x^2+y^2).  */
1159#if @GNULIB_HYPOT@
1160# if @REPLACE_HYPOT@
1161#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1162#   undef hypot
1163#   define hypot rpl_hypot
1164#  endif
1165_GL_FUNCDECL_RPL (hypot, double, (double x, double y));
1166_GL_CXXALIAS_RPL (hypot, double, (double x, double y));
1167# else
1168_GL_CXXALIAS_SYS (hypot, double, (double x, double y));
1169# endif
1170_GL_CXXALIASWARN (hypot);
1171#elif defined GNULIB_POSIXCHECK
1172# undef hypot
1173# if HAVE_RAW_DECL_HYPOT
1174_GL_WARN_ON_USE (hypotf, "hypot has portability problems - "
1175                 "use gnulib module hypot for portability");
1176# endif
1177#endif
1178
1179/* Return sqrt(x^2+y^2).  */
1180#if @GNULIB_HYPOTL@
1181# if @REPLACE_HYPOTL@
1182#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1183#   undef hypotl
1184#   define hypotl rpl_hypotl
1185#  endif
1186_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y));
1187_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y));
1188# else
1189#  if !@HAVE_HYPOTL@
1190_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y));
1191#  endif
1192_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y));
1193# endif
1194_GL_CXXALIASWARN (hypotl);
1195#elif defined GNULIB_POSIXCHECK
1196# undef hypotl
1197# if HAVE_RAW_DECL_HYPOTL
1198_GL_WARN_ON_USE (hypotl, "hypotl is unportable - "
1199                 "use gnulib module hypotl for portability");
1200# endif
1201#endif
1202
1203
1204#if @GNULIB_ILOGBF@
1205# if @REPLACE_ILOGBF@
1206#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1207#   undef ilogbf
1208#   define ilogbf rpl_ilogbf
1209#  endif
1210_GL_FUNCDECL_RPL (ilogbf, int, (float x));
1211_GL_CXXALIAS_RPL (ilogbf, int, (float x));
1212# else
1213#  if !@HAVE_ILOGBF@
1214_GL_FUNCDECL_SYS (ilogbf, int, (float x));
1215#  endif
1216_GL_CXXALIAS_SYS (ilogbf, int, (float x));
1217# endif
1218_GL_CXXALIASWARN (ilogbf);
1219#elif defined GNULIB_POSIXCHECK
1220# undef ilogbf
1221# if HAVE_RAW_DECL_ILOGBF
1222_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - "
1223                 "use gnulib module ilogbf for portability");
1224# endif
1225#endif
1226
1227#if @GNULIB_ILOGB@
1228# if @REPLACE_ILOGB@
1229#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1230#   undef ilogb
1231#   define ilogb rpl_ilogb
1232#  endif
1233_GL_FUNCDECL_RPL (ilogb, int, (double x));
1234_GL_CXXALIAS_RPL (ilogb, int, (double x));
1235# else
1236#  if !@HAVE_ILOGB@
1237_GL_FUNCDECL_SYS (ilogb, int, (double x));
1238#  endif
1239_GL_CXXALIAS_SYS (ilogb, int, (double x));
1240# endif
1241_GL_CXXALIASWARN (ilogb);
1242#elif defined GNULIB_POSIXCHECK
1243# undef ilogb
1244# if HAVE_RAW_DECL_ILOGB
1245_GL_WARN_ON_USE (ilogb, "ilogb is unportable - "
1246                 "use gnulib module ilogb for portability");
1247# endif
1248#endif
1249
1250#if @GNULIB_ILOGBL@
1251# if @REPLACE_ILOGBL@
1252#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1253#   undef ilogbl
1254#   define ilogbl rpl_ilogbl
1255#  endif
1256_GL_FUNCDECL_RPL (ilogbl, int, (long double x));
1257_GL_CXXALIAS_RPL (ilogbl, int, (long double x));
1258# else
1259#  if !@HAVE_ILOGBL@
1260_GL_FUNCDECL_SYS (ilogbl, int, (long double x));
1261#  endif
1262_GL_CXXALIAS_SYS (ilogbl, int, (long double x));
1263# endif
1264_GL_CXXALIASWARN (ilogbl);
1265#elif defined GNULIB_POSIXCHECK
1266# undef ilogbl
1267# if HAVE_RAW_DECL_ILOGBL
1268_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - "
1269                 "use gnulib module ilogbl for portability");
1270# endif
1271#endif
1272
1273
1274/* Return x * 2^exp.  */
1275#if @GNULIB_LDEXPF@
1276# if !@HAVE_LDEXPF@
1277#  undef ldexpf
1278_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp));
1279# endif
1280_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp));
1281_GL_CXXALIASWARN (ldexpf);
1282#elif defined GNULIB_POSIXCHECK
1283# undef ldexpf
1284# if HAVE_RAW_DECL_LDEXPF
1285_GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - "
1286                 "use gnulib module ldexpf for portability");
1287# endif
1288#endif
1289
1290/* Return x * 2^exp.  */
1291#if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
1292# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1293#  undef ldexpl
1294#  define ldexpl rpl_ldexpl
1295# endif
1296_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp));
1297_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp));
1298#else
1299# if !@HAVE_DECL_LDEXPL@
1300_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp));
1301# endif
1302# if @GNULIB_LDEXPL@
1303_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp));
1304# endif
1305#endif
1306#if @GNULIB_LDEXPL@
1307_GL_CXXALIASWARN (ldexpl);
1308#endif
1309#if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
1310# undef ldexpl
1311# if HAVE_RAW_DECL_LDEXPL
1312_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - "
1313                 "use gnulib module ldexpl for portability");
1314# endif
1315#endif
1316
1317
1318#if @GNULIB_LOGF@
1319# if @REPLACE_LOGF@
1320#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1321#   undef logf
1322#   define logf rpl_logf
1323#  endif
1324_GL_FUNCDECL_RPL (logf, float, (float x));
1325_GL_CXXALIAS_RPL (logf, float, (float x));
1326# else
1327#  if !@HAVE_LOGF@
1328#   undef logf
1329_GL_FUNCDECL_SYS (logf, float, (float x));
1330#  endif
1331_GL_CXXALIAS_SYS (logf, float, (float x));
1332# endif
1333_GL_CXXALIASWARN (logf);
1334#elif defined GNULIB_POSIXCHECK
1335# undef logf
1336# if HAVE_RAW_DECL_LOGF
1337_GL_WARN_ON_USE (logf, "logf is unportable - "
1338                 "use gnulib module logf for portability");
1339# endif
1340#endif
1341
1342#if @GNULIB_LOG@
1343# if @REPLACE_LOG@
1344#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1345#   undef log
1346#   define log rpl_log
1347#  endif
1348_GL_FUNCDECL_RPL (log, double, (double x));
1349_GL_CXXALIAS_RPL (log, double, (double x));
1350# else
1351_GL_CXXALIAS_SYS (log, double, (double x));
1352# endif
1353_GL_CXXALIASWARN (log);
1354#elif defined GNULIB_POSIXCHECK
1355# undef log
1356# if HAVE_RAW_DECL_LOG
1357_GL_WARN_ON_USE (log, "log has portability problems - "
1358                 "use gnulib module log for portability");
1359# endif
1360#endif
1361
1362#if @GNULIB_LOGL@
1363# if @REPLACE_LOGL@
1364#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1365#   undef logl
1366#   define logl rpl_logl
1367#  endif
1368_GL_FUNCDECL_RPL (logl, long double, (long double x));
1369_GL_CXXALIAS_RPL (logl, long double, (long double x));
1370# else
1371#  if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
1372#   undef logl
1373_GL_FUNCDECL_SYS (logl, long double, (long double x));
1374#  endif
1375_GL_CXXALIAS_SYS (logl, long double, (long double x));
1376# endif
1377_GL_CXXALIASWARN (logl);
1378#elif defined GNULIB_POSIXCHECK
1379# undef logl
1380# if HAVE_RAW_DECL_LOGL
1381_GL_WARN_ON_USE (logl, "logl is unportable - "
1382                 "use gnulib module logl for portability");
1383# endif
1384#endif
1385
1386
1387#if @GNULIB_LOG10F@
1388# if @REPLACE_LOG10F@
1389#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1390#   undef log10f
1391#   define log10f rpl_log10f
1392#  endif
1393_GL_FUNCDECL_RPL (log10f, float, (float x));
1394_GL_CXXALIAS_RPL (log10f, float, (float x));
1395# else
1396#  if !@HAVE_LOG10F@
1397#   undef log10f
1398_GL_FUNCDECL_SYS (log10f, float, (float x));
1399#  endif
1400_GL_CXXALIAS_SYS (log10f, float, (float x));
1401# endif
1402_GL_CXXALIASWARN (log10f);
1403#elif defined GNULIB_POSIXCHECK
1404# undef log10f
1405# if HAVE_RAW_DECL_LOG10F
1406_GL_WARN_ON_USE (log10f, "log10f is unportable - "
1407                 "use gnulib module log10f for portability");
1408# endif
1409#endif
1410
1411#if @GNULIB_LOG10@
1412# if @REPLACE_LOG10@
1413#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1414#   undef log10
1415#   define log10 rpl_log10
1416#  endif
1417_GL_FUNCDECL_RPL (log10, double, (double x));
1418_GL_CXXALIAS_RPL (log10, double, (double x));
1419# else
1420_GL_CXXALIAS_SYS (log10, double, (double x));
1421# endif
1422_GL_CXXALIASWARN (log10);
1423#elif defined GNULIB_POSIXCHECK
1424# undef log10
1425# if HAVE_RAW_DECL_LOG10
1426_GL_WARN_ON_USE (log10, "log10 has portability problems - "
1427                 "use gnulib module log10 for portability");
1428# endif
1429#endif
1430
1431#if @GNULIB_LOG10L@
1432# if @REPLACE_LOG10L@
1433#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1434#   undef log10l
1435#   define log10l rpl_log10l
1436#  endif
1437_GL_FUNCDECL_RPL (log10l, long double, (long double x));
1438_GL_CXXALIAS_RPL (log10l, long double, (long double x));
1439# else
1440#  if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
1441#   undef log10l
1442_GL_FUNCDECL_SYS (log10l, long double, (long double x));
1443#  endif
1444_GL_CXXALIAS_SYS (log10l, long double, (long double x));
1445# endif
1446_GL_CXXALIASWARN (log10l);
1447#elif defined GNULIB_POSIXCHECK
1448# undef log10l
1449# if HAVE_RAW_DECL_LOG10L
1450_GL_WARN_ON_USE (log10l, "log10l is unportable - "
1451                 "use gnulib module log10l for portability");
1452# endif
1453#endif
1454
1455
1456#if @GNULIB_LOG1PF@
1457# if @REPLACE_LOG1PF@
1458#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1459#   undef log1pf
1460#   define log1pf rpl_log1pf
1461#  endif
1462_GL_FUNCDECL_RPL (log1pf, float, (float x));
1463_GL_CXXALIAS_RPL (log1pf, float, (float x));
1464# else
1465#  if !@HAVE_LOG1PF@
1466_GL_FUNCDECL_SYS (log1pf, float, (float x));
1467#  endif
1468_GL_CXXALIAS_SYS (log1pf, float, (float x));
1469# endif
1470_GL_CXXALIASWARN (log1pf);
1471#elif defined GNULIB_POSIXCHECK
1472# undef log1pf
1473# if HAVE_RAW_DECL_LOG1PF
1474_GL_WARN_ON_USE (log1pf, "log1pf is unportable - "
1475                 "use gnulib module log1pf for portability");
1476# endif
1477#endif
1478
1479#if @GNULIB_LOG1P@
1480# if @REPLACE_LOG1P@
1481#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1482#   undef log1p
1483#   define log1p rpl_log1p
1484#  endif
1485_GL_FUNCDECL_RPL (log1p, double, (double x));
1486_GL_CXXALIAS_RPL (log1p, double, (double x));
1487# else
1488#  if !@HAVE_LOG1P@
1489_GL_FUNCDECL_SYS (log1p, double, (double x));
1490#  endif
1491_GL_CXXALIAS_SYS (log1p, double, (double x));
1492# endif
1493_GL_CXXALIASWARN (log1p);
1494#elif defined GNULIB_POSIXCHECK
1495# undef log1p
1496# if HAVE_RAW_DECL_LOG1P
1497_GL_WARN_ON_USE (log1p, "log1p has portability problems - "
1498                 "use gnulib module log1p for portability");
1499# endif
1500#endif
1501
1502#if @GNULIB_LOG1PL@
1503# if @REPLACE_LOG1PL@
1504#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1505#   undef log1pl
1506#   define log1pl rpl_log1pl
1507#  endif
1508_GL_FUNCDECL_RPL (log1pl, long double, (long double x));
1509_GL_CXXALIAS_RPL (log1pl, long double, (long double x));
1510# else
1511#  if !@HAVE_LOG1PL@
1512_GL_FUNCDECL_SYS (log1pl, long double, (long double x));
1513#  endif
1514_GL_CXXALIAS_SYS (log1pl, long double, (long double x));
1515# endif
1516_GL_CXXALIASWARN (log1pl);
1517#elif defined GNULIB_POSIXCHECK
1518# undef log1pl
1519# if HAVE_RAW_DECL_LOG1PL
1520_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - "
1521                 "use gnulib module log1pl for portability");
1522# endif
1523#endif
1524
1525
1526#if @GNULIB_LOG2F@
1527# if @REPLACE_LOG2F@
1528#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1529#   undef log2f
1530#   define log2f rpl_log2f
1531#  endif
1532_GL_FUNCDECL_RPL (log2f, float, (float x));
1533_GL_CXXALIAS_RPL (log2f, float, (float x));
1534# else
1535#  if !@HAVE_DECL_LOG2F@
1536#   undef log2f
1537_GL_FUNCDECL_SYS (log2f, float, (float x));
1538#  endif
1539_GL_CXXALIAS_SYS (log2f, float, (float x));
1540# endif
1541_GL_CXXALIASWARN (log2f);
1542#elif defined GNULIB_POSIXCHECK
1543# undef log2f
1544# if HAVE_RAW_DECL_LOG2F
1545_GL_WARN_ON_USE (log2f, "log2f is unportable - "
1546                 "use gnulib module log2f for portability");
1547# endif
1548#endif
1549
1550#if @GNULIB_LOG2@
1551# if @REPLACE_LOG2@
1552#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1553#   undef log2
1554#   define log2 rpl_log2
1555#  endif
1556_GL_FUNCDECL_RPL (log2, double, (double x));
1557_GL_CXXALIAS_RPL (log2, double, (double x));
1558# else
1559#  if !@HAVE_DECL_LOG2@
1560#   undef log2
1561_GL_FUNCDECL_SYS (log2, double, (double x));
1562#  endif
1563_GL_CXXALIAS_SYS (log2, double, (double x));
1564# endif
1565_GL_CXXALIASWARN (log2);
1566#elif defined GNULIB_POSIXCHECK
1567# undef log2
1568# if HAVE_RAW_DECL_LOG2
1569_GL_WARN_ON_USE (log2, "log2 is unportable - "
1570                 "use gnulib module log2 for portability");
1571# endif
1572#endif
1573
1574#if @GNULIB_LOG2L@
1575# if @REPLACE_LOG2L@
1576#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1577#   undef log2l
1578#   define log2l rpl_log2l
1579#  endif
1580_GL_FUNCDECL_RPL (log2l, long double, (long double x));
1581_GL_CXXALIAS_RPL (log2l, long double, (long double x));
1582# else
1583#  if !@HAVE_DECL_LOG2L@
1584_GL_FUNCDECL_SYS (log2l, long double, (long double x));
1585#  endif
1586_GL_CXXALIAS_SYS (log2l, long double, (long double x));
1587# endif
1588_GL_CXXALIASWARN (log2l);
1589#elif defined GNULIB_POSIXCHECK
1590# undef log2l
1591# if HAVE_RAW_DECL_LOG2L
1592_GL_WARN_ON_USE (log2l, "log2l is unportable - "
1593                 "use gnulib module log2l for portability");
1594# endif
1595#endif
1596
1597
1598#if @GNULIB_LOGBF@
1599# if @REPLACE_LOGBF@
1600#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1601#   undef logbf
1602#   define logbf rpl_logbf
1603#  endif
1604_GL_FUNCDECL_RPL (logbf, float, (float x));
1605_GL_CXXALIAS_RPL (logbf, float, (float x));
1606# else
1607#  if !@HAVE_LOGBF@
1608_GL_FUNCDECL_SYS (logbf, float, (float x));
1609#  endif
1610_GL_CXXALIAS_SYS (logbf, float, (float x));
1611# endif
1612_GL_CXXALIASWARN (logbf);
1613#elif defined GNULIB_POSIXCHECK
1614# undef logbf
1615# if HAVE_RAW_DECL_LOGBF
1616_GL_WARN_ON_USE (logbf, "logbf is unportable - "
1617                 "use gnulib module logbf for portability");
1618# endif
1619#endif
1620
1621#if @GNULIB_LOGB@
1622# if @REPLACE_LOGB@
1623#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1624#   undef logb
1625#   define logb rpl_logb
1626#  endif
1627_GL_FUNCDECL_RPL (logb, double, (double x));
1628_GL_CXXALIAS_RPL (logb, double, (double x));
1629# else
1630#  if !@HAVE_DECL_LOGB@
1631_GL_FUNCDECL_SYS (logb, double, (double x));
1632#  endif
1633_GL_CXXALIAS_SYS (logb, double, (double x));
1634# endif
1635_GL_CXXALIASWARN (logb);
1636#elif defined GNULIB_POSIXCHECK
1637# undef logb
1638# if HAVE_RAW_DECL_LOGB
1639_GL_WARN_ON_USE (logb, "logb is unportable - "
1640                 "use gnulib module logb for portability");
1641# endif
1642#endif
1643
1644#if @GNULIB_LOGBL@
1645# if @REPLACE_LOGBL@
1646#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1647#   undef logbl
1648#   define logbl rpl_logbl
1649#  endif
1650_GL_FUNCDECL_RPL (logbl, long double, (long double x));
1651_GL_CXXALIAS_RPL (logbl, long double, (long double x));
1652# else
1653#  if !@HAVE_LOGBL@
1654_GL_FUNCDECL_SYS (logbl, long double, (long double x));
1655#  endif
1656_GL_CXXALIAS_SYS (logbl, long double, (long double x));
1657# endif
1658_GL_CXXALIASWARN (logbl);
1659#elif defined GNULIB_POSIXCHECK
1660# undef logbl
1661# if HAVE_RAW_DECL_LOGBL
1662_GL_WARN_ON_USE (logbl, "logbl is unportable - "
1663                 "use gnulib module logbl for portability");
1664# endif
1665#endif
1666
1667
1668#if @GNULIB_MODFF@
1669# if @REPLACE_MODFF@
1670#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1671#   undef modff
1672#   define modff rpl_modff
1673#  endif
1674_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2)));
1675_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr));
1676# else
1677#  if !@HAVE_MODFF@
1678#   undef modff
1679_GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2)));
1680#  endif
1681_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr));
1682# endif
1683_GL_CXXALIASWARN (modff);
1684#elif defined GNULIB_POSIXCHECK
1685# undef modff
1686# if HAVE_RAW_DECL_MODFF
1687_GL_WARN_ON_USE (modff, "modff is unportable - "
1688                 "use gnulib module modff for portability");
1689# endif
1690#endif
1691
1692#if @GNULIB_MODF@
1693# if @REPLACE_MODF@
1694#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1695#   undef modf
1696#   define modf rpl_modf
1697#  endif
1698_GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2)));
1699_GL_CXXALIAS_RPL (modf, double, (double x, double *iptr));
1700# else
1701_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr));
1702# endif
1703_GL_CXXALIASWARN (modf);
1704#elif defined GNULIB_POSIXCHECK
1705# undef modf
1706# if HAVE_RAW_DECL_MODF
1707_GL_WARN_ON_USE (modf, "modf has portability problems - "
1708                 "use gnulib module modf for portability");
1709# endif
1710#endif
1711
1712#if @GNULIB_MODFL@
1713# if @REPLACE_MODFL@
1714#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1715#   undef modfl
1716#   define modfl rpl_modfl
1717#  endif
1718_GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr)
1719                                      _GL_ARG_NONNULL ((2)));
1720_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr));
1721# else
1722#  if !@HAVE_MODFL@
1723#   undef modfl
1724_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr)
1725                                      _GL_ARG_NONNULL ((2)));
1726#  endif
1727_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr));
1728# endif
1729_GL_CXXALIASWARN (modfl);
1730#elif defined GNULIB_POSIXCHECK
1731# undef modfl
1732# if HAVE_RAW_DECL_MODFL
1733_GL_WARN_ON_USE (modfl, "modfl is unportable - "
1734                 "use gnulib module modfl for portability");
1735# endif
1736#endif
1737
1738
1739#if @GNULIB_POWF@
1740# if !@HAVE_POWF@
1741#  undef powf
1742_GL_FUNCDECL_SYS (powf, float, (float x, float y));
1743# endif
1744_GL_CXXALIAS_SYS (powf, float, (float x, float y));
1745_GL_CXXALIASWARN (powf);
1746#elif defined GNULIB_POSIXCHECK
1747# undef powf
1748# if HAVE_RAW_DECL_POWF
1749_GL_WARN_ON_USE (powf, "powf is unportable - "
1750                 "use gnulib module powf for portability");
1751# endif
1752#endif
1753
1754
1755#if @GNULIB_REMAINDERF@
1756# if @REPLACE_REMAINDERF@
1757#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1758#   undef remainderf
1759#   define remainderf rpl_remainderf
1760#  endif
1761_GL_FUNCDECL_RPL (remainderf, float, (float x, float y));
1762_GL_CXXALIAS_RPL (remainderf, float, (float x, float y));
1763# else
1764#  if !@HAVE_REMAINDERF@
1765_GL_FUNCDECL_SYS (remainderf, float, (float x, float y));
1766#  endif
1767_GL_CXXALIAS_SYS (remainderf, float, (float x, float y));
1768# endif
1769_GL_CXXALIASWARN (remainderf);
1770#elif defined GNULIB_POSIXCHECK
1771# undef remainderf
1772# if HAVE_RAW_DECL_REMAINDERF
1773_GL_WARN_ON_USE (remainderf, "remainderf is unportable - "
1774                 "use gnulib module remainderf for portability");
1775# endif
1776#endif
1777
1778#if @GNULIB_REMAINDER@
1779# if @REPLACE_REMAINDER@
1780#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1781#   undef remainder
1782#   define remainder rpl_remainder
1783#  endif
1784_GL_FUNCDECL_RPL (remainder, double, (double x, double y));
1785_GL_CXXALIAS_RPL (remainder, double, (double x, double y));
1786# else
1787#  if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
1788_GL_FUNCDECL_SYS (remainder, double, (double x, double y));
1789#  endif
1790_GL_CXXALIAS_SYS (remainder, double, (double x, double y));
1791# endif
1792_GL_CXXALIASWARN (remainder);
1793#elif defined GNULIB_POSIXCHECK
1794# undef remainder
1795# if HAVE_RAW_DECL_REMAINDER
1796_GL_WARN_ON_USE (remainder, "remainder is unportable - "
1797                 "use gnulib module remainder for portability");
1798# endif
1799#endif
1800
1801#if @GNULIB_REMAINDERL@
1802# if @REPLACE_REMAINDERL@
1803#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1804#   undef remainderl
1805#   define remainderl rpl_remainderl
1806#  endif
1807_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y));
1808_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y));
1809# else
1810#  if !@HAVE_DECL_REMAINDERL@
1811#   undef remainderl
1812_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y));
1813#  endif
1814_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y));
1815# endif
1816_GL_CXXALIASWARN (remainderl);
1817#elif defined GNULIB_POSIXCHECK
1818# undef remainderl
1819# if HAVE_RAW_DECL_REMAINDERL
1820_GL_WARN_ON_USE (remainderl, "remainderl is unportable - "
1821                 "use gnulib module remainderl for portability");
1822# endif
1823#endif
1824
1825
1826#if @GNULIB_RINTF@
1827# if !@HAVE_DECL_RINTF@
1828_GL_FUNCDECL_SYS (rintf, float, (float x));
1829# endif
1830_GL_CXXALIAS_SYS (rintf, float, (float x));
1831_GL_CXXALIASWARN (rintf);
1832#elif defined GNULIB_POSIXCHECK
1833# undef rintf
1834# if HAVE_RAW_DECL_RINTF
1835_GL_WARN_ON_USE (rintf, "rintf is unportable - "
1836                 "use gnulib module rintf for portability");
1837# endif
1838#endif
1839
1840#if @GNULIB_RINT@
1841# if !@HAVE_RINT@
1842_GL_FUNCDECL_SYS (rint, double, (double x));
1843# endif
1844_GL_CXXALIAS_SYS (rint, double, (double x));
1845_GL_CXXALIASWARN (rint);
1846#elif defined GNULIB_POSIXCHECK
1847# undef rint
1848# if HAVE_RAW_DECL_RINT
1849_GL_WARN_ON_USE (rint, "rint is unportable - "
1850                 "use gnulib module rint for portability");
1851# endif
1852#endif
1853
1854#if @GNULIB_RINTL@
1855# if @REPLACE_RINTL@
1856#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1857#   undef rintl
1858#   define rintl rpl_rintl
1859#  endif
1860_GL_FUNCDECL_RPL (rintl, long double, (long double x));
1861_GL_CXXALIAS_RPL (rintl, long double, (long double x));
1862# else
1863#  if !@HAVE_RINTL@
1864_GL_FUNCDECL_SYS (rintl, long double, (long double x));
1865#  endif
1866_GL_CXXALIAS_SYS (rintl, long double, (long double x));
1867# endif
1868_GL_CXXALIASWARN (rintl);
1869#elif defined GNULIB_POSIXCHECK
1870# undef rintl
1871# if HAVE_RAW_DECL_RINTL
1872_GL_WARN_ON_USE (rintl, "rintl is unportable - "
1873                 "use gnulib module rintl for portability");
1874# endif
1875#endif
1876
1877
1878#if @GNULIB_ROUNDF@
1879# if @REPLACE_ROUNDF@
1880#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1881#   undef roundf
1882#   define roundf rpl_roundf
1883#  endif
1884_GL_FUNCDECL_RPL (roundf, float, (float x));
1885_GL_CXXALIAS_RPL (roundf, float, (float x));
1886# else
1887#  if !@HAVE_DECL_ROUNDF@
1888_GL_FUNCDECL_SYS (roundf, float, (float x));
1889#  endif
1890_GL_CXXALIAS_SYS (roundf, float, (float x));
1891# endif
1892_GL_CXXALIASWARN (roundf);
1893#elif defined GNULIB_POSIXCHECK
1894# undef roundf
1895# if HAVE_RAW_DECL_ROUNDF
1896_GL_WARN_ON_USE (roundf, "roundf is unportable - "
1897                 "use gnulib module roundf for portability");
1898# endif
1899#endif
1900
1901#if @GNULIB_ROUND@
1902# if @REPLACE_ROUND@
1903#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1904#   undef round
1905#   define round rpl_round
1906#  endif
1907_GL_FUNCDECL_RPL (round, double, (double x));
1908_GL_CXXALIAS_RPL (round, double, (double x));
1909# else
1910#  if !@HAVE_DECL_ROUND@
1911_GL_FUNCDECL_SYS (round, double, (double x));
1912#  endif
1913_GL_CXXALIAS_SYS (round, double, (double x));
1914# endif
1915_GL_CXXALIASWARN (round);
1916#elif defined GNULIB_POSIXCHECK
1917# undef round
1918# if HAVE_RAW_DECL_ROUND
1919_GL_WARN_ON_USE (round, "round is unportable - "
1920                 "use gnulib module round for portability");
1921# endif
1922#endif
1923
1924#if @GNULIB_ROUNDL@
1925# if @REPLACE_ROUNDL@
1926#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1927#   undef roundl
1928#   define roundl rpl_roundl
1929#  endif
1930_GL_FUNCDECL_RPL (roundl, long double, (long double x));
1931_GL_CXXALIAS_RPL (roundl, long double, (long double x));
1932# else
1933#  if !@HAVE_DECL_ROUNDL@
1934#   undef roundl
1935_GL_FUNCDECL_SYS (roundl, long double, (long double x));
1936#  endif
1937_GL_CXXALIAS_SYS (roundl, long double, (long double x));
1938# endif
1939_GL_CXXALIASWARN (roundl);
1940#elif defined GNULIB_POSIXCHECK
1941# undef roundl
1942# if HAVE_RAW_DECL_ROUNDL
1943_GL_WARN_ON_USE (roundl, "roundl is unportable - "
1944                 "use gnulib module roundl for portability");
1945# endif
1946#endif
1947
1948
1949#if @GNULIB_SINF@
1950# if @REPLACE_SINF@
1951#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1952#   undef sinf
1953#   define sinf rpl_sinf
1954#  endif
1955_GL_FUNCDECL_RPL (sinf, float, (float x));
1956_GL_CXXALIAS_RPL (sinf, float, (float x));
1957# else
1958#  if !@HAVE_SINF@
1959 #  undef sinf
1960_GL_FUNCDECL_SYS (sinf, float, (float x));
1961#  endif
1962_GL_CXXALIAS_SYS (sinf, float, (float x));
1963# endif
1964_GL_CXXALIASWARN (sinf);
1965#elif defined GNULIB_POSIXCHECK
1966# undef sinf
1967# if HAVE_RAW_DECL_SINF
1968_GL_WARN_ON_USE (sinf, "sinf is unportable - "
1969                 "use gnulib module sinf for portability");
1970# endif
1971#endif
1972
1973#if @GNULIB_SINL@
1974# if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
1975#  undef sinl
1976_GL_FUNCDECL_SYS (sinl, long double, (long double x));
1977# endif
1978_GL_CXXALIAS_SYS (sinl, long double, (long double x));
1979_GL_CXXALIASWARN (sinl);
1980#elif defined GNULIB_POSIXCHECK
1981# undef sinl
1982# if HAVE_RAW_DECL_SINL
1983_GL_WARN_ON_USE (sinl, "sinl is unportable - "
1984                 "use gnulib module sinl for portability");
1985# endif
1986#endif
1987
1988
1989#if @GNULIB_SINHF@
1990# if @REPLACE_SINHF@
1991#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1992#   undef sinhf
1993#   define sinhf rpl_sinhf
1994#  endif
1995_GL_FUNCDECL_RPL (sinhf, float, (float x));
1996_GL_CXXALIAS_RPL (sinhf, float, (float x));
1997# else
1998#  if !@HAVE_SINHF@
1999#   undef sinhf
2000_GL_FUNCDECL_SYS (sinhf, float, (float x));
2001#  endif
2002_GL_CXXALIAS_SYS (sinhf, float, (float x));
2003# endif
2004_GL_CXXALIASWARN (sinhf);
2005#elif defined GNULIB_POSIXCHECK
2006# undef sinhf
2007# if HAVE_RAW_DECL_SINHF
2008_GL_WARN_ON_USE (sinhf, "sinhf is unportable - "
2009                 "use gnulib module sinhf for portability");
2010# endif
2011#endif
2012
2013
2014#if @GNULIB_SQRTF@
2015# if @REPLACE_SQRTF@
2016#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2017#   undef sqrtf
2018#   define sqrtf rpl_sqrtf
2019#  endif
2020_GL_FUNCDECL_RPL (sqrtf, float, (float x));
2021_GL_CXXALIAS_RPL (sqrtf, float, (float x));
2022# else
2023#  if !@HAVE_SQRTF@
2024#   undef sqrtf
2025_GL_FUNCDECL_SYS (sqrtf, float, (float x));
2026#  endif
2027_GL_CXXALIAS_SYS (sqrtf, float, (float x));
2028# endif
2029_GL_CXXALIASWARN (sqrtf);
2030#elif defined GNULIB_POSIXCHECK
2031# undef sqrtf
2032# if HAVE_RAW_DECL_SQRTF
2033_GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - "
2034                 "use gnulib module sqrtf for portability");
2035# endif
2036#endif
2037
2038#if @GNULIB_SQRTL@
2039# if @REPLACE_SQRTL@
2040#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2041#   undef sqrtl
2042#   define sqrtl rpl_sqrtl
2043#  endif
2044_GL_FUNCDECL_RPL (sqrtl, long double, (long double x));
2045_GL_CXXALIAS_RPL (sqrtl, long double, (long double x));
2046# else
2047#  if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
2048#   undef sqrtl
2049_GL_FUNCDECL_SYS (sqrtl, long double, (long double x));
2050#  endif
2051_GL_CXXALIAS_SYS (sqrtl, long double, (long double x));
2052# endif
2053_GL_CXXALIASWARN (sqrtl);
2054#elif defined GNULIB_POSIXCHECK
2055# undef sqrtl
2056# if HAVE_RAW_DECL_SQRTL
2057_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - "
2058                 "use gnulib module sqrtl for portability");
2059# endif
2060#endif
2061
2062
2063#if @GNULIB_TANF@
2064# if @REPLACE_TANF@
2065#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2066#   undef tanf
2067#   define tanf rpl_tanf
2068#  endif
2069_GL_FUNCDECL_RPL (tanf, float, (float x));
2070_GL_CXXALIAS_RPL (tanf, float, (float x));
2071# else
2072#  if !@HAVE_TANF@
2073#   undef tanf
2074_GL_FUNCDECL_SYS (tanf, float, (float x));
2075#  endif
2076_GL_CXXALIAS_SYS (tanf, float, (float x));
2077# endif
2078_GL_CXXALIASWARN (tanf);
2079#elif defined GNULIB_POSIXCHECK
2080# undef tanf
2081# if HAVE_RAW_DECL_TANF
2082_GL_WARN_ON_USE (tanf, "tanf is unportable - "
2083                 "use gnulib module tanf for portability");
2084# endif
2085#endif
2086
2087#if @GNULIB_TANL@
2088# if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
2089#  undef tanl
2090_GL_FUNCDECL_SYS (tanl, long double, (long double x));
2091# endif
2092_GL_CXXALIAS_SYS (tanl, long double, (long double x));
2093_GL_CXXALIASWARN (tanl);
2094#elif defined GNULIB_POSIXCHECK
2095# undef tanl
2096# if HAVE_RAW_DECL_TANL
2097_GL_WARN_ON_USE (tanl, "tanl is unportable - "
2098                 "use gnulib module tanl for portability");
2099# endif
2100#endif
2101
2102
2103#if @GNULIB_TANHF@
2104# if @REPLACE_TANHF@
2105#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2106#   undef tanhf
2107#   define tanhf rpl_tanhf
2108#  endif
2109_GL_FUNCDECL_RPL (tanhf, float, (float x));
2110_GL_CXXALIAS_RPL (tanhf, float, (float x));
2111# else
2112#  if !@HAVE_TANHF@
2113#   undef tanhf
2114_GL_FUNCDECL_SYS (tanhf, float, (float x));
2115#  endif
2116_GL_CXXALIAS_SYS (tanhf, float, (float x));
2117# endif
2118_GL_CXXALIASWARN (tanhf);
2119#elif defined GNULIB_POSIXCHECK
2120# undef tanhf
2121# if HAVE_RAW_DECL_TANHF
2122_GL_WARN_ON_USE (tanhf, "tanhf is unportable - "
2123                 "use gnulib module tanhf for portability");
2124# endif
2125#endif
2126
2127
2128#if @GNULIB_TRUNCF@
2129# if @REPLACE_TRUNCF@
2130#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2131#   undef truncf
2132#   define truncf rpl_truncf
2133#  endif
2134_GL_FUNCDECL_RPL (truncf, float, (float x));
2135_GL_CXXALIAS_RPL (truncf, float, (float x));
2136# else
2137#  if !@HAVE_DECL_TRUNCF@
2138_GL_FUNCDECL_SYS (truncf, float, (float x));
2139#  endif
2140_GL_CXXALIAS_SYS (truncf, float, (float x));
2141# endif
2142_GL_CXXALIASWARN (truncf);
2143#elif defined GNULIB_POSIXCHECK
2144# undef truncf
2145# if HAVE_RAW_DECL_TRUNCF
2146_GL_WARN_ON_USE (truncf, "truncf is unportable - "
2147                 "use gnulib module truncf for portability");
2148# endif
2149#endif
2150
2151#if @GNULIB_TRUNC@
2152# if @REPLACE_TRUNC@
2153#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2154#   undef trunc
2155#   define trunc rpl_trunc
2156#  endif
2157_GL_FUNCDECL_RPL (trunc, double, (double x));
2158_GL_CXXALIAS_RPL (trunc, double, (double x));
2159# else
2160#  if !@HAVE_DECL_TRUNC@
2161_GL_FUNCDECL_SYS (trunc, double, (double x));
2162#  endif
2163_GL_CXXALIAS_SYS (trunc, double, (double x));
2164# endif
2165_GL_CXXALIASWARN (trunc);
2166#elif defined GNULIB_POSIXCHECK
2167# undef trunc
2168# if HAVE_RAW_DECL_TRUNC
2169_GL_WARN_ON_USE (trunc, "trunc is unportable - "
2170                 "use gnulib module trunc for portability");
2171# endif
2172#endif
2173
2174#if @GNULIB_TRUNCL@
2175# if @REPLACE_TRUNCL@
2176#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2177#   undef truncl
2178#   define truncl rpl_truncl
2179#  endif
2180_GL_FUNCDECL_RPL (truncl, long double, (long double x));
2181_GL_CXXALIAS_RPL (truncl, long double, (long double x));
2182# else
2183#  if !@HAVE_DECL_TRUNCL@
2184_GL_FUNCDECL_SYS (truncl, long double, (long double x));
2185#  endif
2186_GL_CXXALIAS_SYS (truncl, long double, (long double x));
2187# endif
2188_GL_CXXALIASWARN (truncl);
2189#elif defined GNULIB_POSIXCHECK
2190# undef truncl
2191# if HAVE_RAW_DECL_TRUNCL
2192_GL_WARN_ON_USE (truncl, "truncl is unportable - "
2193                 "use gnulib module truncl for portability");
2194# endif
2195#endif
2196
2197
2198/* Definitions of function-like macros come here, after the function
2199   declarations.  */
2200
2201
2202#if @GNULIB_ISFINITE@
2203# if @REPLACE_ISFINITE@
2204_GL_EXTERN_C int gl_isfinitef (float x);
2205_GL_EXTERN_C int gl_isfinited (double x);
2206_GL_EXTERN_C int gl_isfinitel (long double x);
2207#  undef isfinite
2208#  define isfinite(x) \
2209   (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
2210    sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
2211    gl_isfinitef (x))
2212# endif
2213# ifdef __cplusplus
2214#  if defined isfinite || defined GNULIB_NAMESPACE
2215_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite)
2216#   undef isfinite
2217_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite)
2218#  endif
2219# endif
2220#elif defined GNULIB_POSIXCHECK
2221# if defined isfinite
2222_GL_WARN_REAL_FLOATING_DECL (isfinite);
2223#  undef isfinite
2224#  define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
2225# endif
2226#endif
2227
2228
2229#if @GNULIB_ISINF@
2230# if @REPLACE_ISINF@
2231_GL_EXTERN_C int gl_isinff (float x);
2232_GL_EXTERN_C int gl_isinfd (double x);
2233_GL_EXTERN_C int gl_isinfl (long double x);
2234#  undef isinf
2235#  define isinf(x) \
2236   (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
2237    sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
2238    gl_isinff (x))
2239# endif
2240# ifdef __cplusplus
2241#  if defined isinf || defined GNULIB_NAMESPACE
2242_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf)
2243#   undef isinf
2244_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf)
2245#  endif
2246# endif
2247#elif defined GNULIB_POSIXCHECK
2248# if defined isinf
2249_GL_WARN_REAL_FLOATING_DECL (isinf);
2250#  undef isinf
2251#  define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
2252# endif
2253#endif
2254
2255
2256#if @GNULIB_ISNANF@
2257/* Test for NaN for 'float' numbers.  */
2258# if @HAVE_ISNANF@
2259/* The original <math.h> included above provides a declaration of isnan macro
2260   or (older) isnanf function.  */
2261#  if __GNUC__ >= 4
2262    /* GCC 4.0 and newer provides three built-ins for isnan.  */
2263#   undef isnanf
2264#   define isnanf(x) __builtin_isnanf ((float)(x))
2265#  elif defined isnan
2266#   undef isnanf
2267#   define isnanf(x) isnan ((float)(x))
2268#  endif
2269# else
2270/* Test whether X is a NaN.  */
2271#  undef isnanf
2272#  define isnanf rpl_isnanf
2273_GL_EXTERN_C int isnanf (float x);
2274# endif
2275#endif
2276
2277#if @GNULIB_ISNAND@
2278/* Test for NaN for 'double' numbers.
2279   This function is a gnulib extension, unlike isnan() which applied only
2280   to 'double' numbers earlier but now is a type-generic macro.  */
2281# if @HAVE_ISNAND@
2282/* The original <math.h> included above provides a declaration of isnan
2283   macro.  */
2284#  if __GNUC__ >= 4
2285    /* GCC 4.0 and newer provides three built-ins for isnan.  */
2286#   undef isnand
2287#   define isnand(x) __builtin_isnan ((double)(x))
2288#  else
2289#   undef isnand
2290#   define isnand(x) isnan ((double)(x))
2291#  endif
2292# else
2293/* Test whether X is a NaN.  */
2294#  undef isnand
2295#  define isnand rpl_isnand
2296_GL_EXTERN_C int isnand (double x);
2297# endif
2298#endif
2299
2300#if @GNULIB_ISNANL@
2301/* Test for NaN for 'long double' numbers.  */
2302# if @HAVE_ISNANL@
2303/* The original <math.h> included above provides a declaration of isnan
2304   macro or (older) isnanl function.  */
2305#  if __GNUC__ >= 4
2306    /* GCC 4.0 and newer provides three built-ins for isnan.  */
2307#   undef isnanl
2308#   define isnanl(x) __builtin_isnanl ((long double)(x))
2309#  elif defined isnan
2310#   undef isnanl
2311#   define isnanl(x) isnan ((long double)(x))
2312#  endif
2313# else
2314/* Test whether X is a NaN.  */
2315#  undef isnanl
2316#  define isnanl rpl_isnanl
2317_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST;
2318# endif
2319#endif
2320
2321/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL!  */
2322#if @GNULIB_ISNAN@
2323# if @REPLACE_ISNAN@
2324/* We can't just use the isnanf macro (e.g.) as exposed by
2325   isnanf.h (e.g.) here, because those may end up being macros
2326   that recursively expand back to isnan.  So use the gnulib
2327   replacements for them directly. */
2328#  if @HAVE_ISNANF@ && __GNUC__ >= 4
2329#   define gl_isnan_f(x) __builtin_isnanf ((float)(x))
2330#  else
2331_GL_EXTERN_C int rpl_isnanf (float x);
2332#   define gl_isnan_f(x) rpl_isnanf (x)
2333#  endif
2334#  if @HAVE_ISNAND@ && __GNUC__ >= 4
2335#   define gl_isnan_d(x) __builtin_isnan ((double)(x))
2336#  else
2337_GL_EXTERN_C int rpl_isnand (double x);
2338#   define gl_isnan_d(x) rpl_isnand (x)
2339#  endif
2340#  if @HAVE_ISNANL@ && __GNUC__ >= 4
2341#   define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
2342#  else
2343_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
2344#   define gl_isnan_l(x) rpl_isnanl (x)
2345#  endif
2346#  undef isnan
2347#  define isnan(x) \
2348   (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
2349    sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
2350    gl_isnan_f (x))
2351# elif __GNUC__ >= 4
2352#  undef isnan
2353#  define isnan(x) \
2354   (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \
2355    sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
2356    __builtin_isnanf ((float)(x)))
2357# endif
2358# ifdef __cplusplus
2359#  if defined isnan || defined GNULIB_NAMESPACE
2360_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
2361#   undef isnan
2362_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan)
2363#  endif
2364# else
2365/* Ensure isnan is a macro.  */
2366#  ifndef isnan
2367#   define isnan isnan
2368#  endif
2369# endif
2370#elif defined GNULIB_POSIXCHECK
2371# if defined isnan
2372_GL_WARN_REAL_FLOATING_DECL (isnan);
2373#  undef isnan
2374#  define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
2375# endif
2376#endif
2377
2378
2379#if @GNULIB_SIGNBIT@
2380# if (@REPLACE_SIGNBIT_USING_GCC@ \
2381      && (!defined __cplusplus || __cplusplus < 201103))
2382#  undef signbit
2383   /* GCC 4.0 and newer provides three built-ins for signbit.  */
2384#  define signbit(x) \
2385   (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
2386    sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
2387    __builtin_signbitf (x))
2388# endif
2389# if @REPLACE_SIGNBIT@
2390#  undef signbit
2391_GL_EXTERN_C int gl_signbitf (float arg);
2392_GL_EXTERN_C int gl_signbitd (double arg);
2393_GL_EXTERN_C int gl_signbitl (long double arg);
2394#  if __GNUC__ >= 2 && !defined __STRICT_ANSI__
2395#   define _GL_NUM_UINT_WORDS(type) \
2396      ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
2397#   if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
2398#    define gl_signbitf_OPTIMIZED_MACRO
2399#    define gl_signbitf(arg) \
2400       ({ union { float _value;                                         \
2401                  unsigned int _word[_GL_NUM_UINT_WORDS (float)];       \
2402                } _m;                                                   \
2403          _m._value = (arg);                                            \
2404          (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1;          \
2405        })
2406#   endif
2407#   if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
2408#    define gl_signbitd_OPTIMIZED_MACRO
2409#    define gl_signbitd(arg) \
2410       ({ union { double _value;                                        \
2411                  unsigned int _word[_GL_NUM_UINT_WORDS (double)];      \
2412                } _m;                                                   \
2413          _m._value = (arg);                                            \
2414          (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1;          \
2415        })
2416#   endif
2417#   if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
2418#    define gl_signbitl_OPTIMIZED_MACRO
2419#    define gl_signbitl(arg) \
2420       ({ union { long double _value;                                   \
2421                  unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
2422                } _m;                                                   \
2423          _m._value = (arg);                                            \
2424          (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1;        \
2425        })
2426#   endif
2427#  endif
2428#  define signbit(x) \
2429   (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
2430    sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
2431    gl_signbitf (x))
2432# endif
2433# ifdef __cplusplus
2434#  if defined signbit || defined GNULIB_NAMESPACE
2435_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit)
2436#   undef signbit
2437_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
2438#  endif
2439# endif
2440#elif defined GNULIB_POSIXCHECK
2441# if defined signbit
2442_GL_WARN_REAL_FLOATING_DECL (signbit);
2443#  undef signbit
2444#  define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
2445# endif
2446#endif
2447
2448_GL_INLINE_HEADER_END
2449
2450#endif /* _@GUARD_PREFIX@_MATH_H */
2451#endif /* _@GUARD_PREFIX@_MATH_H */
2452