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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [float-floor.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
 
2
#if(__SIZEOF_DOUBLE__==8)
3
double d = 1024.0 - 1.0 / 32768.0;
4
#else
5
double d = 1024.0 - 1.0 / 16384.0;
6
#endif
7
 
8
extern double floor(double);
9
extern float floorf(float);
10
extern void abort();
11
 
12
int main() {
13
 
14
    double df = floor(d);
15
    float f1 = (float)floor(d);
16
 
17
    if ((int)df != 1023 || (int)f1 != 1023)
18
      abort ();
19
 
20
    return 0;
21
}

powered by: WebSVN 2.1.0

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