diff options
Diffstat (limited to 'lib/msun/src/s_roundl.c')
-rw-r--r-- | lib/msun/src/s_roundl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/msun/src/s_roundl.c b/lib/msun/src/s_roundl.c index 0cb688b..a70b617 100644 --- a/lib/msun/src/s_roundl.c +++ b/lib/msun/src/s_roundl.c @@ -38,14 +38,14 @@ roundl(long double x) return (x); if (x >= 0.0) { - t = ceill(x); - if (t - x > 0.5) - t -= 1.0; + t = floorl(x); + if (t - x <= -0.5) + t += 1.0; return (t); } else { - t = ceill(-x); - if (t + x > 0.5) - t -= 1.0; + t = floorl(-x); + if (t + x <= -0.5) + t += 1.0; return (-t); } } |