1 /* A GNU-like <math.h>.
3 Copyright (C) 2002-2003, 2007 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software Foundation,
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
22 #include @ABSOLUTE_MATH_H@
25 /* The definition of GL_LINK_WARNING is copied here. */
36 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
37 If x is zero: mantissa = x, exp = 0.
38 If x is infinite or NaN: mantissa = x, exp unspecified.
39 Store exp and return mantissa. */
42 # define frexp rpl_frexp
43 extern double frexp (double x, int *exp);
45 #elif defined GNULIB_POSIXCHECK
48 (GL_LINK_WARNING ("frexp is unportable - " \
49 "use gnulib module frexp for portability"), \
54 #if @GNULIB_MATHL@ || !@HAVE_DECL_ACOSL@
55 extern long double acosl (long double x);
57 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
60 (GL_LINK_WARNING ("acosl is unportable - " \
61 "use gnulib module mathl for portability"), \
65 #if @GNULIB_MATHL@ || !@HAVE_DECL_ASINL@
66 extern long double asinl (long double x);
68 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
71 (GL_LINK_WARNING ("asinl is unportable - " \
72 "use gnulib module mathl for portability"), \
76 #if @GNULIB_MATHL@ || !@HAVE_DECL_ATANL@
77 extern long double atanl (long double x);
79 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
82 (GL_LINK_WARNING ("atanl is unportable - " \
83 "use gnulib module mathl for portability"), \
87 #if @GNULIB_MATHL@ || !@HAVE_DECL_CEILL@
88 extern long double ceill (long double x);
90 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
93 (GL_LINK_WARNING ("ceill is unportable - " \
94 "use gnulib module mathl for portability"), \
98 #if @GNULIB_MATHL@ || !@HAVE_DECL_COSL@
99 extern long double cosl (long double x);
101 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
104 (GL_LINK_WARNING ("cosl is unportable - " \
105 "use gnulib module mathl for portability"), \
109 #if @GNULIB_MATHL@ || !@HAVE_DECL_EXPL@
110 extern long double expl (long double x);
112 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
115 (GL_LINK_WARNING ("expl is unportable - " \
116 "use gnulib module mathl for portability"), \
120 #if @GNULIB_MATHL@ || !@HAVE_DECL_FLOORL@
121 extern long double floorl (long double x);
123 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
126 (GL_LINK_WARNING ("floorl is unportable - " \
127 "use gnulib module mathl for portability"), \
134 If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
135 If x is zero: mantissa = x, exp = 0.
136 If x is infinite or NaN: mantissa = x, exp unspecified.
137 Store exp and return mantissa. */
138 #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
139 # define frexpl rpl_frexpl
141 #if (@GNULIB_FREXPL@ && @REPLACE_FREXPL@) || !@HAVE_DECL_FREXPL@
142 extern long double frexpl (long double x, int *exp);
144 #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
146 # define frexpl(x,e) \
147 (GL_LINK_WARNING ("frexpl is unportable - " \
148 "use gnulib module frexpl for portability"), \
152 #if @GNULIB_MATHL@ || !@HAVE_DECL_LDEXPL@
153 extern long double ldexpl (long double x, int exp);
155 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
157 # define ldexpl(x,e) \
158 (GL_LINK_WARNING ("ldexpl is unportable - " \
159 "use gnulib module mathl for portability"), \
163 #if @GNULIB_MATHL@ || !@HAVE_DECL_LOGL@
164 extern long double logl (long double x);
166 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
169 (GL_LINK_WARNING ("logl is unportable - " \
170 "use gnulib module mathl for portability"), \
174 #if @GNULIB_MATHL@ || !@HAVE_DECL_SINL@
175 extern long double sinl (long double x);
177 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
180 (GL_LINK_WARNING ("sinl is unportable - " \
181 "use gnulib module mathl for portability"), \
185 #if @GNULIB_MATHL@ || !@HAVE_DECL_SQRTL@
186 extern long double sqrtl (long double x);
188 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
191 (GL_LINK_WARNING ("sqrtl is unportable - " \
192 "use gnulib module mathl for portability"), \
196 #if @GNULIB_MATHL@ || !@HAVE_DECL_TANL@
197 extern long double tanl (long double x);
199 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
202 (GL_LINK_WARNING ("tanl is unportable - " \
203 "use gnulib module mathl for portability"), \