std.complex

Stewart Gordon smjg_1998 at yahoo.com
Thu Jan 2 11:22:32 PST 2014


On 02/01/2014 15:38, Simen Kjærås wrote:
> 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:

Hypercomplex numbers are outside the scope of Cayley-Dickson 
construction.  The latter defines quaternions, octonions and so on.

Though it is confusing as there are at least two definitions of 
"hypercomplex number":
(a) a element of any number system that extends the complex numbers
(b) an element of a particular such number system, which is what I was 
using it to mean.

The hypercomplex numbers to which I was referring are as Fractint uses 
the term, and briefly described at
http://mathworld.wolfram.com/HypercomplexNumber.html

ij = k, i^2 = j^2 = -1, k = 1.  Multiplication is commutative.  But the 
distinctive thing about these is that they can be represented as an 
ordered pair of complex numbers, and then the complex multiplication 
formula works on them, hence my suggestion.

> 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).
<snip>

So it's a generalisation of Cayley-Dickson construction to produce a 
range of 2^n-dimensional algebras over the reals.  I'll have to look at 
it in more detail when I've more time.

Stewart.


More information about the Digitalmars-d mailing list