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.2.2/] [gcc/] [testsuite/] [gcc.dg/] [builtins-46.c] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* Copyright (C) 2004 Free Software Foundation.
/* Copyright (C) 2004 Free Software Foundation.
 
 
   Check that rint, rintf, rintl, lrint, lrintf, lrintl,
   Check that rint, rintf, rintl, lrint, lrintf, lrintl,
   llrint, llrintf, llrintl, floor, floorf, floorl,
   llrint, llrintf, llrintl, floor, floorf, floorl,
   ceil, ceilf, ceill, trunc, truncf, truncl,
   ceil, ceilf, ceill, trunc, truncf, truncl,
   nearbyint, nearbyintf and nearbyintl
   nearbyint, nearbyintf and nearbyintl
   built-in functions compile.
   built-in functions compile.
 
 
   Written by Uros Bizjak, 25th Aug 2004.  */
   Written by Uros Bizjak, 25th Aug 2004.  */
 
 
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math" } */
/* { dg-options "-O2 -ffast-math" } */
 
 
extern double rint(double);
extern double rint(double);
extern long int lrint(double);
extern long int lrint(double);
extern long long int llrint(double);
extern long long int llrint(double);
extern double floor(double);
extern double floor(double);
extern double ceil(double);
extern double ceil(double);
extern double trunc(double);
extern double trunc(double);
extern double nearbyint(double);
extern double nearbyint(double);
 
 
extern float rintf(float);
extern float rintf(float);
extern long int lrintf(float);
extern long int lrintf(float);
extern long long int llrintf(float);
extern long long int llrintf(float);
extern float floorf(float);
extern float floorf(float);
extern float ceilf(float);
extern float ceilf(float);
extern float truncf(float);
extern float truncf(float);
extern float nearbyintf(float);
extern float nearbyintf(float);
 
 
extern long double rintl(long double);
extern long double rintl(long double);
extern long int lrintl(long double);
extern long int lrintl(long double);
extern long long int llrintl(long double);
extern long long int llrintl(long double);
extern long double floorl(long double);
extern long double floorl(long double);
extern long double ceill(long double);
extern long double ceill(long double);
extern long double truncl(long double);
extern long double truncl(long double);
extern long double nearbyintl(long double);
extern long double nearbyintl(long double);
 
 
 
 
double test1(double x)
double test1(double x)
{
{
  return rint(x);
  return rint(x);
}
}
 
 
long int test11(double x)
long int test11(double x)
{
{
  return lrint(x);
  return lrint(x);
}
}
 
 
long long int test12(double x)
long long int test12(double x)
{
{
  return llrint(x);
  return llrint(x);
}
}
 
 
double test2(double x)
double test2(double x)
{
{
  return floor(x);
  return floor(x);
}
}
 
 
double test3(double x)
double test3(double x)
{
{
  return ceil(x);
  return ceil(x);
}
}
 
 
double test4(double x)
double test4(double x)
{
{
  return trunc(x);
  return trunc(x);
}
}
 
 
double test5(double x)
double test5(double x)
{
{
  return nearbyint(x);
  return nearbyint(x);
}
}
 
 
float test1f(float x)
float test1f(float x)
{
{
  return rintf(x);
  return rintf(x);
}
}
 
 
long int test11f(float x)
long int test11f(float x)
{
{
  return lrintf(x);
  return lrintf(x);
}
}
 
 
long long int test12f(float x)
long long int test12f(float x)
{
{
  return llrintf(x);
  return llrintf(x);
}
}
 
 
float test2f(float x)
float test2f(float x)
{
{
  return floorf(x);
  return floorf(x);
}
}
 
 
float test3f(float x)
float test3f(float x)
{
{
  return ceilf(x);
  return ceilf(x);
}
}
 
 
float test4f(float x)
float test4f(float x)
{
{
  return truncf(x);
  return truncf(x);
}
}
 
 
float test5f(float x)
float test5f(float x)
{
{
  return nearbyintf(x);
  return nearbyintf(x);
}
}
 
 
long double test1l(long double x)
long double test1l(long double x)
{
{
  return rintl(x);
  return rintl(x);
}
}
 
 
long int test11l(long double x)
long int test11l(long double x)
{
{
  return lrintl(x);
  return lrintl(x);
}
}
 
 
long long int test12l(long double x)
long long int test12l(long double x)
{
{
  return llrintl(x);
  return llrintl(x);
}
}
 
 
long double test2l(long double x)
long double test2l(long double x)
{
{
  return floorl(x);
  return floorl(x);
}
}
 
 
long double test3l(long double x)
long double test3l(long double x)
{
{
  return ceill(x);
  return ceill(x);
}
}
 
 
long double test4l(long double x)
long double test4l(long double x)
{
{
  return truncl(x);
  return truncl(x);
}
}
 
 
long double test5l(long double x)
long double test5l(long double x)
{
{
  return nearbyintl(x);
  return nearbyintl(x);
}
}
 
 

powered by: WebSVN 2.1.0

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