[r6rs-discuss] R6RS = (and friends) semantics/requirements
leppie
xacc.ide at gmail.com
Wed Feb 25 14:36:27 EST 2009
Hi
I have some confusion with =, and I don't have access to a numerical
analyst.
Some examples.
Ypsilon:
(= (inexact 245850922/78256779) (angle -1)) => #t
(= 884279719003555/281474976710656 (angle -1)) => #t
(= 245850922/78256779 (angle -1)) => #t
(= 884279719003555/281474976710656+.0i (angle -1)) => #t
Ikarus:
(= (inexact 245850922/78256779) (angle -1)) => #t
(= 884279719003555/281474976710656 (angle -1)) => #t
(= 245850922/78256779 (angle -1)) => #f
(= 884279719003555/281474976710656+.0i (angle -1)) => #f
As the R6RS does not define anything in terms of what = should do given a
mix of argument types, I think both of the interpretation of Ypsilon and
Ikarus is correct.
Here is what I understand happens in both.
Ypsilon chooses to convert all arguments to their inexact forms if one or
more inexact arguments are present. This seems to be in line with what
'normal' (read C#, perhaps Java/C++) languages do.
Ikarus chooses to convert all arguments to their exact form if one or more
exact arguments are present. I suspect the last one in Ikarus is a bug
(normal mzscheme returns #t).
Is my interpretation of the handling and report requirements correct?
Cheers
leppie
More information about the r6rs-discuss
mailing list