[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-12-85-g23

From: Michael Gran
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-12-85-g23295dc
Date: Sat, 25 Sep 2010 16:09:59 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

The branch, master has been updated
       via  23295dc35c76e0855e4ec188c0fe2ca579a0be20 (commit)
      from  038cb3428f4c3686841e5a597164db28c2200dc7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 23295dc35c76e0855e4ec188c0fe2ca579a0be20
Author: Michael Gran <address@hidden>
Date:   Sat Sep 25 09:07:21 2010 -0700

    Incorrect parsing of NaN complex numbers
    * libguile/numbers.c (mem2complex): modified
    * test-suite/tests/reader.test: new complex NaN reader test


Summary of changes:
 libguile/numbers.c           |    2 +-
 test-suite/tests/reader.test |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/libguile/numbers.c b/libguile/numbers.c
index 840b100..45b0433 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -2991,7 +2991,7 @@ mem2complex (SCM mem, unsigned int idx,
              if (scm_is_false (imag))
                imag = SCM_I_MAKINUM (sign);
-             else if (sign == -1 && scm_is_false (scm_nan_p (ureal)))
+             else if (sign == -1 && scm_is_false (scm_nan_p (imag)))
                imag = scm_difference (imag, SCM_UNDEFINED);
              if (idx == len)
diff --git a/test-suite/tests/reader.test b/test-suite/tests/reader.test
index 362c9e2..6fe7a23 100644
--- a/test-suite/tests/reader.test
+++ b/test-suite/tests/reader.test
@@ -65,6 +65,9 @@
     (equal? (read-string "1+i+i") '1+i+i))
   (pass-if "1+e10000i"
     (equal? (read-string "1+e10000i") '1+e10000i))
+  (pass-if "-nan.0-1i"
+    (not (equal? (imag-part (read-string "-nan.0-1i"))
+                 (imag-part (read-string "-nan.0+1i")))))
   ;; At one time the arg list for "Unknown # object: ~S" didn't make it out
   ;; of read.c.  Check that `format' can be applied to this error.

GNU Guile

reply via email to

[Prev in Thread] Current Thread [Next in Thread]