Welcome to mirror list, hosted at ThFree Co, Russian Federation.

roundl.c « math « mingwex « mingw « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9c5f0aca1ac21e1d949ca35726dbd603d043aad7 (plain)
1
2
3
4
5
6
7
8
#include <math.h>

long double
roundl (long double x)
{
  /* Add +/- 0.5 then then round towards zero.  */
  return truncl ( x + (x >= 0.0L ?  0.5L : -0.5L));
}