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"), \
131 #if @GNULIB_MATHL@ || !@HAVE_DECL_FREXPL@
132 extern long double frexpl (long double x, int *exp);
134 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
136 # define frexpl(x,e) \
137 (GL_LINK_WARNING ("frexpl is unportable - " \
138 "use gnulib module mathl for portability"), \
142 #if @GNULIB_MATHL@ || !@HAVE_DECL_LDEXPL@
143 extern long double ldexpl (long double x, int exp);
145 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
147 # define ldexpl(x,e) \
148 (GL_LINK_WARNING ("ldexpl is unportable - " \
149 "use gnulib module mathl for portability"), \
153 #if @GNULIB_MATHL@ || !@HAVE_DECL_LOGL@
154 extern long double logl (long double x);
156 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
159 (GL_LINK_WARNING ("logl is unportable - " \
160 "use gnulib module mathl for portability"), \
164 #if @GNULIB_MATHL@ || !@HAVE_DECL_SINL@
165 extern long double sinl (long double x);
167 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
170 (GL_LINK_WARNING ("sinl is unportable - " \
171 "use gnulib module mathl for portability"), \
175 #if @GNULIB_MATHL@ || !@HAVE_DECL_SQRTL@
176 extern long double sqrtl (long double x);
178 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
181 (GL_LINK_WARNING ("sqrtl is unportable - " \
182 "use gnulib module mathl for portability"), \
186 #if @GNULIB_MATHL@ || !@HAVE_DECL_TANL@
187 extern long double tanl (long double x);
189 #if !@GNULIB_MATHL@ && defined GNULIB_POSIXCHECK
192 (GL_LINK_WARNING ("tanl is unportable - " \
193 "use gnulib module mathl for portability"), \