annotate lib/math.in.h @ 9293:b4e0b96fc4ba

New module 'floorl'.
author Bruno Haible <bruno@clisp.org>
date Fri, 05 Oct 2007 03:33:31 +0200
parents 5828ff66b473
children a19e5992f6f0
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
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 This program is free software; you can redistribute it and/or modify
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
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 the Free Software Foundation; either version 2, or (at your option)
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 any later version.
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
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 along with this program; if not, write to the Free Software Foundation,
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 #ifndef _GL_MATH_H
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 /* 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
22 #@INCLUDE_NEXT@ @NEXT_MATH_H@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 #ifndef _GL_MATH_H
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 #define _GL_MATH_H
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
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 /* 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
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 #ifdef __cplusplus
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 extern "C" {
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 #endif
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
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 /* Write x as
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 x = mantissa * 2^exp
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 where
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 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
40 If x is zero: mantissa = x, exp = 0.
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 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
42 Store exp and return mantissa. */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 #if @GNULIB_FREXP@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 # if @REPLACE_FREXP@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 # define frexp rpl_frexp
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 extern double frexp (double x, int *exp);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 #elif defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 # undef frexp
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 # define frexp(x,e) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 (GL_LINK_WARNING ("frexp is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 "use gnulib module frexp for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 frexp (x, e))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 #endif
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
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 #if @GNULIB_MATHL@ || !@HAVE_DECL_ACOSL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58 extern long double acosl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 # undef acosl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 # define acosl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 (GL_LINK_WARNING ("acosl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
65 acosl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
68
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 #if @GNULIB_MATHL@ || !@HAVE_DECL_ASINL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70 extern long double asinl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
73 # undef asinl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
74 # define asinl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75 (GL_LINK_WARNING ("asinl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
76 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
77 asinl (x))
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
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
80
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81 #if @GNULIB_MATHL@ || !@HAVE_DECL_ATANL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82 extern long double atanl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
85 # undef atanl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
86 # define atanl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87 (GL_LINK_WARNING ("atanl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
88 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89 atanl (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
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
92
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
93 #if @GNULIB_MATHL@ || !@HAVE_DECL_CEILL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
94 extern long double ceill (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
96 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
97 # undef ceill
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
98 # define ceill(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
99 (GL_LINK_WARNING ("ceill is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
100 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
101 ceill (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
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
104
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
105 #if @GNULIB_MATHL@ || !@HAVE_DECL_COSL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
106 extern long double cosl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
107 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
108 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
109 # undef cosl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
110 # define cosl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
111 (GL_LINK_WARNING ("cosl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
112 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
113 cosl (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
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
116
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
117 #if @GNULIB_MATHL@ || !@HAVE_DECL_EXPL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
118 extern long double expl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
119 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
120 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
121 # undef expl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
122 # define expl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
123 (GL_LINK_WARNING ("expl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
124 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
125 expl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
126 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
127
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
128
9291
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
129 #if @GNULIB_FLOORF@
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
130 # if !@HAVE_DECL_FLOORF@
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
131 # define floorf rpl_floorf
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
132 extern float floorf (float x);
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
133 # endif
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
134 #elif defined GNULIB_POSIXCHECK
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
135 # undef floorf
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
136 # define floorf(x) \
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
137 (GL_LINK_WARNING ("floorf is unportable - " \
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
138 "use gnulib module floorf for portability"), \
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
139 floorf (x))
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
140 #endif
5828ff66b473 New module 'floorf'.
Bruno Haible <bruno@clisp.org>
parents: 9287
diff changeset
141
9293
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
142 #if @GNULIB_FLOORL@
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
143 # if !@HAVE_DECL_FLOORL@
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
144 # define floorl rpl_floorl
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
145 extern long double floorl (long double x);
9293
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
146 # endif
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
147 #elif defined GNULIB_POSIXCHECK
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
148 # undef floorl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
149 # define floorl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
150 (GL_LINK_WARNING ("floorl is unportable - " \
9293
b4e0b96fc4ba New module 'floorl'.
Bruno Haible <bruno@clisp.org>
parents: 9291
diff changeset
151 "use gnulib module floorl for portability"), \
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
152 floorl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
153 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
154
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
155
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
156 /* Write x as
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
157 x = mantissa * 2^exp
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
158 where
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
159 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
160 If x is zero: mantissa = x, exp = 0.
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
161 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
162 Store exp and return mantissa. */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
163 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
164 # define frexpl rpl_frexpl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
165 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
166 #if (@GNULIB_FREXPL@ && @REPLACE_FREXPL@) || !@HAVE_DECL_FREXPL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
167 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
168 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
169 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
170 # undef frexpl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
171 # define frexpl(x,e) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
172 (GL_LINK_WARNING ("frexpl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
173 "use gnulib module frexpl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
174 frexpl (x, e))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
175 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
176
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
177
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
178 /* Return x * 2^exp. */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
179 #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
180 # define ldexpl rpl_ldexpl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
181 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
182 #if (@GNULIB_LDEXPL@ && @REPLACE_LDEXPL@) || !@HAVE_DECL_LDEXPL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
183 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
184 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
185 #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
186 # undef ldexpl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
187 # define ldexpl(x,e) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
188 (GL_LINK_WARNING ("ldexpl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
189 "use gnulib module ldexpl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
190 ldexpl (x, e))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
191 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
192
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
193
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
194 #if @GNULIB_MATHL@ || !@HAVE_DECL_LOGL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
195 extern long double logl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
196 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
197 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
198 # undef logl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
199 # define logl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
200 (GL_LINK_WARNING ("logl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
201 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
202 logl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
203 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
204
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
205
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
206 #if @GNULIB_MATHL@ || !@HAVE_DECL_SINL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
207 extern long double sinl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
208 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
209 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
210 # undef sinl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
211 # define sinl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
212 (GL_LINK_WARNING ("sinl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
213 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
214 sinl (x))
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
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
217
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
218 #if @GNULIB_MATHL@ || !@HAVE_DECL_SQRTL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
219 extern long double sqrtl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
220 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
221 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
222 # undef sqrtl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
223 # define sqrtl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
224 (GL_LINK_WARNING ("sqrtl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
225 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
226 sqrtl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
227 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
228
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
229
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
230 #if @GNULIB_MATHL@ || !@HAVE_DECL_TANL@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
231 extern long double tanl (long double x);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
232 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
233 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
234 # undef tanl
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
235 # define tanl(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
236 (GL_LINK_WARNING ("tanl is unportable - " \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
237 "use gnulib module mathl for portability"), \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
238 tanl (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
239 #endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
240
9285
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
241
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
242 #if @GNULIB_TRUNCF@
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
243 # if !@HAVE_DECL_TRUNCF@
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
244 # define truncf rpl_truncf
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
245 extern float truncf (float x);
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
246 # endif
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
247 #elif defined GNULIB_POSIXCHECK
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
248 # undef truncf
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
249 # define truncf(x) \
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
250 (GL_LINK_WARNING ("truncf is unportable - " \
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
251 "use gnulib module truncf for portability"), \
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
252 truncf (x))
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
253 #endif
79e67a783774 New module 'truncf'.
Bruno Haible <bruno@clisp.org>
parents: 9282
diff changeset
254
9282
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
255 #if @GNULIB_TRUNC@
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
256 # if !@HAVE_DECL_TRUNC@
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
257 # define trunc rpl_trunc
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
258 extern double trunc (double x);
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
259 # endif
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
260 #elif defined GNULIB_POSIXCHECK
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
261 # undef trunc
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
262 # define trunc(x) \
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
263 (GL_LINK_WARNING ("trunc is unportable - " \
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
264 "use gnulib module trunc for portability"), \
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
265 trunc (x))
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
266 #endif
9a26e94f946a New module 'trunc'.
Bruno Haible <bruno@clisp.org>
parents: 9255
diff changeset
267
9287
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
268 #if @GNULIB_TRUNCL@
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
269 # if !@HAVE_DECL_TRUNCL@
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
270 # define truncl rpl_truncl
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
271 extern long double truncl (long double x);
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
272 # endif
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
273 #elif defined GNULIB_POSIXCHECK
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
274 # undef truncl
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
275 # define truncl(x) \
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
276 (GL_LINK_WARNING ("truncl is unportable - " \
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
277 "use gnulib module truncl for portability"), \
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
278 truncl (x))
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
279 #endif
ec7800681aff New module 'truncl'.
Bruno Haible <bruno@clisp.org>
parents: 9285
diff changeset
280
9255
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
281
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
282 #if @GNULIB_SIGNBIT@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
283 # if @REPLACE_SIGNBIT@
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
284 # undef signbit
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
285 extern int gl_signbitf (float arg);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
286 extern int gl_signbitd (double arg);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
287 extern int gl_signbitl (long double arg);
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
288 # if __GNUC__ >= 2 && !__STRICT_ANSI__
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
289 # 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
290 # define gl_signbitf(arg) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
291 ({ union { float _value; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
292 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
293 } _m; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
294 _m._value = (arg); \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
295 (_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
296 })
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
297 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
298 # 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
299 # define gl_signbitd(arg) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
300 ({ union { double _value; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
301 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
302 } _m; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
303 _m._value = (arg); \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
304 (_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
305 })
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
306 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
307 # 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
308 # define gl_signbitl(arg) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
309 ({ union { long double _value; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
310 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
311 } _m; \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
312 _m._value = (arg); \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
313 (_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
314 })
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
315 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
316 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
317 # define signbit(x) \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
318 (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
319 sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
320 gl_signbitf (x))
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
321 # endif
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
322 #elif defined GNULIB_POSIXCHECK
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
323 /* How to override a macro? */
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
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
326
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
327 #ifdef __cplusplus
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
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
331 #endif /* _GL_MATH_H */
590a8ac4bca4 Rename math_.h to math.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
332 #endif /* _GL_MATH_H */