marcomaggi / vicare

A native compiler for Scheme compliant with R6RS
http://marcomaggi.github.com/vicare.html
Other
200 stars 34 forks source link

(/ -3/8) => 8/-3, (= 8/-3 (/ -3/8)) => #f #25

Closed marcomaggi closed 13 years ago

marcomaggi commented 13 years ago

Reported by John David Stone as Ikarus bug 831582:

I expected to see (/ -3/8) => -8/3, but 8/-3 is OK even though it's not a valid R6RS numeric literal. But then (= 8/-3 (/ -3/8)) should be true. Other weirdness:

(- 8/-3 (/ -3/8)) => 0
(= -8/3 (/ -3/8)) => #f
(- -8/3 (/ -3/8)) => 0
(= -8/3 (/ 1 -3/8)) => #t
(= (/ -3/8) (/ 1 -3/8)) => #f