2009/8/14 Ken.Dickey <Ken.Dickey@whidbey.com>:
Coming from Scheme and Lisp, where (sqrt -4) is expected to work, I was surprised to find it "broken" in Squeak when I first tried it out. Â [Some years ago now].
It works in Squeak. And result of -4 sqrt is signaling an FloatingPointException with message 'undefined if less than zero.'. I calling the code broken if its not follows the original design, contains bugs and unexpected behavior (again, unexpected to original design). But error in -4 sqrt is expected behavior. So how it can be considered broken?
I noted Smalltalk in a list of languages implementing complex numbers;
http://rosettacode.org/wiki/Complex_numbers#Smalltalk
Unfortunately, my laptop died and is now in pieces on my desk while I try and resurrect it. Â Perhaps some kind soul will look at GNU Smalltalk's library and see what they do. Â Note that GNU Smalltalk files in a 'Complex' package first.
Other Smalltalk examples?
Ken, i welcome your willing to have a Complex numbers in Squeak. I just pointing out that we should make certain decisions right - like honoring the choice of people, who don't need to use a Complex math in their work, and moreover expecting that regardless of Complex numbers support, in their image they could be certain, that default behavior of a number of math functions does not changes unexpectably after they load the Complex package.
Thanks much, -KenD
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.