New module 'math'. <math.h> replaces mathl.h.
[gnulib.git] / lib / math_.h
1 /* A GNU-like <math.h>.
2
3    Copyright (C) 2002-2003, 2007 Free Software Foundation, Inc.
4
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)
8    any later version.
9
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.
14
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.  */
18
19 #ifndef _GL_MATH_H
20 #define _GL_MATH_H
21
22 #include @ABSOLUTE_MATH_H@
23
24
25 /* The definition of GL_LINK_WARNING is copied here.  */
26
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32
33 #if @GNULIB_MATHL@
34 extern long double acosl (long double x);
35 #elif defined GNULIB_POSIXCHECK
36 # undef acosl
37 # define acosl(x) \
38     (GL_LINK_WARNING ("acosl is unportable - "\
39                       "use gnulib module mathl for portability"), \
40      acosl (x))
41 #endif
42
43 #if @GNULIB_MATHL@
44 extern long double asinl (long double x);
45 #elif defined GNULIB_POSIXCHECK
46 # undef asinl
47 # define asinl(x) \
48     (GL_LINK_WARNING ("asinl is unportable - "\
49                       "use gnulib module mathl for portability"), \
50      asinl (x))
51 #endif
52
53 #if @GNULIB_MATHL@
54 extern long double atanl (long double x);
55 #elif defined GNULIB_POSIXCHECK
56 # undef atanl
57 # define atanl(x) \
58     (GL_LINK_WARNING ("atanl is unportable - "\
59                       "use gnulib module mathl for portability"), \
60      atanl (x))
61 #endif
62
63 #if @GNULIB_MATHL@
64 extern long double ceill (long double x);
65 #elif defined GNULIB_POSIXCHECK
66 # undef ceill
67 # define ceill(x) \
68     (GL_LINK_WARNING ("ceill is unportable - "\
69                       "use gnulib module mathl for portability"), \
70      ceill (x))
71 #endif
72
73 #if @GNULIB_MATHL@
74 extern long double cosl (long double x);
75 #elif defined GNULIB_POSIXCHECK
76 # undef cosl
77 # define cosl(x) \
78     (GL_LINK_WARNING ("cosl is unportable - "\
79                       "use gnulib module mathl for portability"), \
80      cosl (x))
81 #endif
82
83 #if @GNULIB_MATHL@
84 extern long double expl (long double x);
85 #elif defined GNULIB_POSIXCHECK
86 # undef expl
87 # define expl(x) \
88     (GL_LINK_WARNING ("expl is unportable - "\
89                       "use gnulib module mathl for portability"), \
90      expl (x))
91 #endif
92
93 #if @GNULIB_MATHL@
94 extern long double floorl (long double x);
95 #elif defined GNULIB_POSIXCHECK
96 # undef floorl
97 # define floorl(x) \
98     (GL_LINK_WARNING ("floorl is unportable - "\
99                       "use gnulib module mathl for portability"), \
100      floorl (x))
101 #endif
102
103 #if @GNULIB_MATHL@
104 extern long double frexpl (long double x, int *exp);
105 #elif defined GNULIB_POSIXCHECK
106 # undef frexpl
107 # define frexpl(x,e) \
108     (GL_LINK_WARNING ("frexpl is unportable - "\
109                       "use gnulib module mathl for portability"), \
110      frexpl (x, e))
111 #endif
112
113 #if @GNULIB_MATHL@
114 extern long double ldexpl (long double x, int exp);
115 #elif defined GNULIB_POSIXCHECK
116 # undef ldexpl
117 # define ldexpl(x,e) \
118     (GL_LINK_WARNING ("ldexpl is unportable - "\
119                       "use gnulib module mathl for portability"), \
120      ldexpl (x, e))
121 #endif
122
123 #if @GNULIB_MATHL@
124 extern long double logl (long double x);
125 #elif defined GNULIB_POSIXCHECK
126 # undef logl
127 # define logl(x) \
128     (GL_LINK_WARNING ("logl is unportable - "\
129                       "use gnulib module mathl for portability"), \
130      logl (x))
131 #endif
132
133 #if @GNULIB_MATHL@
134 extern long double sinl (long double x);
135 #elif defined GNULIB_POSIXCHECK
136 # undef sinl
137 # define sinl(x) \
138     (GL_LINK_WARNING ("sinl is unportable - "\
139                       "use gnulib module mathl for portability"), \
140      sinl (x))
141 #endif
142
143 #if @GNULIB_MATHL@
144 extern long double sqrtl (long double x);
145 #elif defined GNULIB_POSIXCHECK
146 # undef sqrtl
147 # define sqrtl(x) \
148     (GL_LINK_WARNING ("sqrtl is unportable - "\
149                       "use gnulib module mathl for portability"), \
150      sqrtl (x))
151 #endif
152
153 #if @GNULIB_MATHL@
154 extern long double tanl (long double x);
155 #elif defined GNULIB_POSIXCHECK
156 # undef tanl
157 # define tanl(x) \
158     (GL_LINK_WARNING ("tanl is unportable - "\
159                       "use gnulib module mathl for portability"), \
160      tanl (x))
161 #endif
162
163
164 #ifdef __cplusplus
165 }
166 #endif
167
168 #endif