From 11cdc6930d8f14557cafdd49dcd5a73865566236 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Fri, 21 Dec 2012 21:39:23 +0900 Subject: [PATCH] The imaginary part of a non-complex is exact 0. --- lib/init-7.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/init-7.scm b/lib/init-7.scm index 341a1bd1..e915b693 100644 --- a/lib/init-7.scm +++ b/lib/init-7.scm @@ -1080,7 +1080,7 @@ (cond-expand (complex (define (real-part z) (if (%complex? z) (complex-real z) z)) - (define (imag-part z) (if (%complex? z) (complex-imag z) 0.0)) + (define (imag-part z) (if (%complex? z) (complex-imag z) 0)) (define (magnitude z) (sqrt (+ (* (real-part z) (real-part z)) (* (imag-part z) (imag-part z)))))