aboutsummaryrefslogtreecommitdiffstats
path: root/src/floatfns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/floatfns.c')
-rw-r--r--src/floatfns.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/floatfns.c b/src/floatfns.c
index 4de5f480259..ac0447ce6d6 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -428,7 +428,9 @@ round2 (EMACS_INT i1, EMACS_INT i2)
428static double 428static double
429emacs_rint (double d) 429emacs_rint (double d)
430{ 430{
431 return floor (d + 0.5); 431 double d1 = d + 0.5;
432 double r = floor (d1);
433 return r - (r == d1 && fmod (r, 2) != 0);
432} 434}
433#endif 435#endif
434 436