]>
Commit | Line | Data |
---|---|---|
3b8e0c91 UB |
1 | /* Copyright (C) 2004 Free Software Foundation. |
2 | ||
3 | Check that log10, log10f, log10l, log2, log2f and log2l | |
4 | built-in functions compile. | |
5 | ||
6 | Written by Uros Bizjak, 11th February 2004. */ | |
7 | ||
8 | /* { dg-do compile } */ | |
9 | /* { dg-options "-O2 -ffast-math" } */ | |
10 | ||
11 | extern double log10(double); | |
12 | extern double log2(double); | |
c2fcfa4f | 13 | extern double log1p(double); |
3b8e0c91 UB |
14 | extern float log10f(float); |
15 | extern float log2f(float); | |
c2fcfa4f | 16 | extern float log1pf(float); |
3b8e0c91 UB |
17 | extern long double log10l(long double); |
18 | extern long double log2l(long double); | |
c2fcfa4f | 19 | extern long double log1pl(long double); |
3b8e0c91 UB |
20 | |
21 | ||
22 | double test1(double x) | |
23 | { | |
24 | return log10(x); | |
25 | } | |
26 | ||
27 | double test2(double x) | |
28 | { | |
29 | return log2(x); | |
30 | } | |
31 | ||
c2fcfa4f UB |
32 | double test3(double x) |
33 | { | |
34 | return log1p(x); | |
35 | } | |
36 | ||
3b8e0c91 UB |
37 | float test1f(float x) |
38 | { | |
39 | return log10f(x); | |
40 | } | |
41 | ||
42 | float test2f(float x) | |
43 | { | |
44 | return log2f(x); | |
45 | } | |
46 | ||
c2fcfa4f UB |
47 | float test3f(float x) |
48 | { | |
49 | return log1pf(x); | |
50 | } | |
51 | ||
3b8e0c91 UB |
52 | long double test1l(long double x) |
53 | { | |
54 | return log10l(x); | |
55 | } | |
56 | ||
57 | long double test2l(long double x) | |
58 | { | |
59 | return log2l(x); | |
60 | } | |
61 | ||
c2fcfa4f UB |
62 | long double test3l(long double x) |
63 | { | |
64 | return log1pl(x); | |
65 | } |