On 2014-01-01 12:29, Stewart Gordon wrote:
Or even more exotically, use Complex!(Complex!real) to implement
hypercomplex numbers.

For a more generic solution to this, see Cayley-Dickson construction[1] and my implementation of such:

https://github.com/Biotronic/Collectanea/blob/master/biotronic/CayleyDickson2.d

It's nowhere near finished, has some bugs, and I haven't worked on it for at least a year, but it's an interesting way to create complex, hypercomplex, dual, and split-complex numbers (and combinations thereof).

[1]: http://en.wikipedia.org/wiki/Cayley-Dickson_construction

--
  Simen

Reply via email to