From 1024a67daeda4c7a1d2b25069e251d86821ea48c Mon Sep 17 00:00:00 2001 From: gerd <gerd> Date: Sat, 23 Aug 2003 10:32:20 +0000 Subject: [PATCH] * src/code/numbers.lisp (round): If remainder is zero, return the results of truncate directly. --- code/numbers.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/numbers.lisp b/code/numbers.lisp index a3c068ab1..f230f518d 100644 --- a/code/numbers.lisp +++ b/code/numbers.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/numbers.lisp,v 1.49 2003/08/22 09:20:02 gerd Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/numbers.lisp,v 1.50 2003/08/23 10:32:20 gerd Exp $") ;;; ;;; ********************************************************************** ;;; @@ -734,7 +734,7 @@ (round number) (multiple-value-bind (tru rem) (truncate number divisor) (if (zerop rem) - (values (if (minusp tru) -1 1) rem) + (values tru rem) (let ((thresh (/ (abs divisor) 2))) (cond ((or (> rem thresh) (and (= rem thresh) (oddp tru))) -- GitLab