From ef9ccf4b9a1689e7c6b1d465b6b6cf6964fe1d41 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Tue, 4 Jun 2013 17:18:36 +0000 Subject: [PATCH] Make NUMBER->STRING give negative flonum zero a minus sign. --- src/runtime/dragon4.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/dragon4.scm b/src/runtime/dragon4.scm index 313bd887c..98c04ffcd 100644 --- a/src/runtime/dragon4.scm +++ b/src/runtime/dragon4.scm @@ -79,7 +79,8 @@ not much different to numbers within a few orders of magnitude of 1. (string-copy "#[-inf]") (string-append "-" (x>0 x))))) ((flo:zero? x) - (string-copy "0.")) + ;; XXX Kludgey test for zero sign. + (string-copy (if (flo:negative? (flo:atan2 x -1.)) "-0." "0."))) (else (string-copy "#[NaN]")))))) -- 2.25.1