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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [ieee/] [20010114-2.c] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
extern void exit (int);
2
extern void abort (void);
3
 
4
float
5
rintf (float x)
6
{
7
  static const float TWO23 = 8388608.0;
8
 
9
  if (__builtin_fabs (x) < TWO23)
10
    {
11
      if (x > 0.0)
12
        {
13
          x += TWO23;
14
          x -= TWO23;
15
        }
16
      else if (x < 0.0)
17
        {
18
          x = TWO23 - x;
19
          x = -(x - TWO23);
20
        }
21
    }
22
 
23
  return x;
24
}
25
 
26
int main (void)
27
{
28
  if (rintf (-1.5) != -2.0)
29
    abort ();
30
  exit (0);
31
}

powered by: WebSVN 2.1.0

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