std.complex MAY I REMIND YOU?
Don Clugston
dac at nospam.com.au
Sun Feb 24 11:54:13 PST 2008
Bill Baxter wrote:
> S wrote:
>> http://www.digitalmars.com/d/2.0/cppcomplex.html
>>
>> Why are we removing it from the language when it was just FINALLY
>> added to C?!?!?!
>
> I'm not sure if it was conclusively decided to remove it or not. But
> anyway, the code in std.complex is capable of representing complex
> numbers in polar format which is a trick that the built-in complex
> numbers can't do. So that somewhat justifies its existence regardless
> of whether the built-in types are removed.
>
> --bb
Agreed, although I wonder if supporting polar format is going to create
headaches later.
The set of numbers representable in x+iy format with IEEE numbers is not exactly
the same as for polar format. Algorithms for precise computations in polar
format are quite hard to find (although in a great many cases they are simpler).
So I have a vague fear that this might create a lot of work in the future - I
hope I'm wrong. We might just need to dampen expectations about which operations
will be supported.
More information about the Digitalmars-d
mailing list