gcc/
[official-gcc.git] / gcc / testsuite / gcc.dg / builtins-33.c
blob11393e30089ba95619502f8b7681fb0c45f8e99b
1 /* Copyright (C) 2004 Free Software Foundation.
3 Check that log10, log10f, log10l, log2, log2f and log2l
4 built-in functions compile.
6 Written by Uros Bizjak, 11th February 2004. */
8 /* { dg-do compile } */
9 /* { dg-options "-O2 -ffast-math" } */
11 extern double log10(double);
12 extern double log2(double);
13 extern double log1p(double);
14 extern float log10f(float);
15 extern float log2f(float);
16 extern float log1pf(float);
17 extern long double log10l(long double);
18 extern long double log2l(long double);
19 extern long double log1pl(long double);
22 double test1(double x)
24 return log10(x);
27 double test2(double x)
29 return log2(x);
32 double test3(double x)
34 return log1p(x);
37 float test1f(float x)
39 return log10f(x);
42 float test2f(float x)
44 return log2f(x);
47 float test3f(float x)
49 return log1pf(x);
52 long double test1l(long double x)
54 return log10l(x);
57 long double test2l(long double x)
59 return log2l(x);
62 long double test3l(long double x)
64 return log1pl(x);