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