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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [sparc/] [ultrasp7.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 326 jeremybenn
/* PR c/8281 */
2
/* Originator: TANIGUCHI Yasuaki <yasuaki@k8.dion.ne.jp> */
3
 
4
/* { dg-do compile } */
5
/* { dg-require-effective-target fpic } */
6
/* { dg-options "-O2 -mcpu=ultrasparc -fPIC" } */
7
 
8
static const double bp = 1.0, dp_l[] = { 0.0 };
9
 
10
double __ieee754_pow(double x, double y)
11
{
12
  union {
13
    int lo;
14
    double d;
15
  }uz;
16
 
17
  double y1,t1,p_h,t,z;
18
  double z_h,z_l,p_l;
19
  double t2,r,s,u,v,w;
20
  int i = 0;
21
 
22
  double s_h,t_h;
23
  double s2,s_l,t_l;
24
 
25
 
26
  v = 1.0/(v+bp);
27
  uz.d = s_h = s = u*v;
28
  uz.lo = 0;
29
  s_h = uz.d;
30
  uz.d = t_h;
31
  uz.lo = 3;
32
  t_h = uz.d;
33
  s_l = v*((u-s_h*t_h)-s_h*t_l);
34
  s2 = s*s;
35
  r = s2* s2* (1.1+s2*(1.2+s2*(1.3+s2*(1.4+s2*(1.5+s2*1.6)))));
36
  s2 = s_h*s_h;
37
  uz.lo = 0;
38
  t_h = uz.d;
39
  t_l = r-((t_h-3.0)-s2);
40
  v = s_l*t_h+t_l*s;
41
  p_l = v-(p_h-u);
42
  z_h = bp *p_h;
43
  z_l = bp*p_h+p_l*1.0+dp_l[i];
44
  t = (double)i;
45
  t1 = (((bp+z_l)+bp)+t);
46
  t2 = z_l-(((t1-t)-bp)-z_h);
47
  p_l = (y-y1)*t1+y*t2;
48
  z = p_l+p_h;
49
 
50
  return s*z;
51
}

powered by: WebSVN 2.1.0

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