OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [builtins-33.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* 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);
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);
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
 
32
double test3(double x)
33
{
34
  return log1p(x);
35
}
36
 
37
float test1f(float x)
38
{
39
  return log10f(x);
40
}
41
 
42
float test2f(float x)
43
{
44
  return log2f(x);
45
}
46
 
47
float test3f(float x)
48
{
49
  return log1pf(x);
50
}
51
 
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
 
62
long double test3l(long double x)
63
{
64
  return log1pl(x);
65
}

powered by: WebSVN 2.1.0

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