On Saturday, 19 November 2016 at 19:42:27 UTC, Marduk wrote:
On Saturday, 19 November 2016 at 16:17:08 UTC, Meta wrote:
On Saturday, 19 November 2016 at 09:38:38 UTC, Marduk wrote:
[...]

D used to support complex numbers in the language (actually it still does, they're just deprecated). This code should compile with any D compiler:

cdouble[2][2] a = [[0 + 1i, 0], [0, 0 + 1i]];

Thank you! However, I am concerned that if this is deprecated, then I should not use it (it is not future-proof). I wonder why D dropped this syntax for complex numbers. It is very handy.

You can use builtin complex numbers (cfloat/cdouble/creal). The idea of std.complex is wrong . Mir GLAS uses builtin complex numbers and I don't think they will be really deprecated. --Ilya

Reply via email to