summaryrefslogtreecommitdiffstats
path: root/gl/m4/math_h.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/math_h.m4')
-rw-r--r--gl/m4/math_h.m460
1 files changed, 54 insertions, 6 deletions
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4
index d2e90ff..4b26c9e 100644
--- a/gl/m4/math_h.m4
+++ b/gl/m4/math_h.m4
@@ -1,5 +1,6 @@
1# math_h.m4 serial 125 1# math_h.m4
2dnl Copyright (C) 2007-2023 Free Software Foundation, Inc. 2# serial 138
3dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
@@ -42,15 +43,21 @@ AC_DEFUN_ONCE([gl_MATH_H],
42 cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf 43 cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf
43 expf expl exp2 exp2f exp2l expm1 expm1f expm1l 44 expf expl exp2 exp2f exp2l expm1 expm1f expm1l
44 fabsf fabsl floorf floorl fma fmaf fmal 45 fabsf fabsl floorf floorl fma fmaf fmal
45 fmod fmodf fmodl frexpf frexpl hypotf hypotl 46 fmod fmodf fmodl frexpf frexpl
47 getpayload getpayloadf getpayloadl
48 hypotf hypotl
46 ilogb ilogbf ilogbl 49 ilogb ilogbf ilogbl
47 ldexpf ldexpl 50 ldexpf ldexpl
48 log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l 51 log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l
49 logb logbf logbl 52 logb logbf logbl
50 modf modff modfl powf 53 modf modff modfl powf
51 remainder remainderf remainderl 54 remainder remainderf remainderl
52 rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl 55 rint rintf rintl round roundf roundl
53 tanf tanl tanhf trunc truncf truncl]) 56 setpayload setpayloadf setpayloadl
57 setpayloadsig setpayloadsigf setpayloadsigl
58 sinf sinl sinhf sqrtf sqrtl
59 tanf tanl tanhf totalorder totalorderf totalorderl totalordermag
60 totalordermagf totalordermagl trunc truncf truncl])
54]) 61])
55 62
56# gl_MATH_MODULE_INDICATOR([modulename]) 63# gl_MATH_MODULE_INDICATOR([modulename])
@@ -113,6 +120,9 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS],
113 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXPF]) 120 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXPF])
114 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXP]) 121 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXP])
115 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXPL]) 122 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXPL])
123 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAYLOAD])
124 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAYLOADF])
125 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAYLOADL])
116 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOT]) 126 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOT])
117 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOTF]) 127 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOTF])
118 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOTL]) 128 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOTL])
@@ -125,6 +135,7 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS],
125 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANF]) 135 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANF])
126 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAND]) 136 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAND])
127 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANL]) 137 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANL])
138 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LDEXP])
128 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LDEXPF]) 139 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LDEXPF])
129 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LDEXPL]) 140 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LDEXPL])
130 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOG]) 141 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOG])
@@ -155,6 +166,12 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS],
155 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUND]) 166 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUND])
156 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUNDF]) 167 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUNDF])
157 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUNDL]) 168 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUNDL])
169 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOAD])
170 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADF])
171 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADL])
172 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIG])
173 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIGF])
174 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIGL])
158 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNBIT]) 175 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNBIT])
159 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINF]) 176 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINF])
160 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINL]) 177 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINL])
@@ -164,6 +181,12 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS],
164 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANF]) 181 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANF])
165 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANL]) 182 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANL])
166 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANHF]) 183 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANHF])
184 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDER])
185 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERF])
186 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERL])
187 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERMAG])
188 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERMAGF])
189 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERMAGL])
167 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNC]) 190 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNC])
168 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCF]) 191 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCF])
169 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCL]) 192 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCL])
@@ -209,6 +232,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
209 HAVE_FMODF=1; AC_SUBST([HAVE_FMODF]) 232 HAVE_FMODF=1; AC_SUBST([HAVE_FMODF])
210 HAVE_FMODL=1; AC_SUBST([HAVE_FMODL]) 233 HAVE_FMODL=1; AC_SUBST([HAVE_FMODL])
211 HAVE_FREXPF=1; AC_SUBST([HAVE_FREXPF]) 234 HAVE_FREXPF=1; AC_SUBST([HAVE_FREXPF])
235 HAVE_GETPAYLOAD=1; AC_SUBST([HAVE_GETPAYLOAD])
236 HAVE_GETPAYLOADF=1; AC_SUBST([HAVE_GETPAYLOADF])
237 HAVE_GETPAYLOADL=1; AC_SUBST([HAVE_GETPAYLOADL])
212 HAVE_HYPOTF=1; AC_SUBST([HAVE_HYPOTF]) 238 HAVE_HYPOTF=1; AC_SUBST([HAVE_HYPOTF])
213 HAVE_HYPOTL=1; AC_SUBST([HAVE_HYPOTL]) 239 HAVE_HYPOTL=1; AC_SUBST([HAVE_HYPOTL])
214 HAVE_ILOGB=1; AC_SUBST([HAVE_ILOGB]) 240 HAVE_ILOGB=1; AC_SUBST([HAVE_ILOGB])
@@ -234,6 +260,12 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
234 HAVE_REMAINDERF=1; AC_SUBST([HAVE_REMAINDERF]) 260 HAVE_REMAINDERF=1; AC_SUBST([HAVE_REMAINDERF])
235 HAVE_RINT=1; AC_SUBST([HAVE_RINT]) 261 HAVE_RINT=1; AC_SUBST([HAVE_RINT])
236 HAVE_RINTL=1; AC_SUBST([HAVE_RINTL]) 262 HAVE_RINTL=1; AC_SUBST([HAVE_RINTL])
263 HAVE_SETPAYLOAD=1; AC_SUBST([HAVE_SETPAYLOAD])
264 HAVE_SETPAYLOADF=1; AC_SUBST([HAVE_SETPAYLOADF])
265 HAVE_SETPAYLOADL=1; AC_SUBST([HAVE_SETPAYLOADL])
266 HAVE_SETPAYLOADSIG=1; AC_SUBST([HAVE_SETPAYLOADSIG])
267 HAVE_SETPAYLOADSIGF=1; AC_SUBST([HAVE_SETPAYLOADSIGF])
268 HAVE_SETPAYLOADSIGL=1; AC_SUBST([HAVE_SETPAYLOADSIGL])
237 HAVE_SINF=1; AC_SUBST([HAVE_SINF]) 269 HAVE_SINF=1; AC_SUBST([HAVE_SINF])
238 HAVE_SINL=1; AC_SUBST([HAVE_SINL]) 270 HAVE_SINL=1; AC_SUBST([HAVE_SINL])
239 HAVE_SINHF=1; AC_SUBST([HAVE_SINHF]) 271 HAVE_SINHF=1; AC_SUBST([HAVE_SINHF])
@@ -242,6 +274,12 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
242 HAVE_TANF=1; AC_SUBST([HAVE_TANF]) 274 HAVE_TANF=1; AC_SUBST([HAVE_TANF])
243 HAVE_TANL=1; AC_SUBST([HAVE_TANL]) 275 HAVE_TANL=1; AC_SUBST([HAVE_TANL])
244 HAVE_TANHF=1; AC_SUBST([HAVE_TANHF]) 276 HAVE_TANHF=1; AC_SUBST([HAVE_TANHF])
277 HAVE_TOTALORDER=1; AC_SUBST([HAVE_TOTALORDER])
278 HAVE_TOTALORDERF=1; AC_SUBST([HAVE_TOTALORDERF])
279 HAVE_TOTALORDERL=1; AC_SUBST([HAVE_TOTALORDERL])
280 HAVE_TOTALORDERMAG=1; AC_SUBST([HAVE_TOTALORDERMAG])
281 HAVE_TOTALORDERMAGF=1; AC_SUBST([HAVE_TOTALORDERMAGF])
282 HAVE_TOTALORDERMAGL=1; AC_SUBST([HAVE_TOTALORDERMAGL])
245 HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL]) 283 HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL])
246 HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL]) 284 HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL])
247 HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL]) 285 HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL])
@@ -309,6 +347,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
309 REPLACE_FREXPF=0; AC_SUBST([REPLACE_FREXPF]) 347 REPLACE_FREXPF=0; AC_SUBST([REPLACE_FREXPF])
310 REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP]) 348 REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP])
311 REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL]) 349 REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL])
350 REPLACE_GETPAYLOAD=0; AC_SUBST([REPLACE_GETPAYLOAD])
351 REPLACE_GETPAYLOADF=0; AC_SUBST([REPLACE_GETPAYLOADF])
352 REPLACE_GETPAYLOADL=0; AC_SUBST([REPLACE_GETPAYLOADL])
312 REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL]) 353 REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL])
313 REPLACE_HYPOT=0; AC_SUBST([REPLACE_HYPOT]) 354 REPLACE_HYPOT=0; AC_SUBST([REPLACE_HYPOT])
314 REPLACE_HYPOTF=0; AC_SUBST([REPLACE_HYPOTF]) 355 REPLACE_HYPOTF=0; AC_SUBST([REPLACE_HYPOTF])
@@ -319,6 +360,7 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
319 REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE]) 360 REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE])
320 REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF]) 361 REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF])
321 REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN]) 362 REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN])
363 REPLACE_LDEXP=0; AC_SUBST([REPLACE_LDEXP])
322 REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL]) 364 REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL])
323 REPLACE_LOG=0; AC_SUBST([REPLACE_LOG]) 365 REPLACE_LOG=0; AC_SUBST([REPLACE_LOG])
324 REPLACE_LOGF=0; AC_SUBST([REPLACE_LOGF]) 366 REPLACE_LOGF=0; AC_SUBST([REPLACE_LOGF])
@@ -354,6 +396,12 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
354 REPLACE_SQRTL=0; AC_SUBST([REPLACE_SQRTL]) 396 REPLACE_SQRTL=0; AC_SUBST([REPLACE_SQRTL])
355 REPLACE_TANF=0; AC_SUBST([REPLACE_TANF]) 397 REPLACE_TANF=0; AC_SUBST([REPLACE_TANF])
356 REPLACE_TANHF=0; AC_SUBST([REPLACE_TANHF]) 398 REPLACE_TANHF=0; AC_SUBST([REPLACE_TANHF])
399 REPLACE_TOTALORDER=0; AC_SUBST([REPLACE_TOTALORDER])
400 REPLACE_TOTALORDERF=0; AC_SUBST([REPLACE_TOTALORDERF])
401 REPLACE_TOTALORDERL=0; AC_SUBST([REPLACE_TOTALORDERL])
402 REPLACE_TOTALORDERMAG=0; AC_SUBST([REPLACE_TOTALORDERMAG])
403 REPLACE_TOTALORDERMAGF=0; AC_SUBST([REPLACE_TOTALORDERMAGF])
404 REPLACE_TOTALORDERMAGL=0; AC_SUBST([REPLACE_TOTALORDERMAGL])
357 REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC]) 405 REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC])
358 REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF]) 406 REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF])
359 REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL]) 407 REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL])
@@ -364,7 +412,7 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
364# Sets variable HAVE_SAME_LONG_DOUBLE_AS_DOUBLE to 0 or 1, and defines 412# Sets variable HAVE_SAME_LONG_DOUBLE_AS_DOUBLE to 0 or 1, and defines
365# HAVE_SAME_LONG_DOUBLE_AS_DOUBLE accordingly. 413# HAVE_SAME_LONG_DOUBLE_AS_DOUBLE accordingly.
366# The currently known platforms where this is the case are: 414# The currently known platforms where this is the case are:
367# Linux/HPPA, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9. 415# Linux/HPPA, NetBSD/sparc32, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9.
368AC_DEFUN([gl_LONG_DOUBLE_VS_DOUBLE], 416AC_DEFUN([gl_LONG_DOUBLE_VS_DOUBLE],
369[ 417[
370 AC_CACHE_CHECK([whether long double and double are the same], 418 AC_CACHE_CHECK([whether long double and double are the same],