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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [ultrasp7.c] - Blame information for rev 816

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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