complex number support

Iain Buclaw ibuclaw at gdcproject.org
Wed Feb 4 16:58:42 UTC 2026


On Wednesday, 4 February 2026 at 05:14:52 UTC, Walter Bright 
wrote:
> It's becoming clear that I cannot avoid supporting complex 
> numbers in the code generator for AArch64:
>
> 1. deprecating creal and use std.complex instead doesn't help 
> since we need to support old code
>
> 2. C has complex real and imaginary real types, which need to 
> be supported as well.
>
> I'm giving up and am just going to support complex types in the 
> code generator.

I've mentioned this before.  I might be open to reintroducing 
complex into the language as `__complex(float)` et al. so that it 
falls into the specialized category of types that aren't 
guaranteed to always be supported (whilst at the same time 
freeing up the old keywords to use as an identifier)

We already have the means to test whether `__vector(T)` is 
supported on a given target, the same style hooks can be used for 
`__complex(T)`.


More information about the Digitalmars-d mailing list