[phobos] Is anyone working on std.complex?

Lars Tandle Kyllingstad lars at kyllingen.net
Fri Mar 26 01:52:25 PDT 2010


Walter Bright wrote:
> 
> 
> Andrei Alexandrescu wrote:
>> Sounds good to me.
>>
>> Walter, what steps do we need to take to extricate complex from the 
>> language and put the related code in the stdlib with Don's help?
>>
>>
> 
> It's pretty trivial. You can use the complex support code in dmd as a 
> good starting point.

http://www.dsource.org/projects/dmd/browser/trunk/src/complex_t.h
http://www.dsource.org/projects/dmd/browser/trunk/src/backend/bcomplex.c

Would these contain the code you are referring to?

Both look like standard, straightforward implementations of complex 
arithmetic operations.  Are there optimisations hidden in other parts of 
the code that I'm not seeing?

-Lars



More information about the phobos mailing list