infinity comparison
David T. Lewis
lewis at mail.msen.com
Sun Sep 19 20:08:55 UTC 2004
On Sun, Sep 19, 2004 at 07:27:03PM -0400, Lex Spoon wrote:
>
> It does appear that we have to favor one semantics or the other. [-1.0
> sqrt] has to evaluate either to [Complex i] or to [NaN], which in turn
> have to be different values. Keystroke for keystroke, I'd guess that
> for Smalltalk, sloppy intuitive arithmetic, where you'd prefer [Complex
> i], is much more common than carefully tuned Floating point arithmetic,
> so I'd guess we want to make [-1.0 sqrt] be [Complex i].
How about:
-1.0 sqrt ==> Complex i
Complex i asFloat ==> NaN
Thus:
-1.0 sqrt asFloat ==> NaN
Dave
More information about the Squeak-dev
mailing list
|