From: Taylor R Campbell Date: Tue, 4 Jun 2013 17:18:36 +0000 (+0000) Subject: Make NUMBER->STRING give negative flonum zero a minus sign. X-Git-Tag: release-9.2.0~161 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=ef9ccf4b9a1689e7c6b1d465b6b6cf6964fe1d41;p=mit-scheme.git Make NUMBER->STRING give negative flonum zero a minus sign. --- 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]"))))))