Complex numbers in lib?

Guillaume Piolat first.name at gmail.com
Tue Jul 28 13:02:32 UTC 2020


On Tuesday, 28 July 2020 at 01:24:16 UTC, sai wrote:
> I remember the reason D has built in complex numbers is because 
> it supposed to give correct results, as mentioned at the bottom 
> here: https://digitalmars.com/d/1.0/cppcomplex.html
>
> And the math checks out: https://run.dlang.io/is/b5eyuD
>
> So I am curious why the complex class in the library was 
> introduced and the builtin complex numbers are deprecated now?
>

I guess it's not considered a worthy use of D compiler engineers 
time.
The decision to remove them was taken long ago.
That said, we do use complex numbers and appreciate them, it 
would take work if they were to be actually removed... and that 
will probably happen.

But it's not really an efficiency or precision concern, efficient 
code using complex sometimes use split format, and this code is 
often vectorized anyway using SIMD.




More information about the Digitalmars-d mailing list