annotate lib/math.in.h @ 9309:bbbbbf4cd1c5

Change copyright notice from GPLv2+ to GPLv3+.
author Bruno Haible <bruno@clisp.org>
date Sun, 07 Oct 2007 19:14:58 +0200
parents 3191943555eb
children bec01fc15c2f
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
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 Copyright (C) 2002-2003, 2007 Free Software Foundation, Inc.
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
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 /* The include_next requires a split double-inclusion guard. */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 #@INCLUDE_NEXT@ @NEXT_MATH_H@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 #ifndef _GL_MATH_H
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 #define _GL_MATH_H
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25
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 /* 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
28
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 #ifdef __cplusplus
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 extern "C" {
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 #endif
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
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 /* Write x as
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 x = mantissa * 2^exp
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 where
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 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
39 If x is zero: mantissa = x, exp = 0.
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 If x is infinite or NaN: mantissa = x, exp unspecified.
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 Store exp and return mantissa. */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 #if @GNULIB_FREXP@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 # if @REPLACE_FREXP@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 # define frexp rpl_frexp
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 extern double frexp (double x, int *exp);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 #elif defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 # undef frexp
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 # define frexp(x,e) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 (GL_LINK_WARNING ("frexp is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 "use gnulib module frexp for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 frexp (x, e))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 #if @GNULIB_MATHL@ || !@HAVE_DECL_ACOSL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 extern long double acosl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 # undef acosl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 # define acosl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 (GL_LINK_WARNING ("acosl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 acosl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
65 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
67
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68 #if @GNULIB_MATHL@ || !@HAVE_DECL_ASINL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 extern long double asinl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 # undef asinl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
73 # define asinl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
74 (GL_LINK_WARNING ("asinl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
76 asinl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
77 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
78
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
79
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
80 #if @GNULIB_MATHL@ || !@HAVE_DECL_ATANL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81 extern long double atanl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 # undef atanl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
85 # define atanl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
86 (GL_LINK_WARNING ("atanl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
88 atanl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
90
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
91
9295
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
92 #if @GNULIB_CEILF@
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
93 # if !@HAVE_DECL_CEILF@
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
94 # define ceilf rpl_ceilf
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
95 extern float ceilf (float x);
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
96 # endif
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
97 #elif defined GNULIB_POSIXCHECK
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
98 # undef ceilf
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
99 # define ceilf(x) \
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
100 (GL_LINK_WARNING ("ceilf is unportable - " \
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
101 "use gnulib module ceilf for portability"), \
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
102 ceilf (x))
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
103 #endif
a19e5992f6f0 New module 'ceilf'.
Bruno Haible <bruno@clisp.org>
parents: 9293
diff changeset
104
9297
3191943555eb New module 'ceill'.
Bruno Haible <bruno@clisp.org>
parents: 9295
diff changeset
105 #if @GNULIB_CEILL@
3191943555eb New module 'ceill'.
Bruno Haible <bruno@clisp.org>
parents: 9295
diff changeset
106 # if !@HAVE_DECL_CEILL@
3191943555eb New module 'ceill'.
Bruno Haible <bruno@clisp.org>
parents: 9295
diff changeset
107 # define ceill rpl_ceill
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
108 extern long double ceill (long double x);
9297
3191943555eb New module 'ceill'.
Bruno Haible <bruno@clisp.org>
parents: 9295
diff changeset
109 # endif
3191943555eb New module 'ceill'.
Bruno Haible <bruno@clisp.org>
parents: 9295
diff changeset
110 #elif defined GNULIB_POSIXCHECK
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
111 # undef ceill
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
112 # define ceill(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
113 (GL_LINK_WARNING ("ceill is unportable - " \
9297
3191943555eb New module 'ceill'.
Bruno Haible <bruno@clisp.org>
parents: 9295
diff changeset
114 "use gnulib module ceill for portability"), \
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
115 ceill (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
116 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
117
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
118
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
119 #if @GNULIB_MATHL@ || !@HAVE_DECL_COSL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
120 extern long double cosl (long double 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 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
123 # undef cosl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
124 # define cosl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
125 (GL_LINK_WARNING ("cosl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
126 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
127 cosl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
128 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
129
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
130
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
131 #if @GNULIB_MATHL@ || !@HAVE_DECL_EXPL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
132 extern long double expl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
133 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
134 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
135 # undef expl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
136 # define expl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
137 (GL_LINK_WARNING ("expl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
138 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
139 expl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
140 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
141
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
142
9291
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
143 #if @GNULIB_FLOORF@
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
144 # if !@HAVE_DECL_FLOORF@
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
145 # define floorf rpl_floorf
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
146 extern float floorf (float x);
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
147 # endif
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
148 #elif defined GNULIB_POSIXCHECK
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
149 # undef floorf
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
150 # define floorf(x) \
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
151 (GL_LINK_WARNING ("floorf is unportable - " \
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
152 "use gnulib module floorf for portability"), \
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
153 floorf (x))
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
154 #endif
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
155
9293
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
156 #if @GNULIB_FLOORL@
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
157 # if !@HAVE_DECL_FLOORL@
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
158 # define floorl rpl_floorl
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
159 extern long double floorl (long double x);
9293
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
160 # endif
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
161 #elif defined GNULIB_POSIXCHECK
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
162 # undef floorl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
163 # define floorl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
164 (GL_LINK_WARNING ("floorl is unportable - " \
9293
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
165 "use gnulib module floorl for portability"), \
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
166 floorl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
167 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
168
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
169
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
170 /* Write x as
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
171 x = mantissa * 2^exp
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
172 where
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
173 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
174 If x is zero: mantissa = x, exp = 0.
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
175 If x is infinite or NaN: mantissa = x, exp unspecified.
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
176 Store exp and return mantissa. */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
177 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
178 # define frexpl rpl_frexpl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
179 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
180 #if (@GNULIB_FREXPL@ && @REPLACE_FREXPL@) || !@HAVE_DECL_FREXPL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
181 extern long double frexpl (long double x, int *exp);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
182 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
183 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
184 # undef frexpl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
185 # define frexpl(x,e) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
186 (GL_LINK_WARNING ("frexpl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
187 "use gnulib module frexpl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
188 frexpl (x, e))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
189 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
190
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
191
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
192 /* Return x * 2^exp. */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
193 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
194 # define ldexpl rpl_ldexpl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
195 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
196 #if (@GNULIB_LDEXPL@ && @REPLACE_LDEXPL@) || !@HAVE_DECL_LDEXPL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
197 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
198 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
199 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
200 # undef ldexpl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
201 # define ldexpl(x,e) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
202 (GL_LINK_WARNING ("ldexpl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
203 "use gnulib module ldexpl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
204 ldexpl (x, e))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
205 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
206
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
207
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
208 #if @GNULIB_MATHL@ || !@HAVE_DECL_LOGL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
209 extern long double logl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
210 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
211 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
212 # undef logl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
213 # define logl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
214 (GL_LINK_WARNING ("logl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
215 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
216 logl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
217 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
218
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
219
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
220 #if @GNULIB_MATHL@ || !@HAVE_DECL_SINL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
221 extern long double sinl (long double x);
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 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
224 # undef sinl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
225 # define sinl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
226 (GL_LINK_WARNING ("sinl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
227 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
228 sinl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
229 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
230
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
231
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
232 #if @GNULIB_MATHL@ || !@HAVE_DECL_SQRTL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
233 extern long double sqrtl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
234 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
235 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
236 # undef sqrtl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
237 # define sqrtl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
238 (GL_LINK_WARNING ("sqrtl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
239 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
240 sqrtl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
241 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
242
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
243
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
244 #if @GNULIB_MATHL@ || !@HAVE_DECL_TANL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
245 extern long double tanl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
246 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
247 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
248 # undef tanl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
249 # define tanl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
250 (GL_LINK_WARNING ("tanl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
251 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
252 tanl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
253 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
254
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
255
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
256 #if @GNULIB_TRUNCF@
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
257 # if !@HAVE_DECL_TRUNCF@
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
258 # define truncf rpl_truncf
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
259 extern float truncf (float x);
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
260 # endif
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
261 #elif defined GNULIB_POSIXCHECK
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
262 # undef truncf
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
263 # define truncf(x) \
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
264 (GL_LINK_WARNING ("truncf is unportable - " \
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
265 "use gnulib module truncf for portability"), \
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
266 truncf (x))
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
267 #endif
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
268
9282
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
269 #if @GNULIB_TRUNC@
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
270 # if !@HAVE_DECL_TRUNC@
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
271 # define trunc rpl_trunc
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
272 extern double trunc (double x);
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
273 # endif
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
274 #elif defined GNULIB_POSIXCHECK
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
275 # undef trunc
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
276 # define trunc(x) \
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
277 (GL_LINK_WARNING ("trunc is unportable - " \
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
278 "use gnulib module trunc for portability"), \
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
279 trunc (x))
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
280 #endif
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
281
9287
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
282 #if @GNULIB_TRUNCL@
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
283 # if !@HAVE_DECL_TRUNCL@
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
284 # define truncl rpl_truncl
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
285 extern long double truncl (long double x);
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
286 # endif
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
287 #elif defined GNULIB_POSIXCHECK
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
288 # undef truncl
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
289 # define truncl(x) \
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
290 (GL_LINK_WARNING ("truncl is unportable - " \
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
291 "use gnulib module truncl for portability"), \
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
292 truncl (x))
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
293 #endif
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
294
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
295
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
296 #if @GNULIB_SIGNBIT@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
297 # if @REPLACE_SIGNBIT@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
298 # undef signbit
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
299 extern int gl_signbitf (float arg);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
300 extern int gl_signbitd (double arg);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
301 extern int gl_signbitl (long double arg);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
302 # if __GNUC__ >= 2 && !__STRICT_ANSI__
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
303 # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
304 # define gl_signbitf(arg) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
305 ({ union { float _value; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
306 unsigned int _word[(sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
307 } _m; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
308 _m._value = (arg); \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
309 (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
310 })
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
311 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
312 # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
313 # define gl_signbitd(arg) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
314 ({ union { double _value; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
315 unsigned int _word[(sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
316 } _m; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
317 _m._value = (arg); \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
318 (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
319 })
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
320 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
321 # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
322 # define gl_signbitl(arg) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
323 ({ union { long double _value; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
324 unsigned int _word[(sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
325 } _m; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
326 _m._value = (arg); \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
327 (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
328 })
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
329 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
330 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
331 # define signbit(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
332 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
333 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
334 gl_signbitf (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
335 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
336 #elif defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
337 /* How to override a macro? */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
338 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
339
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
340
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
341 #ifdef __cplusplus
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
342 }
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
343 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
344
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
345 #endif /* _GL_MATH_H */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
346 #endif /* _GL_MATH_H */