Subject: Re: bug#20945: One guile test failed

From: Andy Wingo <[email-masked]>
Date: Fri, 24 Jun 2016 09:16:02 +0200

Thanks for the report.

On Tue 30 Jun 2015 21:43, Christopher White <[email-masked]> writes:

> For your information, make check produced one error, on OS X Yosemite.
>
> FAIL: numbers.test: string->number: valid complex number strings

Does this still happen for you?

If so, can you paste this at a REPL or in a file and see what it prints
out?

    (for-each (lambda (triple)
                (apply
                 (lambda (str re im)
                   (let ((z (string->number str)))
                     (if (or (eq? z #f)
                             (not (and (eqv? (real-part z) re)
                                       (eqv? (imag-part z) im))))
			 (begin 
			   (pk str re im)
			   (throw 'fail)))))
                 triple))
              `(("1@0" 1 0) ("1@+0" 1 0) ("1@-0" 1 0) ("1/2@0" 1/2 0)
                ("1.0@0" 1.0 0) ("1.0@-0" 1.0 0)
                ("#e1@0" 1 0) ("#e1@+0" 1 0) ("#e1@-0" 1 0) ("[email-masked]" 1/2 0)
                ("#e1.0@0" 1 0) ("#e1.0@-0" 1 0)
                ("#i1@0" 1.0 0.0) ("#i1@+0" 1.0 0.0) ("#i1@-0" 1.0 -0.0) ("#i1/2@0" 0.5 0.0)
                ("#i1.0@0" 1.0 0.0) ("#i1.0@-0" 1.0 -0.0)
                ("1@+0.0" 1.0 0.0) ("[email-masked]" 1.0 -0.0)
                ("2+3i" 2.0 3.0) ("4-5i" 4.0 -5.0)
                ("1+i" 1.0 1.0) ("1-i" 1.0 -1.0) ("+1i" 0.0 1.0) ("-1i" 0.0 -1.0)
                ("+i" 0.0 1.0) ("-i" 0.0 -1.0)
		("1.0+.1i" 1.0 0.1) ("1.0-.1i" 1.0 -0.1)
		(".1+.0i" 0.1 0.0) ("1.+.0i" 1.0 0.0) (".1+.1i" 0.1 0.1)
		("1e1+.1i" 10.0 0.1)
                ("0@+nan.0" 0 0) ("0@+inf.0" 0 0) ("[email-masked]" 0 0)
                ("0.0@+nan.0" 0.0 0.0) ("0.0@+inf.0" 0.0 0.0) ("[email-masked]" 0.0 0.0)
                ("#i0@+nan.0" 0.0 0.0) ("#i0@+inf.0" 0.0 0.0) ("[email-masked]" 0.0 0.0)
                ("0.0@1" 0.0 0.0) ("0.0@2" -0.0 0.0) ("0.0@4" -0.0 -0.0) ("0.0@5" 0.0 -0.0)
		))

Cheers,

Andy