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.c-torture/] [compile/] [981007-1.c] - Rev 297

Compare with Previous | Blame | View Log

extern double fabs (double);
extern double sqrt (double);
 
typedef struct complexm {
  double re,im;
} complex;
 
static complex
setCom (double r, double i)
{
  complex ct;
  ct.re=fabs(r)<1E-300?0.0:r;
  ct.im=fabs(i)<1E-300?0.0:i;
  return ct;
}
 
static complex
csqrt_crash (double x)
{
  return (x>=0) ? setCom(sqrt(x),0) : setCom(0,sqrt(-x));
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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