Computes the associator of the three parameters.
#include <kyosu/kyosu.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
using e_t = float;
std::cout << "Real: "<< "\n";
e_t e0(1);
e_t e1(2);
e_t e2(3);
std::cout << e0 <<
", " << e1 <<
", " << e2<<
" -> " <<
associator(e0, e1, e2) <<
"\n";
std::cout << "Complex: "<< "\n";
c_t c0(1, 5);
c_t c1(5, 9);
c_t c2(-1, 4);
std::cout << c0 <<
", " << c1 <<
", " << c2 <<
" -> " <<
associator(c0, c1, c2) <<
"\n";
std::cout << "Quaternion: "<< "\n";
q_t q0(1, 5, -2, 3);
q_t q1(5, 9, 6, 7);
q_t q2(-3, 6, -1, 0);
std::cout << q0 <<
", " << q1 <<
", " << q2 <<
" -> " <<
associator(q0, q1, q2) <<
"\n";
std::cout << "Octonion: "<< "\n";
o_t o0(1, 5, -2, 3, 4, 8, 13, 1);
o_t o1(5, 9, 6, 7, 6, -4, -1, 2);
o_t o2(-3, 6, -1, 0, 4, 5, -8, 2);
std::cout << o0 <<
", " << o1 <<
", " << o2 <<
" -> " <<
associator(o0, o1, o2) <<
"\n";
std::cout << "Mixed: "<< "\n";
return 0;
}
as_cayley_dickson_n_t< 4, T > quaternion_t
Type alias for quaternion numbers.
Definition: quaternion.hpp:24
as_cayley_dickson_n_t< 2, T > complex_t
Type alias for complex numbers.
Definition: complex.hpp:27
as_cayley_dickson_n_t< 8, T > octonion_t
Type alias for octonion numbers.
Definition: octonion.hpp:23