[MLton] ML/Lisp/Scheme, =, eq?, eqv?, equal?

Henry Cejtin henry@sourcelight.com
Mon, 23 Feb 2004 15:41:09 -0600

The  problem  with  making  ML  reals an equality type is that floating point
equality doesn't quite work as one would  expect  of  an  equality  relation.
Note,  for  example,  that  it  is not reflexive (Nan is not `equal' to Nan).
Also a simple test for equality is almost certainly  wrong  (because  of  the
nature of floating point operations).

I  remember  Richard  Kelsey  and  I  talking  a lot about many problems with
Scheme's inexact numbers when he was editing R5RS and I was proof reading it.