Complex numbers (was Re: Roadmap proposal for 3.10/4.0)

Bill Schwab BSchwab at anest.ufl.edu
Tue Oct 17 18:57:05 UTC 2006


Bert,

===================================
Well, in best Smalltalk tradition I would vote for the alternate
code. It's similar to fractional arithmetic ( 3 / 4 ). Yes, fractions
bite some newbies, but they learn to use #// or #asFloat fast enough.
Same here - if you need an error when taking a negative's square
root, send #asFloat.

It's also a bit similar to Smalltalk being one of the few systems
with correct integers, where a bug like this is not possible:

http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-
it-nearly.html

I'd like to have no arbitrary limits, like forbidding to take the
logarithm of negative numbers.
===================================

Your point about fractions is well taken.  In fact, I guess I must still
be a newbie, at least at times =:0   Just as fractions are quite useful,
complex numbers would be too.  However, I submit that it is critical to
resist silently taking the real part or modulus when an error would be
appropriate.

Bill




Wilhelm K. Schwab, Ph.D.
University of Florida
Department of Anesthesiology
PO Box 100254
Gainesville, FL 32610-0254

Email: bills at anest4.anest.ufl.edu
Tel: (352) 846-1285
FAX: (352) 392-7029




More information about the Squeak-dev mailing list