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@ || !@HAVE_DECL_FREXPL@
139 extern long double frexpl (long double x, int *exp);
141 #if !@GNULIB_FREXPL@ || defined GNULIB_POSIXCHECK
143 # define frexpl(x,e) \
144 (GL_LINK_WARNING ("frexpl is unportable - " \
145 "use gnulib module frexpl for portability"), \
149 #if @GNULIB_MATHL@ || !@HAVE_DECL_LDEXPL@
150 extern long double ldexpl (long double x, int exp);
152 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
154 # define ldexpl(x,e) \
155 (GL_LINK_WARNING ("ldexpl is unportable - " \
156 "use gnulib module mathl for portability"), \
160 #if @GNULIB_MATHL@ || !@HAVE_DECL_LOGL@
161 extern long double logl (long double x);
163 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
166 (GL_LINK_WARNING ("logl is unportable - " \
167 "use gnulib module mathl for portability"), \
171 #if @GNULIB_MATHL@ || !@HAVE_DECL_SINL@
172 extern long double sinl (long double x);
174 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
177 (GL_LINK_WARNING ("sinl is unportable - " \
178 "use gnulib module mathl for portability"), \
182 #if @GNULIB_MATHL@ || !@HAVE_DECL_SQRTL@
183 extern long double sqrtl (long double x);
185 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
188 (GL_LINK_WARNING ("sqrtl is unportable - " \
189 "use gnulib module mathl for portability"), \
193 #if @GNULIB_MATHL@ || !@HAVE_DECL_TANL@
194 extern long double tanl (long double x);
196 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
199 (GL_LINK_WARNING ("tanl is unportable - " \
200 "use gnulib module mathl for portability"), \