1 /* Declarations of various C99 functions
2 Copyright (C) 2004 Free Software Foundation, Inc.
4 This file is part of the GNU Fortran 95 runtime library (libgfortran).
6 Libgfortran is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 Libgfortran is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with libgfortran; see the file COPYING.LIB. If not,
18 write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
21 /* As a special exception, if you link this library with other files,
22 some of which are compiled with GCC, to produce an executable,
23 this library does not by itself cause the resulting executable
24 to be covered by the GNU General Public License.
25 This exception does not however invalidate any other reasons why
26 the executable file might be covered by the GNU General Public License. */
30 #define C99_PROTOS_H 1
32 /* float variants of libm functions */
35 extern float acosf(float);
40 extern float acoshf(float);
45 extern float asinf(float);
50 extern float asinhf(float);
55 extern float atan2f(float, float);
60 extern float atanf(float);
65 extern float atanhf(float);
70 extern float ceilf(float);
73 #ifndef HAVE_COPYSIGNF
74 #define HAVE_COPYSIGNF 1
75 extern float copysignf(float, float);
80 extern float cosf(float);
85 extern float coshf(float);
90 extern float expf(float);
95 extern float fabsf(float);
100 extern float floorf(float);
104 #define HAVE_FREXPF 1
105 extern float frexpf(float, int *);
109 #define HAVE_HYPOTF 1
110 extern float hypotf(float, float);
115 extern float logf(float);
119 #define HAVE_LOG10F 1
120 extern float log10f(float);
124 #define HAVE_SCALBN 1
125 extern double scalbn(double, int);
129 #define HAVE_SCALBNF 1
130 extern float scalbnf(float, int);
135 extern float sinf(float);
140 extern float sinhf(float);
145 extern float sqrtf(float);
150 extern float tanf(float);
155 extern float tanhf(float);
160 extern double trunc(double);
164 #define HAVE_TRUNCF 1
165 extern float truncf(float);
168 #ifndef HAVE_NEXTAFTERF
169 #define HAVE_NEXTAFTERF 1
170 extern float nextafterf(float, float);
175 extern float powf(float, float);
180 extern double round(double);
184 #define HAVE_ROUNDF 1
185 extern float roundf(float);
189 /* log10l is needed on all platforms for decimal I/O */
191 #define HAVE_LOG10L 1
192 extern long double log10l(long double);
196 /* complex math functions */
198 #if !defined(HAVE_CABSF)
200 extern float cabsf (float complex);
203 #if !defined(HAVE_CABS)
205 extern double cabs (double complex);
208 #if !defined(HAVE_CABSL) && defined(HAVE_HYPOTL)
210 extern long double cabsl (long double complex);
214 #if !defined(HAVE_CARGF)
216 extern float cargf (float complex);
219 #if !defined(HAVE_CARG)
221 extern double carg (double complex);
224 #if !defined(HAVE_CARGL) && defined(HAVE_ATAN2L)
226 extern long double cargl (long double complex);
230 #if !defined(HAVE_CEXPF)
232 extern float complex cexpf (float complex);
235 #if !defined(HAVE_CEXP)
237 extern double complex cexp (double complex);
240 #if !defined(HAVE_CEXPL) && defined(HAVE_COSL) && defined(HAVE_SINL) && defined(EXPL)
242 extern long double complex cexpl (long double complex);
246 #if !defined(HAVE_CLOGF)
248 extern float complex clogf (float complex);
251 #if !defined(HAVE_CLOG)
253 extern double complex clog (double complex);
256 #if !defined(HAVE_CLOGL) && defined(HAVE_LOGL) && defined(HAVE_CABSL) && defined(HAVE_CARGL)
258 extern long double complex clogl (long double complex);
262 #if !defined(HAVE_CLOG10F)
263 #define HAVE_CLOG10F 1
264 extern float complex clog10f (float complex);
267 #if !defined(HAVE_CLOG10)
268 #define HAVE_CLOG10 1
269 extern double complex clog10 (double complex);
272 #if !defined(HAVE_CLOG10L) && defined(HAVE_LOG10L) && defined(HAVE_CABSL) && defined(HAVE_CARGL)
273 #define HAVE_CLOG10L 1
274 extern long double complex clog10l (long double complex);
278 #if !defined(HAVE_CPOWF)
280 extern float complex cpowf (float complex, float complex);
283 #if !defined(HAVE_CPOW)
285 extern double complex cpow (double complex, double complex);
288 #if !defined(HAVE_CPOWL) && defined(HAVE_CEXPL) && defined(HAVE_CLOGL)
290 extern long double complex cpowl (long double complex, long double complex);
294 #if !defined(HAVE_CSQRTF)
295 #define HAVE_CSQRTF 1
296 extern float complex csqrtf (float complex);
299 #if !defined(HAVE_CSQRT)
301 extern double complex csqrt (double complex);
304 #if !defined(HAVE_CSQRTL) && defined(HAVE_COPYSIGNL) && defined(HAVE_SQRTL) && defined(HAVE_FABSL) && defined(HAVE_HYPOTL)
305 #define HAVE_CSQRTL 1
306 extern long double complex csqrtl (long double complex);
310 #if !defined(HAVE_CSINHF)
311 #define HAVE_CSINHF 1
312 extern float complex csinhf (float complex);
315 #if !defined(HAVE_CSINH)
317 extern double complex csinh (double complex);
320 #if !defined(HAVE_CSINHL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
321 #define HAVE_CSINHL 1
322 extern long double complex csinhl (long double complex);
326 #if !defined(HAVE_CCOSHF)
327 #define HAVE_CCOSHF 1
328 extern float complex ccoshf (float complex);
331 #if !defined(HAVE_CCOSH)
333 extern double complex ccosh (double complex);
336 #if !defined(HAVE_CCOSHL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
337 #define HAVE_CCOSHL 1
338 extern long double complex ccoshl (long double complex);
342 #if !defined(HAVE_CTANHF)
343 #define HAVE_CTANHF 1
344 extern float complex ctanhf (float complex);
347 #if !defined(HAVE_CTANH)
349 extern double complex ctanh (double complex);
352 #if !defined(HAVE_CTANHL) && defined(HAVE_TANL) && defined(HAVE_TANHL)
353 #define HAVE_CTANHL 1
354 extern long double complex ctanhl (long double complex);
358 #if !defined(HAVE_CSINF)
360 extern float complex csinf (float complex);
363 #if !defined(HAVE_CSIN)
365 extern double complex csin (double complex);
368 #if !defined(HAVE_CSINL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
370 extern long double complex csinl (long double complex);
374 #if !defined(HAVE_CCOSF)
376 extern float complex ccosf (float complex);
379 #if !defined(HAVE_CCOS)
381 extern double complex ccos (double complex);
384 #if !defined(HAVE_CCOSL) && defined(HAVE_COSL) && defined(HAVE_COSHL) && defined(HAVE_SINL) && defined(HAVE_SINHL)
386 extern long double complex ccosl (long double complex);
390 #if !defined(HAVE_CTANF)
392 extern float complex ctanf (float complex);
395 #if !defined(HAVE_CTAN)
397 extern double complex ctan (double complex);
400 #if !defined(HAVE_CTANL) && defined(HAVE_TANL) && defined(HAVE_TANHL)
402 extern long double complex ctanl (long double complex);
406 #endif /* C99_PROTOS_H */