Em 30/08/2009 18:37, Schwab,Wilhelm K < [email protected] escreveu: > > > ==================== Let me see if I understand your point then: it > is OK in your view that we can do: > 1i squared. retuning "-1 + 0i" so a Complex, but > (1i squared) sqrt. raises an error? ==================== > You apparently do NOT understand. 1i squared would answer a > Complex, so it would respond favorably to #sqrt.
Bill on the *present* state of affairs, Ken's description of the problem stands as *I* wrote, not as your analysis. Please observe carefully that once 1i is squared it "becomes back" a non complex number '-1'. THIS is the asymmetry I'm writing about. > > ================== Or should we follow your logic and even when the > imaginary part of a Complex is zero it should not be automatically > converted in a real number? ================== > Yes. It's not "even when" - just don't do conversions when (you > think) floating points numbers match. OK, then we agree that any operation on a Complex should not coalesce it to non complex anymore. > > ============ 1i whatever he already made her/his choice to use > Complex numbers, right? ============ > Right. So don't try to turn it back into a Float and all will be > well. > Yes. I see consistency with, although I still think the other way is better :-) _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
