OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [ieee/] [20030331-1.c] - Blame information for rev 378

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

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

powered by: WebSVN 2.1.0

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