OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [builtins-34.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Copyright (C) 2004 Free Software Foundation.
2
 
3
   Check that exp10, exp10f, exp10l, exp2, exp2f, exp2l, pow10, pow10f,
4
   pow10l, expm1, expm1f and expm1l built-in functions compile.
5
 
6
   Written by Uros Bizjak, 13th February 2004.  */
7
 
8
/* { dg-do compile } */
9
/* { dg-options "-O2 -ffast-math" } */
10
 
11
extern double exp10(double);
12
extern double exp2(double);
13
extern double pow10(double);
14
extern double expm1(double);
15
extern double ldexp(double, int);
16
extern float exp10f(float);
17
extern float exp2f(float);
18
extern float pow10f(float);
19
extern float expm1f(float);
20
extern float ldexpf(float, int);
21
extern long double exp10l(long double);
22
extern long double exp2l(long double);
23
extern long double pow10l(long double);
24
extern long double expm1l(long double);
25
extern long double ldexpl(long double, int);
26
 
27
 
28
double test1(double x)
29
{
30
  return exp10(x);
31
}
32
 
33
double test2(double x)
34
{
35
  return exp2(x);
36
}
37
 
38
double test3(double x)
39
{
40
  return pow10(x);
41
}
42
 
43
double test4(double x)
44
{
45
  return expm1(x);
46
}
47
 
48
double test5(double x, int exp)
49
{
50
  return ldexp(x, exp);
51
}
52
 
53
float test1f(float x)
54
{
55
  return exp10f(x);
56
}
57
 
58
float test2f(float x)
59
{
60
  return exp2f(x);
61
}
62
 
63
float test3f(float x)
64
{
65
  return pow10f(x);
66
}
67
 
68
float test4f(float x)
69
{
70
  return expm1f(x);
71
}
72
 
73
float test5f(float x, int exp)
74
{
75
  return ldexpf(x, exp);
76
}
77
 
78
long double test1l(long double x)
79
{
80
  return exp10l(x);
81
}
82
 
83
long double test2l(long double x)
84
{
85
  return exp2l(x);
86
}
87
 
88
long double test3l(long double x)
89
{
90
  return pow10l(x);
91
}
92
 
93
long double test4l(long double x)
94
{
95
  return expm1l(x);
96
}
97
 
98
long double test5l(long double x, int exp)
99
{
100
  return ldexpl(x, exp);
101
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.