[r6rs-discuss] Complex <?
Ken Dickey
Ken.Dickey at whidbey.com
Fri Oct 24 14:24:56 EDT 2008
Does anyone else find it odd that
(< 1/3 +inf.0) => #t
but
(< 1/3 +2i) ==> error "not a real number" +2i
When
(define (<? n1 n2)
(unless (and (number? n1) (number? n2))
(error '<? "arguments must be numbers" n1 n2))
(or (< (magnitude n1) (magnitude n2))
(< (angle n1) (angle n2))))
??
The naive reading (for a non-English speaker) would be that +2i is somehow
less real than +inf.0 . 8^)
Cheers,
-KenD
More information about the r6rs-discuss
mailing list