infinity comparison

Richard A. O'Keefe ok at cs.otago.ac.nz
Mon Sep 27 06:08:31 UTC 2004


Concerning the idea that [-1.0 sqrt] might give you (Complex i),
that's exactly what Lisp does (and what the Scheme implementations
that have complex numbers do):

	f% larceny
	Larceny v1.0a1 (precise:SunOS5:split) (lth 21-Dec-98 16:23:57)

	> (sqrt -1.0)
	0.0+1.0i

Benefit:  this fits with a philosophy of "never give up if you can
deliver a meaningful answer", just like not letting hardware integer
overflow get in the way of delivering correct integer results.

Downside:  it would confuse people who don't know anything about
complex arithmietc.

Rebuttal:  select "Complex" and Cmd-B and the class comment should
explain what you need to know, if you didn't know about Complex before.

Summary: sounds good to me.



More information about the Squeak-dev mailing list