From: Chris Hanson Date: Sat, 17 Nov 2018 04:44:44 +0000 (-0800) Subject: Eliminate now-unnecessary string-copy calls. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~61 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=363b0b20ba2b10ceb70ac5b42269303158a5f6d9;p=mit-scheme.git Eliminate now-unnecessary string-copy calls. --- diff --git a/src/runtime/dragon4.scm b/src/runtime/dragon4.scm index 28a170cef..89c626097 100644 --- a/src/runtime/dragon4.scm +++ b/src/runtime/dragon4.scm @@ -90,27 +90,27 @@ not much different to numbers within a few orders of magnitude of 1. (or (and flonum-printer-hook (flonum-printer-hook x radix)) (cond ((flo:nan? x) - (string-copy "+nan.0")) + "+nan.0") ((flo:positive? x) (if (flo:infinite? x) - (string-copy "+inf.0") + "+inf.0" (x>0 x))) ((flo:negative? x) (let ((x (flo:negate x))) (if (flo:infinite? x) - (string-copy "-inf.0") + "-inf.0" (string-append "-" (x>0 x))))) ((flo:zero? x) - (string-copy (if (flo:safe-negative? x) "-0." "0."))) + (if (flo:safe-negative? x) "-0." "0.")) (else - (string-copy "+nan.0")))))) + "+nan.0"))))) (define (flonum-printer:normal-output digits k radix) (let ((k+1 (+ k 1))) (let ((k+1-l (- k+1 (string-length digits))) (n (flo:significand-digits radix))) (cond ((zero? (string-length digits)) - (string-copy "0.")) + "0.") ((< k+1-l (- n)) (scientific-output digits k radix 0)) ((negative? k)