std.complex
Simen Kjærås
simen.kjaras at gmail.com
Thu Jan 2 07:38:14 PST 2014
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
More information about the Digitalmars-d
mailing list