]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/gcc.dg/builtins-33.c
optabs.h (enum optab_index): Add new OTI_log1p.
[gcc.git] / gcc / testsuite / gcc.dg / builtins-33.c
CommitLineData
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
11extern double log10(double);
12extern double log2(double);
c2fcfa4f 13extern double log1p(double);
3b8e0c91
UB
14extern float log10f(float);
15extern float log2f(float);
c2fcfa4f 16extern float log1pf(float);
3b8e0c91
UB
17extern long double log10l(long double);
18extern long double log2l(long double);
c2fcfa4f 19extern long double log1pl(long double);
3b8e0c91
UB
20
21
22double test1(double x)
23{
24 return log10(x);
25}
26
27double test2(double x)
28{
29 return log2(x);
30}
31
c2fcfa4f
UB
32double test3(double x)
33{
34 return log1p(x);
35}
36
3b8e0c91
UB
37float test1f(float x)
38{
39 return log10f(x);
40}
41
42float test2f(float x)
43{
44 return log2f(x);
45}
46
c2fcfa4f
UB
47float test3f(float x)
48{
49 return log1pf(x);
50}
51
3b8e0c91
UB
52long double test1l(long double x)
53{
54 return log10l(x);
55}
56
57long double test2l(long double x)
58{
59 return log2l(x);
60}
61
c2fcfa4f
UB
62long double test3l(long double x)
63{
64 return log1pl(x);
65}
This page took 0.15709 seconds and 5 git commands to generate.