hyln9 / ikarus

Optimizing incremental native-code compiler for R6RS scheme. This is a forked repository.
https://launchpad.net/ikarus
Other
5 stars 0 forks source link

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

Closed hyln9 closed 10 years ago

hyln9 commented 10 years ago

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

Launchpad Details: #LP831582 John David Stone - 2011-08-22 15:31:57 -0400

hyln9 commented 10 years ago

This seems a bit related:

(expt 1/2 0) => 1/1

Launchpad Details: #LPC Göran Weinholt - 2011-09-24 17:42:33 -0400

hyln9 commented 10 years ago

Fixed in commit 6c0804e49adb2cc7d3e2d09d95ae723817881908