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