====================
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.


==================
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.


============
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.




-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Sunday, August 30, 2009 4:27 PM
To: [email protected]
Subject: Re: [Pharo-project] Complex Solutions

Em  30/08/2009  13:36, Schwab,Wilhelm  K  < [email protected]  >
escreveu:
>
>
>     Ken,
>
>     On #cosH vs.  #cosh, etc.,I do not like what  you have done, but 
> it's hardly cause to start a  war. I would be more inclined to agree 
> with your no-typo  argument if you spelled out  hyperbolic. We write 
> cos and cosh; I see no advantage to typing cosH, which could just as 
> easily be errant as cosh.
>
>     #angle vs. #argument. The terminology of modulus and argument is 
> heavily drilled  into engineers and  physisists, so I would  go with 
> that inertia vs. anything from Scheme or Lisp.
>
>
>     =============  "If Complex  does not  interoperate, at  least to
>     some extent,  with Floats how  would it be useful  for anything?
>     Smalltalk without polymorphism ???"
>
>     That's not  it at all.  Sig and I  hav been very clear  on using
>     polymorphism to get he expected  behavior in each world, and how
>     it can extend to (for example) exponentials of matrices. I don't
>     know how to  make it more clear that we have  done. We object to
>     implicit coercion which works  against anyone interested only in
>     real results.  =============
>
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?

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?

Please not that once the programmer wrote:

1i whatever he already made her/his choice to use Complex numbers, right?

>
>     ===============
>     >Complex>>angle looks  like it will  answer zero for a  value of
>     >zero??
>     >Complex>>AFAIK,  there  should  be  no  direction  for  a  zero
>     > vector.  In  a  way,  it  is  splitting  hairs  because  exact
>     > comparisons  of floats  are  dubious, but  it probably  should
>     > raise an error for zero.
>
>     I am following ANSI X3J13 (they had a formal vote which declared
>     the  angle  of  zero to  be  zero).  Let  me  know of  a  better
>     refrerence.  [The problem with  standards is  that there  are so
>     many to chose from ;^].  ===============
>
>     ANSI is the same group that put  an end to time as we know it in
> 2037 (maybe  2038); if you thought  y2k was a mess,  just wait until 
> time_t wraps.  Zero vectors (and  complex numbers act as  vectors in 
> this  case) have  no  direction,  and ANSI's  vote  does not  change 
> that.  Many  times you  have  shown a  desire  to  make things  more 
> mathematically  correct; ANSI  is just  plain wrong  here.  The only 
> argument in  their favor is  that the distinction might  be slightly 
> vacant because computing  a truly zero result is  very unlikely in a 
> floating point world.

Oh well, interesting way of looking at things: a non sequitur comment on size 
of time_t and a dismissal of an agreed upon Standard.  You'll have a lot of 
problem using complex  numbers as you want if you don't follow IEEE  and ANSI 
stipulations on the angle of certain operations when voltage is squared to 
calculate power or the angle of it (which follows the angle of the load) as 
there is more than a single mathematical correct answer. 

Back to mathematical purity, then we have a conundrum: as Ken wrote several 
times Complex is considered a superset of Real numbers in mathematics is 
Smalltalk class hierarchy that "decided" to consider Number as a subclass of 
Magnitude that has to respond to #<, but this is not necessary in mathematics 
in general, no reference about number theory you find such necessary condition.


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to