[ENH] Complex

Marcus Denker denker at iam.unibe.ch
Wed Jul 21 09:30:56 UTC 2004


Am 20.07.2004 um 22:56 schrieb Boris Gaertner:

>
> The result should be  1.0 + 0.0 i
> but we get an arithmetic overflow.
>
> There are algorithms that can avoid arithmetic overflow.
> These algorithms use scaling of operands.
>
> Attached you find a change set with two such algorithms
> :
> * an added method  #divideSecureBy: (required six divisions)
> * an added method #divideFastAndSecureBy: (requires only three 
> divisions)
> * three additional tests for complex division.
>
>

I guess we should keep devision as is and provide the two others as 
alternatives.
I'l change the failing division test to run green (as we expect this to 
fail due to the
nature of floating point).

Or would it make sense to replace the implementation of #/ by  
#divideSecureBy: ?

    Marcus




More information about the Squeak-dev mailing list