2004-03-29 16:22:20 +08:00
|
|
|
#include <math.h>
|
2002-06-13 18:20:48 +08:00
|
|
|
|
|
|
|
long double
|
2004-03-29 16:22:20 +08:00
|
|
|
roundl (long double x)
|
|
|
|
{
|
|
|
|
/* Add +/- 0.5 then then round towards zero. */
|
|
|
|
return truncl ( x + (x >= 0.0L ? 0.5L : -0.5L));
|
2002-06-13 18:20:48 +08:00
|
|
|
}
|