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

Compare with Previous | Blame | View Log

#include <float.h>
 
long double dfrom = 1.1L;
long double m1;
long double m2;
unsigned long mant_long;
 
int main()
{
  /* Some targets don't support a conforming long double type.  This is
     common with very small parts which set long double == float.   Look
     to see if the type has at least 32 bits of precision.  */
  if (LDBL_EPSILON > 0x1p-31L)
    return 0;
 
  m1 = dfrom / 2.0L;
  m2 = m1 * 4294967296.0L;
  mant_long = ((unsigned long) m2) & 0xffffffff;
 
  if (mant_long == 0x8ccccccc)
    return 0;
  else
    abort();
}
 

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.