Re: std.complex will replace the built-in types

2012-08-19 Thread Jonathan M Davis
On Sunday, August 19, 2012 20:28:35 teo wrote: > I read at http://dlang.org/phobos/std_complex.html that "Complex will > eventually replace the built-in types cfloat, cdouble, creal, ifloat, > idouble, and ireal". > > Can someone elaborate why? What is wrong with the above types? I think that it

Re: std.complex

2010-05-11 Thread eles
== Quote from Lars T. Kyllingstad (pub...@kyllingen.nospamnet)'s article > On Tue, 11 May 2010 15:08:07 +, eles wrote: > > Maybe I am wrong, but my feeling is that if the complex numbers were a > > native type (like creal&co. are now), then it would have been possible > > to have a dedicated fo

Re: std.complex

2010-05-11 Thread Lars T. Kyllingstad
On Tue, 11 May 2010 15:08:07 +, eles wrote: > Maybe I am wrong, but my feeling is that if the complex numbers were a > native type (like creal&co. are now), then it would have been possible > to have a dedicated formatting (just like %f, %d and %s are) for > writefln. > > Putting the type int

Re: std.complex

2010-05-11 Thread eles
Maybe I am wrong, but my feeling is that if the complex numbers were a native type (like creal&co. are now), then it would have been possible to have a dedicated formatting (just like %f, %d and %s are) for writefln. Putting the type into the library seems to forbid some very nice things: - init

Re: std.complex

2010-05-11 Thread Lars T. Kyllingstad
On Tue, 11 May 2010 11:51:34 +, eles wrote: > the following test case also works: > > Compiling > > import std.stdio; > import std.complex; > > Complex!(double) x,y; > > int main(){ > writefln("salut!\n"); > x.re=1; > x.im=1; > y=x.conj(); > writefln("x=%f+%f*

Re: std.complex

2010-05-11 Thread eles
the following test case also works: Compiling import std.stdio; import std.complex; Complex!(double) x,y; int main(){ writefln("salut!\n"); x.re=1; x.im=1; y=x.conj(); writefln("x=%f+%f*i\n",x.re,x.im); writefln("y=%f+%f*i\n",y.re,y.im); r

Re: std.complex

2010-05-11 Thread eles
Confirmation: in the new beta, the test case for the std.complex compiles on windows xp with dmd 2.046beta. I cannot post on the D.phobos newsgroup, but I post the confirmation here. I did not test it further. Compiling import std.complex; int main(){ return 0; } results in: C:\dmd2>

Re: std.complex

2010-05-09 Thread eles
Thank you, Don. I saw your post on the http://news.gmane.org/ gmane.comp.lang.d.dmd.beta group. I'll wait for the next release. Does anybody knows about when the http://d.puremagic.com/issues/ show_bug.cgi?id=2460 (DMD bug 2460) will be addressed?

Re: std.complex

2010-05-09 Thread Don
eles wrote: Hello, I just installed dmd 2.045 (unarchived in c:\dmd2) and put c: \dmd2\windows2\bin on path. Compiling the following: import std.complex; int main(){ return 0; } fails with: C:\dmd2>dmd test.d OPTLINK (R) for Win32 Release 8.00.2 Copyright (C) Digital Mars 1989-20

Re: std.complex

2010-05-09 Thread Lars T. Kyllingstad
On Sun, 09 May 2010 18:57:08 +, eles wrote: > actually, i think 2.045 was the second (after 2.044) release to include > std.complex. You are right, what's in Phobos now is the new std.complex. > as i understand, std.complex should replace the native types cfloat, > creal, ifloat, ireal etc.

Re: std.complex

2010-05-09 Thread eles
actually, i think 2.045 was the second (after 2.044) release to include std.complex. as i understand, std.complex should replace the native types cfloat, creal, ifloat, ireal etc. i was eager to test the new std.complex. it seems that some work is still needed. maybe someone could submit a bug re

Re: std.complex

2010-05-09 Thread Robert Clipsham
On 09/05/10 14:41, div0 wrote: Though I think there's been discussion about the whole complex number support. Not sure what's going off but I think it's going to overhauled or replaced, so you'd be better off not using std.complex std.complex has just undergone its major rewrite, I'm not sure i

Re: std.complex

2010-05-09 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 eles wrote: > Thanks for your answer. Me too, I prefer working on linux but for > some reasons I remain on windows until dmd goes 64-bit. > > For the record, std.stdio works fine: > > Compiling > > import std.stdio; > > int main(){ > writefln("hell

Re: std.complex

2010-05-09 Thread eles
Thanks for your answer. Me too, I prefer working on linux but for some reasons I remain on windows until dmd goes 64-bit. For the record, std.stdio works fine: Compiling import std.stdio; int main(){ writefln("hello!\n"); return 0; } results in: C:\dmd2>dmd test.d C:\dmd2>test hello!

Re: std.complex

2010-05-08 Thread Robert Clipsham
On 09/05/10 02:27, eles wrote: Hello, I just installed dmd 2.045 (unarchived in c:\dmd2) and put c: \dmd2\windows2\bin on path. Compiling the following: import std.complex; int main(){ return 0; } fails with: C:\dmd2>dmd test.d OPTLINK (R) for Win32 Release 8.00.2 Copyright (C)