I would very much like to see a good complex number package.  One thing I do 
not want to see is

  -1 sqrt

return a complex - it should signal an error.

  -1 asComplex sqrt

will return a complex representing i.  In short, we should not coerce integers 
or floats to complex numbers; one can explicitly do the conversion, which then 
requests the use of arithmetic and elementary functions for complex numbers.   




________________________________________
From: [email protected] 
[[email protected]] On Behalf Of Stéphane Ducasse 
[[email protected]]
Sent: Monday, October 10, 2011 2:52 PM
To: [email protected]
Cc: The general-purpose Squeak developers list
Subject: Re: [Pharo-project] Migrating Complex in a separate package

Hi nicolas

I would like to have a nice complex package.
Do you remember the lengthly discussion that we got in pharo two years ago 
because the old
implementation was not good. I still have the code somewhere.
Now if you take the lead on that issue we will follow you.

Stef



> Hi,
>
> Facts:
> - Complex is present in Squeak trunk image but not used in Kernel
> - Complex is absent from Pharo image.
> This breaks portability of some packages.
>
> I suggest putting Complex in its own package in squeaksource. This can
> work for Pharo alone.
> I also suggest to optionally remove Squeak.Complex from trunk.
>
> There are then other choices:
> - the name of the package : can be Complex or Math-Complex (I already
> put a few Math-* in squeak source...)
> - the name of the class can be Complex or ComplexNumber
> Specifically I don't like isComplex, many objects could respond true
> because complicated;
> isComplexNumber is much more explicit.
> We could also think of having complex expressions in a symbolic
> algebra, and isComplexNumber would be true only for a literal value..
>
> What I could eventually do is publish an old Complex in package
> Complex for backard compatibility and an updated ComplexNumber in a
> Math-Complex package...
>
> How many of you use Complex ?
> What do you think of these proposals ?
>
> Nicolas
>



Reply via email to