annotate lib/math.in.h @ 12421:e8d2c6fc33ad

Use spaces for indentation, not tabs.
author Bruno Haible <bruno@clisp.org>
date Thu, 10 Dec 2009 20:28:30 +0100
parents 5f5c1c77ef82
children f7842310a565
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* A GNU-like <math.h>.
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2
11506
d800366aa3fe Avoid link error when creating a namespace clean library.
Bruno Haible <bruno@clisp.org>
parents: 10836
diff changeset
3 Copyright (C) 2002-2003, 2007-2009 Free Software Foundation, Inc.
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9297
diff changeset
5 This program is free software: you can redistribute it and/or modify
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9297
diff changeset
7 the Free Software Foundation; either version 3 of the License, or
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9297
diff changeset
8 (at your option) any later version.
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 GNU General Public License for more details.
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
9309
bbbbbf4cd1c5 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible <bruno@clisp.org>
parents: 9297
diff changeset
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 #ifndef _GL_MATH_H
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19
10655
8668b19a7032 Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
20 #if __GNUC__ >= 3
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 10287
diff changeset
21 @PRAGMA_SYSTEM_HEADER@
10655
8668b19a7032 Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents: 10375
diff changeset
22 #endif
10375
f96e845fc36d Avoid some "gcc -pedantic" warnings.
Bruno Haible <bruno@clisp.org>
parents: 10287
diff changeset
23
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 /* The include_next requires a split double-inclusion guard. */
11583
dc80f2cc1327 Second attempt to work around an AIX 5.3, 6.1 compiler bug with include_next.
Eric Blake <ebb9@byu.net>
parents: 11525
diff changeset
25 #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 #ifndef _GL_MATH_H
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 #define _GL_MATH_H
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 /* The definition of GL_LINK_WARNING is copied here. */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 #ifdef __cplusplus
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 extern "C" {
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38
9850
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
39 /* POSIX allows platforms that don't support NAN. But all major
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
40 machines in the past 15 years have supported something close to
9898
02bfc9acab82 Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents: 9850
diff changeset
41 IEEE NaN, so we define this unconditionally. We also must define
02bfc9acab82 Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents: 9850
diff changeset
42 it on platforms like Solaris 10, where NAN is present but defined
02bfc9acab82 Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents: 9850
diff changeset
43 as a function pointer rather than a floating point constant. */
02bfc9acab82 Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents: 9850
diff changeset
44 #if !defined NAN || @REPLACE_NAN@
02bfc9acab82 Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents: 9850
diff changeset
45 # undef NAN
9850
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
46 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
47 # ifdef __DECC
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
48 static float
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
49 _NaN ()
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
50 {
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
51 static float zero = 0.0f;
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
52 return zero / zero;
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
53 }
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
54 # define NAN (_NaN())
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
55 # else
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
56 # define NAN (0.0f / 0.0f)
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
57 # endif
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
58 #endif
7f3ed6b093be Guarantee a definition of NAN.
Eric Blake <ebb9@byu.net>
parents: 9645
diff changeset
59
9898
02bfc9acab82 Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents: 9850
diff changeset
60 /* Solaris 10 defines HUGE_VAL, but as a function pointer rather
02bfc9acab82 Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents: 9850
diff changeset
61 than a floating point constant. */
02bfc9acab82 Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents: 9850
diff changeset
62 #if @REPLACE_HUGE_VAL@
02bfc9acab82 Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents: 9850
diff changeset
63 # undef HUGE_VAL
02bfc9acab82 Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents: 9850
diff changeset
64 # define HUGE_VAL (1.0 / 0.0)
02bfc9acab82 Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents: 9850
diff changeset
65 #endif
02bfc9acab82 Work around Solaris 10 math.h bug.
Eric Blake <ebb9@byu.net>
parents: 9850
diff changeset
66
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 /* Write x as
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68 x = mantissa * 2^exp
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 where
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71 If x is zero: mantissa = x, exp = 0.
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 If x is infinite or NaN: mantissa = x, exp unspecified.
9312
bec01fc15c2f Rename parameter 'exp' to 'expptr', to avoid gcc warnings.
Bruno Haible <bruno@clisp.org>
parents: 9309
diff changeset
73 Store exp in *EXPPTR and return mantissa. */
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
74 #if @GNULIB_FREXP@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75 # if @REPLACE_FREXP@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
76 # define frexp rpl_frexp
9312
bec01fc15c2f Rename parameter 'exp' to 'expptr', to avoid gcc warnings.
Bruno Haible <bruno@clisp.org>
parents: 9309
diff changeset
77 extern double frexp (double x, int *expptr);
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
78 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
79 #elif defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
80 # undef frexp
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81 # define frexp(x,e) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82 (GL_LINK_WARNING ("frexp is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 "use gnulib module frexp for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 frexp (x, e))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
85 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
86
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
88 #if @GNULIB_MATHL@ || !@HAVE_DECL_ACOSL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89 extern long double acosl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
90 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
91 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
92 # undef acosl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
93 # define acosl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
94 (GL_LINK_WARNING ("acosl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
96 acosl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
97 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
98
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
99
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
100 #if @GNULIB_MATHL@ || !@HAVE_DECL_ASINL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
101 extern long double asinl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
102 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
103 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
104 # undef asinl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
105 # define asinl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
106 (GL_LINK_WARNING ("asinl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
107 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
108 asinl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
109 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
110
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
111
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
112 #if @GNULIB_MATHL@ || !@HAVE_DECL_ATANL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
113 extern long double atanl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
114 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
115 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
116 # undef atanl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
117 # define atanl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
118 (GL_LINK_WARNING ("atanl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
119 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
120 atanl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
121 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
122
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
123
9295
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
124 #if @GNULIB_CEILF@
9420
9e0484f26251 Fix link errors with Sun C 5.0 on Solaris 10.
Bruno Haible <bruno@clisp.org>
parents: 9418
diff changeset
125 # if @REPLACE_CEILF@
9295
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
126 # define ceilf rpl_ceilf
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
127 extern float ceilf (float x);
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
128 # endif
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
129 #elif defined GNULIB_POSIXCHECK
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
130 # undef ceilf
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
131 # define ceilf(x) \
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
132 (GL_LINK_WARNING ("ceilf is unportable - " \
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
133 "use gnulib module ceilf for portability"), \
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
134 ceilf (x))
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
135 #endif
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
136
9297
3191943555eb New module 'ceill'.
Bruno Haible <bruno@clisp.org>
parents: 9295
diff changeset
137 #if @GNULIB_CEILL@
9420
9e0484f26251 Fix link errors with Sun C 5.0 on Solaris 10.
Bruno Haible <bruno@clisp.org>
parents: 9418
diff changeset
138 # if @REPLACE_CEILL@
9297
3191943555eb New module 'ceill'.
Bruno Haible <bruno@clisp.org>
parents: 9295
diff changeset
139 # define ceill rpl_ceill
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
140 extern long double ceill (long double x);
9297
3191943555eb New module 'ceill'.
Bruno Haible <bruno@clisp.org>
parents: 9295
diff changeset
141 # endif
3191943555eb New module 'ceill'.
Bruno Haible <bruno@clisp.org>
parents: 9295
diff changeset
142 #elif defined GNULIB_POSIXCHECK
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
143 # undef ceill
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
144 # define ceill(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
145 (GL_LINK_WARNING ("ceill is unportable - " \
9297
3191943555eb New module 'ceill'.
Bruno Haible <bruno@clisp.org>
parents: 9295
diff changeset
146 "use gnulib module ceill for portability"), \
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
147 ceill (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
148 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
149
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
150
11735
1dc493668d2b Avoid syntax error on QNX.
Bruno Haible <bruno@clisp.org>
parents: 11583
diff changeset
151 #if @GNULIB_MATHL@ || (!@HAVE_DECL_COSL@ && !defined cosl)
11741
5f5c1c77ef82 Avoid compilation error on QNX.
Bruno Haible <bruno@clisp.org>
parents: 11735
diff changeset
152 # undef cosl
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
153 extern long double cosl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
154 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
155 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
156 # undef cosl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
157 # define cosl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
158 (GL_LINK_WARNING ("cosl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
159 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
160 cosl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
161 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
162
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
163
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
164 #if @GNULIB_MATHL@ || !@HAVE_DECL_EXPL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
165 extern long double expl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
166 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
167 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
168 # undef expl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
169 # define expl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
170 (GL_LINK_WARNING ("expl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
171 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
172 expl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
173 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
174
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
175
9291
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
176 #if @GNULIB_FLOORF@
9420
9e0484f26251 Fix link errors with Sun C 5.0 on Solaris 10.
Bruno Haible <bruno@clisp.org>
parents: 9418
diff changeset
177 # if @REPLACE_FLOORF@
9291
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
178 # define floorf rpl_floorf
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
179 extern float floorf (float x);
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
180 # endif
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
181 #elif defined GNULIB_POSIXCHECK
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
182 # undef floorf
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
183 # define floorf(x) \
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
184 (GL_LINK_WARNING ("floorf is unportable - " \
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
185 "use gnulib module floorf for portability"), \
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
186 floorf (x))
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
187 #endif
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
188
9293
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
189 #if @GNULIB_FLOORL@
9420
9e0484f26251 Fix link errors with Sun C 5.0 on Solaris 10.
Bruno Haible <bruno@clisp.org>
parents: 9418
diff changeset
190 # if @REPLACE_FLOORL@
9293
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
191 # define floorl rpl_floorl
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
192 extern long double floorl (long double x);
9293
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
193 # endif
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
194 #elif defined GNULIB_POSIXCHECK
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
195 # undef floorl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
196 # define floorl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
197 (GL_LINK_WARNING ("floorl is unportable - " \
9293
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
198 "use gnulib module floorl for portability"), \
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
199 floorl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
200 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
201
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
202
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
203 /* Write x as
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
204 x = mantissa * 2^exp
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
205 where
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
206 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
207 If x is zero: mantissa = x, exp = 0.
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
208 If x is infinite or NaN: mantissa = x, exp unspecified.
9312
bec01fc15c2f Rename parameter 'exp' to 'expptr', to avoid gcc warnings.
Bruno Haible <bruno@clisp.org>
parents: 9309
diff changeset
209 Store exp in *EXPPTR and return mantissa. */
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
210 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
211 # define frexpl rpl_frexpl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
212 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
213 #if (@GNULIB_FREXPL@ && @REPLACE_FREXPL@) || !@HAVE_DECL_FREXPL@
9312
bec01fc15c2f Rename parameter 'exp' to 'expptr', to avoid gcc warnings.
Bruno Haible <bruno@clisp.org>
parents: 9309
diff changeset
214 extern long double frexpl (long double x, int *expptr);
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
215 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
216 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
217 # undef frexpl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
218 # define frexpl(x,e) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
219 (GL_LINK_WARNING ("frexpl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
220 "use gnulib module frexpl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
221 frexpl (x, e))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
222 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
223
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
224
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
225 /* Return x * 2^exp. */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
226 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
227 # define ldexpl rpl_ldexpl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
228 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
229 #if (@GNULIB_LDEXPL@ && @REPLACE_LDEXPL@) || !@HAVE_DECL_LDEXPL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
230 extern long double ldexpl (long double x, int exp);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
231 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
232 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
233 # undef ldexpl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
234 # define ldexpl(x,e) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
235 (GL_LINK_WARNING ("ldexpl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
236 "use gnulib module ldexpl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
237 ldexpl (x, e))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
238 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
239
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
240
11735
1dc493668d2b Avoid syntax error on QNX.
Bruno Haible <bruno@clisp.org>
parents: 11583
diff changeset
241 #if @GNULIB_MATHL@ || (!@HAVE_DECL_LOGL@ && !defined logl)
11741
5f5c1c77ef82 Avoid compilation error on QNX.
Bruno Haible <bruno@clisp.org>
parents: 11735
diff changeset
242 # undef logl
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
243 extern long double logl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
244 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
245 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
246 # undef logl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
247 # define logl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
248 (GL_LINK_WARNING ("logl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
249 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
250 logl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
251 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
252
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
253
9375
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
254 #if @GNULIB_ROUNDF@
9465
4a3319c82e39 Use REPLACE_ROUND instead of HAVE_DECL_ROUND.
Bruno Haible <bruno@clisp.org>
parents: 9423
diff changeset
255 # if @REPLACE_ROUNDF@
9413
9572edc3cc57 Check whether round* exist in libraries, not just whether they are declared.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9375
diff changeset
256 # undef roundf
9375
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
257 # define roundf rpl_roundf
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
258 extern float roundf (float x);
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
259 # endif
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
260 #elif defined GNULIB_POSIXCHECK
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
261 # undef roundf
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
262 # define roundf(x) \
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
263 (GL_LINK_WARNING ("roundf is unportable - " \
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
264 "use gnulib module roundf for portability"), \
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
265 roundf (x))
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
266 #endif
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
267
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
268 #if @GNULIB_ROUND@
9465
4a3319c82e39 Use REPLACE_ROUND instead of HAVE_DECL_ROUND.
Bruno Haible <bruno@clisp.org>
parents: 9423
diff changeset
269 # if @REPLACE_ROUND@
9413
9572edc3cc57 Check whether round* exist in libraries, not just whether they are declared.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9375
diff changeset
270 # undef round
9375
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
271 # define round rpl_round
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
272 extern double round (double x);
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
273 # endif
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
274 #elif defined GNULIB_POSIXCHECK
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
275 # undef round
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
276 # define round(x) \
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
277 (GL_LINK_WARNING ("round is unportable - " \
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
278 "use gnulib module round for portability"), \
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
279 round (x))
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
280 #endif
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
281
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
282 #if @GNULIB_ROUNDL@
9465
4a3319c82e39 Use REPLACE_ROUND instead of HAVE_DECL_ROUND.
Bruno Haible <bruno@clisp.org>
parents: 9423
diff changeset
283 # if @REPLACE_ROUNDL@
9413
9572edc3cc57 Check whether round* exist in libraries, not just whether they are declared.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9375
diff changeset
284 # undef roundl
9375
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
285 # define roundl rpl_roundl
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
286 extern long double roundl (long double x);
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
287 # endif
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
288 #elif defined GNULIB_POSIXCHECK
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
289 # undef roundl
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
290 # define roundl(x) \
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
291 (GL_LINK_WARNING ("roundl is unportable - " \
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
292 "use gnulib module roundl for portability"), \
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
293 roundl (x))
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
294 #endif
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
295
96fea5b2eb11 Implement 'round', 'roundf', 'roundl' modules.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9312
diff changeset
296
11735
1dc493668d2b Avoid syntax error on QNX.
Bruno Haible <bruno@clisp.org>
parents: 11583
diff changeset
297 #if @GNULIB_MATHL@ || (!@HAVE_DECL_SINL@ && !defined sinl)
11741
5f5c1c77ef82 Avoid compilation error on QNX.
Bruno Haible <bruno@clisp.org>
parents: 11735
diff changeset
298 # undef sinl
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
299 extern long double sinl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
300 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
301 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
302 # undef sinl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
303 # define sinl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
304 (GL_LINK_WARNING ("sinl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
305 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
306 sinl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
307 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
308
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
309
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
310 #if @GNULIB_MATHL@ || !@HAVE_DECL_SQRTL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
311 extern long double sqrtl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
312 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
313 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
314 # undef sqrtl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
315 # define sqrtl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
316 (GL_LINK_WARNING ("sqrtl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
317 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
318 sqrtl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
319 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
320
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
321
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
322 #if @GNULIB_MATHL@ || !@HAVE_DECL_TANL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
323 extern long double tanl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
324 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
325 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
326 # undef tanl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
327 # define tanl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
328 (GL_LINK_WARNING ("tanl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
329 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
330 tanl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
331 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
332
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
333
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
334 #if @GNULIB_TRUNCF@
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
335 # if !@HAVE_DECL_TRUNCF@
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
336 # define truncf rpl_truncf
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
337 extern float truncf (float x);
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
338 # endif
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
339 #elif defined GNULIB_POSIXCHECK
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
340 # undef truncf
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
341 # define truncf(x) \
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
342 (GL_LINK_WARNING ("truncf is unportable - " \
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
343 "use gnulib module truncf for portability"), \
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
344 truncf (x))
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
345 #endif
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
346
9282
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
347 #if @GNULIB_TRUNC@
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
348 # if !@HAVE_DECL_TRUNC@
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
349 # define trunc rpl_trunc
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
350 extern double trunc (double x);
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
351 # endif
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
352 #elif defined GNULIB_POSIXCHECK
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
353 # undef trunc
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
354 # define trunc(x) \
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
355 (GL_LINK_WARNING ("trunc is unportable - " \
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
356 "use gnulib module trunc for portability"), \
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
357 trunc (x))
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
358 #endif
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
359
9287
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
360 #if @GNULIB_TRUNCL@
9913
d3f5a70dc1ba Make truncl work on OSF/1 4.0.
Bruno Haible <bruno@clisp.org>
parents: 9898
diff changeset
361 # if @REPLACE_TRUNCL@
d3f5a70dc1ba Make truncl work on OSF/1 4.0.
Bruno Haible <bruno@clisp.org>
parents: 9898
diff changeset
362 # undef truncl
9287
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
363 # define truncl rpl_truncl
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
364 extern long double truncl (long double x);
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
365 # endif
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
366 #elif defined GNULIB_POSIXCHECK
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
367 # undef truncl
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
368 # define truncl(x) \
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
369 (GL_LINK_WARNING ("truncl is unportable - " \
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
370 "use gnulib module truncl for portability"), \
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
371 truncl (x))
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
372 #endif
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
373
9418
5e7b33ec70ff Add/remove some blank lines.
Bruno Haible <bruno@clisp.org>
parents: 9414
diff changeset
374
9414
1c5d0b856e8b Implement 'isfinite' module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9413
diff changeset
375 #if @GNULIB_ISFINITE@
9423
fa47aa8bb105 Use REPLACE_ISFINITE instead of HAVE_DECL_ISFINITE.
Bruno Haible <bruno@clisp.org>
parents: 9420
diff changeset
376 # if @REPLACE_ISFINITE@
9414
1c5d0b856e8b Implement 'isfinite' module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9413
diff changeset
377 extern int gl_isfinitef (float x);
1c5d0b856e8b Implement 'isfinite' module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9413
diff changeset
378 extern int gl_isfinited (double x);
1c5d0b856e8b Implement 'isfinite' module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9413
diff changeset
379 extern int gl_isfinitel (long double x);
1c5d0b856e8b Implement 'isfinite' module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9413
diff changeset
380 # undef isfinite
1c5d0b856e8b Implement 'isfinite' module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9413
diff changeset
381 # define isfinite(x) \
1c5d0b856e8b Implement 'isfinite' module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9413
diff changeset
382 (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
1c5d0b856e8b Implement 'isfinite' module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9413
diff changeset
383 sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
1c5d0b856e8b Implement 'isfinite' module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9413
diff changeset
384 gl_isfinitef (x))
1c5d0b856e8b Implement 'isfinite' module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9413
diff changeset
385 # endif
1c5d0b856e8b Implement 'isfinite' module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9413
diff changeset
386 #elif defined GNULIB_POSIXCHECK
1c5d0b856e8b Implement 'isfinite' module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9413
diff changeset
387 /* How to override a macro? */
1c5d0b856e8b Implement 'isfinite' module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9413
diff changeset
388 #endif
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
389
9418
5e7b33ec70ff Add/remove some blank lines.
Bruno Haible <bruno@clisp.org>
parents: 9414
diff changeset
390
10287
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
391 #if @GNULIB_ISINF@
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
392 # if @REPLACE_ISINF@
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
393 extern int gl_isinff (float x);
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
394 extern int gl_isinfd (double x);
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
395 extern int gl_isinfl (long double x);
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
396 # undef isinf
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
397 # define isinf(x) \
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
398 (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
399 sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
400 gl_isinff (x))
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
401 # endif
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
402 #elif defined GNULIB_POSIXCHECK
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
403 /* How to override a macro? */
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
404 #endif
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
405
7a5cfea8469f Add isinf module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 10267
diff changeset
406
10667
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
407 #if @GNULIB_ISNANF@
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
408 /* Test for NaN for 'float' numbers. */
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
409 # if @HAVE_ISNANF@
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
410 /* The original <math.h> included above provides a declaration of isnan macro
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
411 or (older) isnanf function. */
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
412 # include <math.h>
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
413 # if __GNUC__ >= 4
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
414 /* GCC 4.0 and newer provides three built-ins for isnan. */
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
415 # undef isnanf
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
416 # define isnanf(x) __builtin_isnanf ((float)(x))
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
417 # elif defined isnan
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
418 # undef isnanf
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
419 # define isnanf(x) isnan ((float)(x))
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
420 # endif
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
421 # else
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
422 /* Test whether X is a NaN. */
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
423 # undef isnanf
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
424 # define isnanf rpl_isnanf
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
425 extern int isnanf (float x);
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
426 # endif
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
427 #endif
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
428
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
429 #if @GNULIB_ISNAND@
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
430 /* Test for NaN for 'double' numbers.
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
431 This function is a gnulib extension, unlike isnan() which applied only
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
432 to 'double' numbers earlier but now is a type-generic macro. */
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
433 # if @HAVE_ISNAND@
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
434 /* The original <math.h> included above provides a declaration of isnan macro. */
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
435 # include <math.h>
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
436 # if __GNUC__ >= 4
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
437 /* GCC 4.0 and newer provides three built-ins for isnan. */
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
438 # undef isnand
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
439 # define isnand(x) __builtin_isnan ((double)(x))
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
440 # else
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
441 # undef isnand
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
442 # define isnand(x) isnan ((double)(x))
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
443 # endif
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
444 # else
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
445 /* Test whether X is a NaN. */
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
446 # undef isnand
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
447 # define isnand rpl_isnand
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
448 extern int isnand (double x);
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
449 # endif
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
450 #endif
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
451
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
452 #if @GNULIB_ISNANL@
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
453 /* Test for NaN for 'long double' numbers. */
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
454 # if @HAVE_ISNANL@
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
455 /* The original <math.h> included above provides a declaration of isnan macro or (older) isnanl function. */
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
456 # include <math.h>
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
457 # if __GNUC__ >= 4
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
458 /* GCC 4.0 and newer provides three built-ins for isnan. */
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
459 # undef isnanl
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
460 # define isnanl(x) __builtin_isnanl ((long double)(x))
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
461 # elif defined isnan
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
462 # undef isnanl
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
463 # define isnanl(x) isnan ((long double)(x))
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
464 # endif
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
465 # else
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
466 /* Test whether X is a NaN. */
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
467 # undef isnanl
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
468 # define isnanl rpl_isnanl
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
469 extern int isnanl (long double x);
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
470 # endif
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
471 #endif
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
472
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
473 /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
10267
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
474 #if @GNULIB_ISNAN@
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
475 # if @REPLACE_ISNAN@
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
476 /* We can't just use the isnanf macro (e.g.) as exposed by
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
477 isnanf.h (e.g.) here, because those may end up being macros
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
478 that recursively expand back to isnan. So use the gnulib
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
479 replacements for them directly. */
10667
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
480 # if @HAVE_ISNANF@ && __GNUC__ >= 4
10267
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
481 # define gl_isnan_f(x) __builtin_isnan ((float)(x))
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
482 # else
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
483 extern int rpl_isnanf (float x);
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
484 # define gl_isnan_f(x) rpl_isnanf (x)
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
485 # endif
10667
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
486 # if @HAVE_ISNAND@ && __GNUC__ >= 4
10267
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
487 # define gl_isnan_d(x) __builtin_isnan ((double)(x))
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
488 # else
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
489 extern int rpl_isnand (double x);
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
490 # define gl_isnan_d(x) rpl_isnand (x)
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
491 # endif
10667
678640901735 Move the isnanf(), isnand(), isnanl() declarations to <math.h>.
Bruno Haible <bruno@clisp.org>
parents: 10655
diff changeset
492 # if @HAVE_ISNANL@ && __GNUC__ >= 4
10267
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
493 # define gl_isnan_l(x) __builtin_isnan ((long double)(x))
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
494 # else
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
495 extern int rpl_isnanl (long double x);
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
496 # define gl_isnan_l(x) rpl_isnanl (x)
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
497 # endif
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
498 # undef isnan
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
499 # define isnan(x) \
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
500 (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
501 sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
502 gl_isnan_f (x))
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
503 # endif
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
504 #elif defined GNULIB_POSIXCHECK
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
505 /* How to override a macro? */
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
506 #endif
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
507
bf763f10f63c Add isnan module.
Ben Pfaff <blp@cs.stanford.edu>
parents: 9913
diff changeset
508
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
509 #if @GNULIB_SIGNBIT@
9645
c8174371956e Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents: 9465
diff changeset
510 # if @REPLACE_SIGNBIT_USING_GCC@
c8174371956e Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents: 9465
diff changeset
511 # undef signbit
c8174371956e Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents: 9465
diff changeset
512 /* GCC 4.0 and newer provides three built-ins for signbit. */
c8174371956e Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents: 9465
diff changeset
513 # define signbit(x) \
c8174371956e Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents: 9465
diff changeset
514 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
c8174371956e Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents: 9465
diff changeset
515 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
c8174371956e Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents: 9465
diff changeset
516 __builtin_signbitf (x))
c8174371956e Exploit the __builtin_signbit GCC built-in.
Bruno Haible <bruno@clisp.org>
parents: 9465
diff changeset
517 # endif
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
518 # if @REPLACE_SIGNBIT@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
519 # undef signbit
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
520 extern int gl_signbitf (float arg);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
521 extern int gl_signbitd (double arg);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
522 extern int gl_signbitl (long double arg);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
523 # if __GNUC__ >= 2 && !__STRICT_ANSI__
11506
d800366aa3fe Avoid link error when creating a namespace clean library.
Bruno Haible <bruno@clisp.org>
parents: 10836
diff changeset
524 # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
11525
0b09102d516e Fix compilation error introduced on 2009-04-25.
Bruno Haible <bruno@clisp.org>
parents: 11506
diff changeset
525 # define gl_signbitf_OPTIMIZED_MACRO
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
526 # define gl_signbitf(arg) \
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11741
diff changeset
527 ({ union { float _value; \
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
528 unsigned int _word[(sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11741
diff changeset
529 } _m; \
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11741
diff changeset
530 _m._value = (arg); \
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11741
diff changeset
531 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
532 })
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
533 # endif
11506
d800366aa3fe Avoid link error when creating a namespace clean library.
Bruno Haible <bruno@clisp.org>
parents: 10836
diff changeset
534 # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
11525
0b09102d516e Fix compilation error introduced on 2009-04-25.
Bruno Haible <bruno@clisp.org>
parents: 11506
diff changeset
535 # define gl_signbitd_OPTIMIZED_MACRO
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
536 # define gl_signbitd(arg) \
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11741
diff changeset
537 ({ union { double _value; \
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
538 unsigned int _word[(sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11741
diff changeset
539 } _m; \
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11741
diff changeset
540 _m._value = (arg); \
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11741
diff changeset
541 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
542 })
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
543 # endif
11506
d800366aa3fe Avoid link error when creating a namespace clean library.
Bruno Haible <bruno@clisp.org>
parents: 10836
diff changeset
544 # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
11525
0b09102d516e Fix compilation error introduced on 2009-04-25.
Bruno Haible <bruno@clisp.org>
parents: 11506
diff changeset
545 # define gl_signbitl_OPTIMIZED_MACRO
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
546 # define gl_signbitl(arg) \
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11741
diff changeset
547 ({ union { long double _value; \
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
548 unsigned int _word[(sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11741
diff changeset
549 } _m; \
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11741
diff changeset
550 _m._value = (arg); \
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11741
diff changeset
551 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
552 })
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
553 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
554 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
555 # define signbit(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
556 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
557 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
558 gl_signbitf (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
559 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
560 #elif defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
561 /* How to override a macro? */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
562 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
563
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
564
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
565 #ifdef __cplusplus
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
566 }
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
567 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
568
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
569 #endif /* _GL_MATH_H */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
570 #endif /* _GL_MATH_H */