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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [981007-1.c] - Blame information for rev 859

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
extern double fabs (double);
2
extern double sqrt (double);
3
 
4
typedef struct complexm {
5
  double re,im;
6
} complex;
7
 
8
static complex
9
setCom (double r, double i)
10
{
11
  complex ct;
12
  ct.re=fabs(r)<1E-300?0.0:r;
13
  ct.im=fabs(i)<1E-300?0.0:i;
14
  return ct;
15
}
16
 
17
static complex
18
csqrt_crash (double x)
19
{
20
  return (x>=0) ? setCom(sqrt(x),0) : setCom(0,sqrt(-x));
21
}

powered by: WebSVN 2.1.0

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