Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/libs/math/octonion/octonion.html @ 12

Last change on this file since 12 was 12, checked in by landauf, 18 years ago

added boost

File size: 72.4 KB
Line 
1<html>
2
3        <head>
4
5<title>Class octonion Documentation</title>
6
7<meta http-equiv="generator" content="Adobe GoLive 5">
8                <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
9        </head>
10
11        <body bgcolor="#FFFFFF" text="#000000">
12                <h1><img src="../../../boost.png" alt="c++boost.gif (8819 bytes)" align="center" width="277" height="86">Class octonion</h1>
13                <ul>
14                        <li><a href="#Acknowledgements">Acknowledgements</a>
15                        <li><a href="#Header File">Header File</a>
16                        <li><a href="#Test Program">Test Program</a>
17                        <li><a href="#Synopsis">Synopsis</a>
18                        <li><a href="#Template class octonion">Template class <code>octonion</code></a>
19                        <li><a href="#octonion specializations"><code>octonion</code> specializations</a>
20                        <li><a href="#octonion member functions"><code>octonion</code> member functions</a>
21                        <li><a href="#octonion member operators"><code>octonion</code> member operators</a>
22                        <li><a href="#octonion non-member operations"><code>octonion</code> non-member operations</a>
23                        <li><a href="#octonion value operations"><code>octonion</code> value operations</a>
24                        <li><a href="#octonion transcendentals"><code>octonion</code> transcendentals</a>
25                        <li><a href="#History">History</a>
26                        <li><a href="#ToDo">To Do</a>
27                </ul>
28                <p></p>
29                <p>Octonions, like <a href="../quaternion/quaternion.html">quaternions</a>, are a relative of complex numbers.</p>
30                <p>Octonions see some use in theoretical physics.</p>
31                <p>In practical terms, an octonion is simply an octuple of real numbers <img src="graphics/octonion_blurb1.jpeg" width="93" height="17" naturalsizeflag="3" align=absmiddle><font color="#000000">, which we can write in the form <img src="graphics/octonion_blurb2.jpeg" width="215" height="15" naturalsizeflag="3" align=absmiddle></font><font color="#000000">, where <img src="graphics/octonion_blurb3.jpeg" width="6" height="11" naturalsizeflag="3" align=absmiddle></font><font color="#000000">, <img src="graphics/octonion_blurb4.jpeg" width="8" height="13" naturalsizeflag="3" align=absmiddle></font><font color="#000000"> and <img src="graphics/octonion_blurb5.jpeg" width="9" height="12" naturalsizeflag="3" align=absmiddle></font><font color="#000000"> are the same objects as for quaternions, and <img src="graphics/octonion_blurb6.jpeg" width="11" height="12" naturalsizeflag="3" align=absmiddle></font><font color="#000000">, <img src="graphics/octonion_blurb7.jpeg" width="10" height="12" naturalsizeflag="3" align=absmiddle></font><font color="#000000"> , <img src="graphics/octonion_blurb8.jpeg" width="12" height="14" naturalsizeflag="3" align=absmiddle> and <img src="graphics/octonion_blurb9.jpeg" width="12" height="12" naturalsizeflag="3" align=absmiddle> are distinct objects which play essentially the same kind of role as <img src="graphics/octonion_blurb10.jpeg" width="6" height="11" naturalsizeflag="3" align=absmiddle></font><font color="#000000"> (or <img src="graphics/octonion_blurb11.jpeg" width="8" height="13" naturalsizeflag="3" align=absmiddle></font><font color="#000000"> or <img src="graphics/octonion_blurb12.jpeg" width="9" height="12" naturalsizeflag="3" align=absmiddle></font><font color="#000000">).</font></p>
32                <p><font color="#000000">An addition and a multiplication is defined on the set of octonions, which generalize their quaternionic counterparts. The main novelty this time is that <strong>the multiplication is not only not commutative, is now not even associative</strong> (<cite>i.e.</cite> there are quaternions <img src="graphics/octonion_blurb13.jpeg" width="9" height="9" naturalsizeflag="3" align=absmiddle></font><font color="#000000">, <img src="graphics/octonion_blurb14.jpeg" width="9" height="11" naturalsizeflag="3" align=absmiddle></font><font color="#000000"> and <img src="graphics/octonion_blurb15.jpeg" width="8" height="8" naturalsizeflag="3" align=absmiddle></font><font color="#000000"> such that <img src="graphics/octonion_blurb16.jpeg" width="72" height="16" naturalsizeflag="3" align=absmiddle></font><font color="#000000">). A way of remembering things is by using the following multiplication table:</font></p>
33                <div align="center">
34                        <p><img src="graphics/octonion_blurb17.jpeg" width="243" height="158" naturalsizeflag="3" align=BOTTOM></p>
35                </div>
36                <p><font color="#000000">Octonions (and their kin) are described in far more details in this other <a href="../quaternion/TQE.pdf">document</a> (with <a href="../quaternion/TQE_EA.pdf">errata and addenda</a>).</font></p>
37                <p><font color="#000000">Some traditional constructs, such as the exponential, carry over without too much change into the realms of octonions, but other, such as taking a square root, do not (the fact that the exponential has a closed form is a result of the author, but the fact that the exponential exists at all for octonions is known since quite a long time ago).</font></p>
38                <h2><a name="Acknowledgements"></a>Acknowledgements</h2>
39                <p>The mathematical text has been typeset with <a href="http://www.nisus-soft.com/">Nisus Writer</a>. Jens Maurer has helped with portability and standard adherence, and was the Review Manager for this library. More acknowledgements in the History section. Thank you to all who contributed to the discution about this library.</p>
40                <h2><a name="Header File"></a>Header File</h2>
41                <p>The interface and implementation are both supplied by the header file <a href="../../../boost/math/octonion.hpp">octonion.h</a>.</p>
42                <h2><a name="Test Program"></a>Test Program</h2>
43                <p>The <a href="octonion_test.cpp">octonion_test.cpp</a> test program tests octonions specialisations for float, double and long double (<a href="output.txt">sample output</a>).</p>
44                <p>If you define the symbol BOOST_OCTONION_TEST_VERBOSE, you will get additional output (<a href="output_more.txt">verbose output</a>); this will only be helpfull if you enable message output at the same time, of course (by uncommenting the relevant line in the test or by adding --log_level=messages to your command line,...). In that case, and if you are running interactively, you may in addition define the symbol BOOST_INTERACTIVE_TEST_INPUT_ITERATOR to interactively test the input operator with input of your choice from the standard input (instead of hard-coding it in the test).</p>
45                <h2><a name="Synopsis"></a>Synopsis</h2>
46                <pre><code>namespace boost
47{
48        namespace math
49        {
50               
51                template&lt;typename T&gt; class <a href="#octonion">octonion</a>;
52                template&lt;&gt;           class <a href="#octonion<float>">octonion&lt;float&gt;</a>;
53                template&lt;&gt;           class <a href="#octonion<double>">octonion&lt;double&gt;</a>;
54                template&lt;&gt;           class <a href="#octonion<long double>">octonion&lt;long double&gt;</a>;
55               
56                // operators
57               
58                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator +</a> (T const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
59                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator +</a> (octonion&lt;T&gt; const &amp; lhs, T const &amp; rhs);
60                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator +</a> (::std::complex&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
61                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator +</a> (octonion&lt;T&gt; const &amp; lhs, ::std::complex&lt;T&gt; const &amp; rhs);
62                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator +</a> (::boost::math::quaternion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
63                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator +</a> (octonion&lt;T&gt; const &amp; lhs, ::boost::math::quaternion&lt;T&gt; const &amp; rhs);
64                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator +</a> (octonion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
65               
66                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator -</a> (T const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
67                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator -</a> (octonion&lt;T&gt; const &amp; lhs, T const &amp; rhs);
68                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator -</a> (::std::complex&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
69                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator -</a> (octonion&lt;T&gt; const &amp; lhs, ::std::complex&lt;T&gt; const &amp; rhs);
70                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator -</a> (::boost::math::quaternion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
71                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator -</a> (octonion&lt;T&gt; const &amp; lhs, ::boost::math::quaternion&lt;T&gt; const &amp; rhs);
72                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator -</a> (octonion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
73               
74                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator *</a> (T const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
75                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator *</a> (octonion&lt;T&gt; const &amp; lhs, T const &amp; rhs);
76                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator *</a> (::std::complex&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
77                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator *</a> (octonion&lt;T&gt; const &amp; lhs, ::std::complex&lt;T&gt; const &amp; rhs);
78                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator *</a> (::boost::math::quaternion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
79                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator *</a> (octonion&lt;T&gt; const &amp; lhs, ::boost::math::quaternion&lt;T&gt; const &amp; rhs);
80                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator *</a> (octonion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
81               
82                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator /</a> (T const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
83                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator /</a> (octonion&lt;T&gt; const &amp; lhs, T const &amp; rhs);
84                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator /</a> (::std::complex&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
85                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator /</a> (octonion&lt;T&gt; const &amp; lhs, ::std::complex&lt;T&gt; const &amp; rhs);
86                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator /</a> (::boost::math::quaternion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
87                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator /</a> (octonion&lt;T&gt; const &amp; lhs, ::boost::math::quaternion&lt;T&gt; const &amp; rhs);
88                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator /</a> (octonion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
89               
90                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator +</a> (octonion&lt;T&gt; const &amp; o);
91                template&lt;typename T&gt; inline octonion&lt;T&gt; <a href="#octonion non-member operations">operator -</a> (octonion&lt;T&gt; const &amp; o);
92               
93                template&lt;typename T&gt; inline bool <a href="#octonion non-member operations">operator ==</a> (T const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
94                template&lt;typename T&gt; inline bool <a href="#octonion non-member operations">operator ==</a> (octonion&lt;T&gt; const &amp; lhs, T const &amp; rhs);
95                template&lt;typename T&gt; inline bool <a href="#octonion non-member operations">operator ==</a> (::std::complex&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
96                template&lt;typename T&gt; inline bool <a href="#octonion non-member operations">operator ==</a> (octonion&lt;T&gt; const &amp; lhs, ::std::complex&lt;T&gt; const &amp; rhs);
97                template&lt;typename T&gt; inline bool <a href="#octonion non-member operations">operator ==</a> (::boost::math::quaternion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
98                template&lt;typename T&gt; inline bool <a href="#octonion non-member operations">operator ==</a> (octonion&lt;T&gt; const &amp; lhs, ::boost::math::quaternion&lt;T&gt; const &amp; rhs);
99                template&lt;typename T&gt; inline bool <a href="#octonion non-member operations">operator ==</a> (octonion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
100               
101                template&lt;typename T&gt; inline bool <a href="#octonion non-member operations">operator !=</a> (T const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
102                template&lt;typename T&gt; inline bool <a href="#octonion non-member operations">operator !=</a> (octonion&lt;T&gt; const &amp; lhs, T const &amp; rhs);
103                template&lt;typename T&gt; inline bool <a href="#octonion non-member operations">operator !=</a> (::std::complex&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
104                template&lt;typename T&gt; inline bool <a href="#octonion non-member operations">operator !=</a> (octonion&lt;T&gt; const &amp; lhs, ::std::complex&lt;T&gt; const &amp; rhs);
105                template&lt;typename T&gt; inline bool <a href="#octonion non-member operations">operator !=</a> (::boost::math::quaternion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
106                template&lt;typename T&gt; inline bool <a href="#octonion non-member operations">operator !=</a> (octonion&lt;T&gt; const &amp; lhs, ::boost::math::quaternion&lt;T&gt; const &amp; rhs);
107                template&lt;typename T&gt; inline bool <a href="#octonion non-member operations">operator !=</a> (octonion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
108               
109                template&lt;typename T, typename charT, class traits&gt;
110                ::std::basic_istream&lt;charT,traits&gt; &amp;  <a href="#octonion non-member operations">operator &gt;&gt;</a> (::std::basic_istream&lt;charT,traits&gt; &amp; is, octonion&lt;T&gt; &amp; o);
111               
112                template&lt;typename T, typename charT, class traits&gt;
113                ::std::basic_ostream&lt;charT,traits&gt; &amp;  <a href="#octonion non-member operations">operator &lt;&lt;</a> (::std::basic_ostream&lt;charT,traits&gt; &amp; os, octonion&lt;T&gt; const &amp; o);
114               
115                // values
116               
117                template&lt;typename T&gt;      inline T                <a href="#octonion value operations">real</a>(octonion&lt;T&gt; const &amp; o);
118                template&lt;typename T&gt;      inline octonion&lt;T&gt;        <a href="#octonion value operations">unreal</a>(octonion&lt;T&gt; const &amp; o);
119               
120                template&lt;typename T&gt;      inline T                <a href="#octonion value operations">sup</a>(octonion&lt;T&gt; const &amp; o);
121                template&lt;typename T&gt;      inline T                <a href="#octonion value operations">l1</a>(octonion&lt;T&gt;const &amp; o);   
122                template&lt;typename T&gt;      inline T                <a href="#octonion value operations">abs</a>(octonion&lt;T&gt; const &amp; o);
123                template&lt;typename T&gt;      inline T                <a href="#octonion value operations">norm</a>(octonion&lt;T&gt;const  &amp; o);
124                template&lt;typename T&gt;      inline octonion&lt;T&gt;        <a href="#octonion value operations">conj</a>(octonion&lt;T&gt; const &amp; o);
125               
126                template&lt;typename T&gt;      inline octonion&lt;T&gt;        <a href="#octonion value operations">spherical</a>(T const &amp; rho, T const &amp; theta, T const &amp; phi1, T const &amp; phi2, T const &amp; phi3, T const &amp; phi4, T const &amp; phi5, T const &amp; phi6);
127                template&lt;typename T&gt;      inline octonion&lt;T&gt;        <a href="#octonion value operations">multipolar</a>(T const &amp; rho1, T const &amp; theta1, T const &amp; rho2, T const &amp; theta2, T const &amp; rho3, T const &amp; theta3, T const &amp; rho4, T const &amp; theta4);
128                template&lt;typename T&gt;      inline octonion&lt;T&gt;        <a href="#octonion value operations">cylindrical</a>(T const &amp; r, T const &amp; angle, T const &amp; h1, T const &amp; h2, T const &amp; h3, T const &amp; h4, T const &amp; h5, T const &amp; h6);
129               
130                // transcendentals
131               
132                template&lt;typename T&gt;      inline octonion&lt;T&gt;        <a href="#exp">exp</a>(octonion&lt;T&gt; const &amp; o);
133                template&lt;typename T&gt;      inline octonion&lt;T&gt;        <a href="#cos">cos</a>(octonion&lt;T&gt; const &amp; o);
134                template&lt;typename T&gt;      inline octonion&lt;T&gt;        <a href="#sin">sin</a>(octonion&lt;T&gt; const &amp; o);
135                template&lt;typename T&gt;      inline octonion&lt;T&gt;        <a href="#tan">tan</a>(octonion&lt;T&gt; const &amp; o);
136                template&lt;typename T&gt;      inline octonion&lt;T&gt;        <a href="#cosh">cosh</a>(octonion&lt;T&gt; const &amp; o);
137                template&lt;typename T&gt;      inline octonion&lt;T&gt;        <a href="#sinh">sinh</a>(octonion&lt;T&gt; const &amp; o);
138                template&lt;typename T&gt;      inline octonion&lt;T&gt;        <a href="#tanh">tanh</a>(octonion&lt;T&gt; const &amp; o);
139               
140                template&lt;typename T&gt;      octonion&lt;T&gt;               <a href="#pow">pow</a>(octonion&lt;T&gt; const &amp; o, int n);
141               
142        }
143}</code></pre>
144                <h2><a name="Template class octonion"></a>Template class <code>octonion</code></h2>
145                <pre><code>namespace boost
146{
147        namespace math
148        {
149       
150<a name="octonion"></a>         template&lt;typename T&gt;
151                class octonion
152                {
153                public:
154                       
155                        typedef T <a href="#value_type">value_type</a>;
156                       
157                        explicit                <a href="#Constructors">octonion</a>(T const &amp; requested_a = T(), T const &amp; requested_b = T(), T const &amp; requested_c = T(), T const &amp; requested_d = T(), T const & requested_e = T(), T const & requested_f = T(), T const & requested_g = T(), T const & requested_h = T());
158                        explicit                <a href="#Constructors">octonion</a>(::std::complex&lt;T&gt; const &amp; z0, ::std::complex&lt;T&gt; const &amp; z1 = ::std::complex&lt;T&gt;(), ::std::complex&lt;T&gt; const & z2 = ::std::complex&lt;T&gt;(), ::std::complex&lt;T&gt; const & z3 = ::std::complex&lt;T&gt;());
159                        explicit                <a href="#Constructors">octonion</a>(::boost::math::quaternion&lt;T&gt; const &amp; q0, ::boost::math::quaternion&lt;T&gt; const &amp; q1 = ::boost::math::quaternion&lt;T&gt;());
160                        template&lt;typename X&gt; explicit     <a href="#Constructors">octonion</a>(octonion&lt;X&gt; const &amp; a_recopier);
161                       
162                        T                       <a href="#Other member functions">real</a>() const;
163                        octonion&lt;T&gt;               <a href="#Other member functions">unreal</a>() const;
164                       
165                        T                       <a href="#Other member functions">R_component_1</a>() const;
166                        T                       <a href="#Other member functions">R_component_2</a>() const;
167                        T                       <a href="#Other member functions">R_component_3</a>() const;
168                        T                       <a href="#Other member functions">R_component_4</a>() const;
169                        T                       <a href="#Other member functions">R_component_5</a>() const;
170                        T                       <a href="#Other member functions">R_component_6</a>() const;
171                        T                       <a href="#Other member functions">R_component_7</a>() const;
172                        T                       <a href="#Other member functions">R_component_8</a>() const;
173                       
174                        ::std::complex&lt;T&gt; <a href="#Other member functions">C_component_1</a>() const;
175                        ::std::complex&lt;T&gt; <a href="#Other member functions">C_component_2</a>() const;
176                        ::std::complex&lt;T&gt; <a href="#Other member functions">C_component_3</a>() const;
177                        ::std::complex&lt;T&gt; <a href="#Other member functions">C_component_4</a>() const;
178                       
179                        ::boost::math::quaternion&lt;T&gt;      <a href="#Other member functions">H_component_1</a>() const;
180                        ::boost::math::quaternion&lt;T&gt;      <a href="#Other member functions">H_component_2</a>() const;
181                       
182                        octonion&lt;T&gt; &amp; <a href="#Assignment operators">operator =</a> (octonion&lt;T&gt; const  &amp; a_affecter);
183                        template&lt;typename X&gt;      octonion&lt;T&gt; &amp; <a href="#Assignment operators">operator =</a> (octonion&lt;X&gt; const  &amp; a_affecter);
184                        octonion&lt;T&gt; &amp; <a href="#Assignment operators">operator =</a> (T const  &amp; a_affecter);
185                        octonion&lt;T&gt; &amp; <a href="#Assignment operators">operator =</a> (::std::complex&lt;T&gt; const &amp; a_affecter);
186                        octonion&lt;T&gt; &amp; <a href="#Assignment operators">operator =</a> (::boost::math::quaternion&lt;T&gt; const &amp; a_affecter);
187                       
188                        octonion&lt;T&gt; &amp; <a href="#Other member operators">operator +=</a> (T const &amp; rhs);
189                        octonion&lt;T&gt; &amp; <a href="#Other member operators">operator +=</a> (::std::complex&lt;T&gt; const &amp; rhs);
190                        octonion&lt;T&gt; &amp; <a href="#Other member operators">operator +=</a> (::boost::math::quaternion&lt;T&gt; const &amp; rhs);
191                        template&lt;typename X&gt;      octonion&lt;T&gt; &amp; <a href="#Other member operators">operator +=</a> (octonion&lt;X&gt; const &amp; rhs);
192                       
193                        octonion&lt;T&gt; &amp; <a href="#Other member operators">operator -=</a> (T const &amp; rhs);
194                        octonion&lt;T&gt; &amp; <a href="#Other member operators">operator -=</a> (::std::complex&lt;T&gt; const &amp; rhs);
195                        octonion&lt;T&gt; &amp; <a href="#Other member operators">operator -=</a> (::boost::math::quaternion&lt;T&gt; const &amp; rhs);
196                        template&lt;typename X&gt;      octonion&lt;T&gt; &amp; <a href="#Other member operators">operator -=</a> (octonion&lt;X&gt; const &amp; rhs);
197                       
198                        octonion&lt;T&gt; &amp; <a href="#Other member operators">operator *=</a> (T const &amp; rhs);
199                        octonion&lt;T&gt; &amp; <a href="#Other member operators">operator *=</a> (::std::complex&lt;T&gt; const &amp; rhs);
200                        octonion&lt;T&gt; &amp; <a href="#Other member operators">operator *=</a> (::boost::math::quaternion&lt;T&gt; const &amp; rhs);
201                        template&lt;typename X&gt;      octonion&lt;T&gt; &amp; <a href="#Other member operators">operator *=</a> (octonion&lt;X&gt; const &amp; rhs);
202                       
203                        octonion&lt;T&gt; &amp; <a href="#Other member operators">operator /=</a> (T const &amp; rhs);
204                        octonion&lt;T&gt; &amp; <a href="#Other member operators">operator /=</a> (::std::complex&lt;T&gt; const &amp; rhs);
205                        octonion&lt;T&gt; &amp; <a href="#Other member operators">operator /=</a> (::boost::math::quaternion&lt;T&gt; const &amp; rhs);
206                        template&lt;typename X&gt;      octonion&lt;T&gt; &amp; <a href="#Other member operators">operator /=</a> (octonion&lt;X&gt; const &amp; rhs);
207                       
208                };
209               
210        }
211}</code></pre>
212                <p></p>
213                <h2><a name="octonion specializations"></a><code>octonion</code> specializations</h2>
214                <pre><code>namespace boost
215{
216        namespace math
217        {
218               
219<a name="octonion<float>"></a>          template&lt;&gt;
220                class octonion&lt;float&gt;
221                {
222                public:
223                       
224                        typedef float <a href="#value_type">value_type</a>;
225                       
226                        explicit                <a href="#Constructors">octonion</a>(float const &amp; requested_a = 0.0f, float const &amp; requested_b = 0.0f, float const &amp; requested_c = 0.0f, float const &amp; requested_d = 0.0f, float const &amp; requested_e = 0.0f, float const &amp; requested_f = 0.0f, float const &amp; requested_g = 0.0f, float const &amp; requested_h = 0.0f);
227                        explicit                <a href="#Constructors">octonion</a>(::std::complex&lt;float&gt; const &amp; z0, ::std::complex&lt;float&gt; const &amp; z1 = ::std::complex&lt;float&gt;(), ::std::complex&lt;float&gt; const &amp; z2 = ::std::complex&lt;float&gt;(), ::std::complex&lt;float&gt; const &amp; z3 = ::std::complex&lt;float&gt;());
228                        explicit                <a href="#Constructors">octonion</a>(::boost::math::quaternion&lt;float&gt; const &amp; q0, ::boost::math::quaternion&lt;float&gt; const &amp; q1 = ::boost::math::quaternion&lt;float&gt;());
229                        explicit                <a href="#Constructors">octonion</a>(octonion&lt;double&gt; const &amp; a_recopier);
230                        explicit                <a href="#Constructors">octonion</a>(octonion&lt;long double&gt; const &amp; a_recopier);
231                       
232                        float                   <a href="#Other member functions">real</a>() const;
233                        octonion&lt;float&gt;   <a href="#Other member functions">unreal</a>() const;
234                       
235                        float                   <a href="#Other member functions">R_component_1</a>() const;
236                        float                   <a href="#Other member functions">R_component_2</a>() const;
237                        float                   <a href="#Other member functions">R_component_3</a>() const;
238                        float                   <a href="#Other member functions">R_component_4</a>() const;
239                        float                   <a href="#Other member functions">R_component_5</a>() const;
240                        float                   <a href="#Other member functions">R_component_6</a>() const;
241                        float                   <a href="#Other member functions">R_component_7</a>() const;
242                        float                   <a href="#Other member functions">R_component_8</a>() const;
243                       
244                        ::std::complex&lt;float&gt;     <a href="#Other member functions">C_component_1</a>() const;
245                        ::std::complex&lt;float&gt;     <a href="#Other member functions">C_component_2</a>() const;
246                        ::std::complex&lt;float&gt;     <a href="#Other member functions">C_component_3</a>() const;
247                        ::std::complex&lt;float&gt;     <a href="#Other member functions">C_component_4</a>() const;
248                       
249                        ::boost::math::octonion&lt;float&gt;    <a href="#Other member functions">H_component_1</a>() const;
250                        ::boost::math::octonion&lt;float&gt;    <a href="#Other member functions">H_component_2</a>() const;
251                       
252                        octonion&lt;float&gt; &amp;     <a href="#Assignment operators">operator =</a> (octonion&lt;float&gt; const &amp; a_affecter);
253                        template&lt;typename X&gt;      octonion&lt;float&gt; &amp;     <a href="#Assignment operators">operator =</a> (octonion&lt;X&gt;const  &amp; a_affecter);
254                        octonion&lt;float&gt; &amp;     <a href="#Assignment operators">operator =</a> (float const &amp; a_affecter);
255                        octonion&lt;float&gt; &amp;     <a href="#Assignment operators">operator =</a> (::std::complex&lt;float&gt; const &amp; a_affecter);
256                        octonion&lt;float&gt; &amp;     <a href="#Assignment operators">operator =</a> (::boost::math::quaternion&lt;float&gt; const &amp; a_affecter);
257                       
258                        octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator +=</a> (float const &amp; rhs);
259                        octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator +=</a> (::std::complex&lt;float&gt; const &amp; rhs);
260                        template&lt;typename X&gt;      octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator +=</a> (octonion&lt;X&gt; const &amp; rhs);
261                       
262                        octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator -=</a> (float const &amp; rhs);
263                        octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator -=</a> (::std::complex&lt;float&gt; const &amp; rhs);
264                        octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator -=</a> (::boost::math::quaternion&lt;float&gt; const &amp; rhs);
265                        template&lt;typename X&gt;      octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator -=</a> (octonion&lt;X&gt; const &amp; rhs);
266                       
267                        octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator *=</a> (float const &amp; rhs);
268                        octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator *=</a> (::std::complex&lt;float&gt; const &amp; rhs);
269                        octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator *=</a> (::boost::math::quaternion&lt;float&gt; const &amp; rhs);
270                        template&lt;typename X&gt;      octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator *=</a> (octonion&lt;X&gt; const &amp; rhs);
271                       
272                        octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator /=</a> (float const &amp; rhs);
273                        octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator /=</a> (::std::complex&lt;float&gt; const &amp; rhs);
274                        octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator /=</a> (::boost::math::quaternion&lt;float&gt; const &amp; rhs);
275                        template&lt;typename X&gt;      octonion&lt;float&gt; &amp;     <a href="#Other member operators">operator /=</a> (octonion&lt;X&gt; const &amp; rhs);
276                };
277               
278               
279<a name="octonion<double>"></a>         template&lt;&gt;
280                class octonion&lt;double&gt;
281                {
282                public:
283                       
284                        typedef double <a href="#value_type">value_type</a>;
285                       
286                        explicit                <a href="#Constructors">octonion</a>(double const &amp; requested_a = 0.0, double const &amp; requested_b = 0.0, double const &amp; requested_c = 0.0, double const &amp; requested_d = 0.0, double const &amp; requested_e = 0.0, double const &amp; requested_f = 0.0, double const &amp; requested_g = 0.0, double const &amp; requested_h = 0.0);
287                        explicit                <a href="#Constructors">octonion</a>(::std::complex&lt;double&gt; const &amp; z0, ::std::complex&lt;double&gt; const &amp; z1 = ::std::complex&lt;double&gt;(), ::std::complex&lt;double&gt; const &amp; z2 = ::std::complex&lt;double&gt;(), ::std::complex&lt;double&gt; const &amp; z3 = ::std::complex&lt;double&gt;());
288                        explicit                <a href="#Constructors">octonion</a>(::boost::math::quaternion&lt;double&gt; const &amp; q0, ::boost::math::quaternion&lt;double&gt; const &amp; q1 = ::boost::math::quaternion&lt;double&gt;());
289                        explicit                <a href="#Constructors">octonion</a>(octonion&lt;float&gt; const &amp; a_recopier);
290                        explicit                <a href="#Constructors">octonion</a>(octonion&lt;long double&gt; const &amp; a_recopier);
291                       
292                        double                  <a href="#Other member functions">real</a>() const;
293                        octonion&lt;double&gt;  <a href="#Other member functions">unreal</a>() const;
294                       
295                        double                  <a href="#Other member functions">R_component_1</a>() const;
296                        double                  <a href="#Other member functions">R_component_2</a>() const;
297                        double                  <a href="#Other member functions">R_component_3</a>() const;
298                        double                  <a href="#Other member functions">R_component_4</a>() const;
299                        double                  <a href="#Other member functions">R_component_5</a>() const;
300                        double                  <a href="#Other member functions">R_component_6</a>() const;
301                        double                  <a href="#Other member functions">R_component_7</a>() const;
302                        double                  <a href="#Other member functions">R_component_8</a>() const;
303                       
304                        ::std::complex&lt;double&gt;    <a href="#Other member functions">C_component_1</a>() const;
305                        ::std::complex&lt;double&gt;    <a href="#Other member functions">C_component_2</a>() const;
306                        ::std::complex&lt;double&gt;    <a href="#Other member functions">C_component_3</a>() const;
307                        ::std::complex&lt;double&gt;    <a href="#Other member functions">C_component_4</a>() const;
308                       
309                        ::boost::math::quaternion&lt;double&gt; <a href="#Other member functions">H_component_1</a>() const;
310                        ::boost::math::quaternion&lt;double&gt; <a href="#Other member functions">H_component_2</a>() const;
311                       
312                        octonion&lt;double&gt; &amp;    <a href="#Assignment operators">operator =</a> (octonion&lt;double&gt; const &amp; a_affecter);
313                        template&lt;typename X&gt;      octonion&lt;double&gt; &amp;    <a href="#Assignment operators">operator =</a> (octonion&lt;X&gt; const &amp; a_affecter);
314                        octonion&lt;double&gt; &amp;    <a href="#Assignment operators">operator =</a> (double const &amp; a_affecter);
315                        octonion&lt;double&gt; &amp;    <a href="#Assignment operators">operator =</a> (::std::complex&lt;double&gt; const &amp; a_affecter);
316                        octonion&lt;double&gt; &amp;    <a href="#Assignment operators">operator =</a> (::boost::math::quaternion&lt;double&gt; const &amp; a_affecter);
317                       
318                        octonion&lt;double&gt; &amp;    <a href="#Other member operators">operator +=</a> (double const &amp; rhs);
319                        octonion&lt;double&gt; &amp;    <a href="#Other member operators">operator +=</a> (::std::complex&lt;double&gt; const &amp; rhs);
320                        octonion&lt;double&gt; &amp;    <a href="#Other member operators">operator +=</a> (::boost::math::quaternion&lt;double&gt; const &amp; rhs);
321                        template&lt;typename X&gt; octonion&lt;double&gt; &amp; <a href="#Other member operators">operator +=</a> (octonion&lt;X&gt; const &amp; rhs);
322                       
323                        octonion&lt;double&gt; &amp;    <a href="#Other member operators">operator -=</a> (double const &amp; rhs);
324                        octonion&lt;double&gt; &amp;    <a href="#Other member operators">operator -=</a> (::std::complex&lt;double&gt; const &amp; rhs);
325                        octonion&lt;double&gt; &amp;    <a href="#Other member operators">operator -=</a> (::boost::math::quaternion&lt;double&gt; const &amp; rhs);
326                        template&lt;typename X&gt; octonion&lt;double&gt; &amp; <a href="#Other member operators">operator -=</a> (octonion&lt;X&gt; const &amp; rhs);
327                       
328                        octonion&lt;double&gt; &amp;    <a href="#Other member operators">operator *=</a> (double const &amp; rhs);
329                        octonion&lt;double&gt; &amp;    <a href="#Other member operators">operator *=</a> (::std::complex&lt;double&gt; const &amp; rhs);
330                        octonion&lt;double&gt; &amp;    <a href="#Other member operators">operator *=</a> (::boost::math::quaternion&lt;double&gt; const &amp; rhs);
331                        template&lt;typename X&gt; octonion&lt;double&gt; &amp; <a href="#Other member operators">operator *=</a> (octonion&lt;X&gt; const &amp; rhs);
332                       
333                        octonion&lt;double&gt; &amp;    <a href="#Other member operators">operator /=</a> (double const &amp; rhs);
334                        octonion&lt;double&gt; &amp;    <a href="#Other member operators">operator /=</a> (::std::complex&lt;double&gt; const &amp; rhs);
335                        octonion&lt;double&gt; &amp;    <a href="#Other member operators">operator /=</a> (::boost::math::quaternion&lt;double&gt; const &amp; rhs);
336                        template&lt;typename X&gt;      octonion&lt;double&gt; &amp;    <a href="#Other member operators">operator /=</a> (octonion&lt;X&gt; const &amp; rhs);
337                };
338               
339               
340<a name="octonion<long double>"></a>            template&lt;&gt;
341                class octonion&lt;long double&gt;
342                {
343                public:
344                       
345                        typedef long double <a href="#value_type">value_type</a>;
346                       
347                        explicit                        <a href="#Constructors">octonion</a>(long double const &amp; requested_a = 0.0L, long double const &amp; requested_b = 0.0L, long double const &amp; requested_c = 0.0L, long double const &amp; requested_d = 0.0L, long double const &amp; requested_e = 0.0L, long double const &amp; requested_f = 0.0L, long double const &amp; requested_g = 0.0L, long double const &amp; requested_h = 0.0L);
348                        explicit                        <a href="#Constructors">octonion</a>(   ::std::complex&lt;long double&gt; const &amp; z0, ::std::complex&lt;long double&gt; const &amp; z1 = ::std::complex&lt;long double&gt;(), ::std::complex&lt;long double&gt; const &amp; z2 = ::std::complex&lt;long double&gt;(), ::std::complex&lt;long double&gt; const &amp; z3 = ::std::complex&lt;long double&gt;());
349                        explicit                        <a href="#Constructors">octonion</a>(   ::boost::math::quaternion&lt;long double&gt; const &amp; q0, ::boost::math::quaternion&lt;long double&gt; const &amp; z1 = ::boost::math::quaternion&lt;long double&gt;());
350                        explicit                        <a href="#Constructors">octonion</a>(octonion&lt;float&gt; const &amp; a_recopier);
351                        explicit                        <a href="#Constructors">octonion</a>(octonion&lt;double&gt; const &amp; a_recopier);
352                       
353                        long double                     <a href="#Other member functions">real</a>() const;
354                        octonion&lt;long double&gt;             <a href="#Other member functions">unreal</a>() const;
355                       
356                        long double                     <a href="#Other member functions">R_component_1</a>() const;
357                        long double                     <a href="#Other member functions">R_component_2</a>() const;
358                        long double                     <a href="#Other member functions">R_component_3</a>() const;
359                        long double                     <a href="#Other member functions">R_component_4</a>() const;
360                        long double                     <a href="#Other member functions">R_component_5</a>() const;
361                        long double                     <a href="#Other member functions">R_component_6</a>() const;
362                        long double                     <a href="#Other member functions">R_component_7</a>() const;
363                        long double                     <a href="#Other member functions">R_component_8</a>() const;
364                       
365                        ::std::complex&lt;long double&gt;       <a href="#Other member functions">C_component_1</a>() const;
366                        ::std::complex&lt;long double&gt;       <a href="#Other member functions">C_component_2</a>() const;
367                        ::std::complex&lt;long double&gt;       <a href="#Other member functions">C_component_3</a>() const;
368                        ::std::complex&lt;long double&gt;       <a href="#Other member functions">C_component_4</a>() const;
369                       
370                        ::boost::math::quaternion&lt;long double&gt;    <a href="#Other member functions">H_component_1</a>() const;
371                        ::boost::math::quaternion&lt;long double&gt;    <a href="#Other member functions">H_component_2</a>() const;
372                       
373                        octonion&lt;long double&gt; &amp;       <a href="#Assignment operators">operator =</a> (octonion&lt;long double&gt; const &amp; a_affecter);
374                        template&lt;typename X&gt;      octonion&lt;long double&gt; &amp;       <a href="#Assignment operators">operator =</a> (octonion&lt;X&gt; const &amp; a_affecter);
375                        octonion&lt;long double&gt; &amp;       <a href="#Assignment operators">operator =</a> (long double const &amp; a_affecter);
376                        octonion&lt;long double&gt; &amp;       <a href="#Assignment operators">operator =</a> (::std::complex&lt;long double&gt; const &amp; a_affecter);
377                        octonion&lt;long double&gt; &amp;       <a href="#Assignment operators">operator =</a> (::boost::math::quaternion&lt;long double&gt; const &amp; a_affecter);
378                       
379                        octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator +=</a> (long double const &amp; rhs);
380                        octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator +=</a> (::std::complex&lt;long double&gt; const &amp; rhs);
381                        octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator +=</a> (::boost::math::quaternion&lt;long double&gt; const &amp; rhs);
382                        template&lt;typename X&gt;      octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator +=</a> (octonion&lt;X&gt; const &amp; rhs);
383                       
384                        octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator -=</a> (long double const &amp; rhs);
385                        octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator -=</a> (::std::complex&lt;long double&gt; const &amp; rhs);
386                        octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator -=</a> (::boost::math::quaternion&lt;long double&gt; const &amp; rhs);
387                        template&lt;typename X&gt;      octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator -=</a> (octonion&lt;X&gt; const &amp; rhs);
388                       
389                        octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator *=</a> (long double const &amp; rhs);
390                        octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator *=</a> (::std::complex&lt;long double&gt; const &amp; rhs);
391                        octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator *=</a> (::boost::math::quaternion&lt;long double&gt; const &amp; rhs);
392                        template&lt;typename X&gt;      octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator *=</a> (octonion&lt;X&gt; const &amp; rhs);
393                       
394                        octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator /=</a> (long double const &amp; rhs);
395                        octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator /=</a> (::std::complex&lt;long double&gt; const &amp; rhs);
396                        octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator /=</a> (::boost::math::quaternion&lt;long double&gt; const &amp; rhs);
397                        template&lt;typename X&gt;      octonion&lt;long double&gt; &amp;       <a href="#Other member operators">operator /=</a> (octonion&lt;X&gt; const &amp; rhs);
398                };
399               
400        }
401}</code></pre>
402                <p></p>
403                <h2><a name="octonion typedefs"></a><code>octonion</code> typedefs</h2>
404                <h3><a name="value_type"></a><code>value_type</code></h3>
405                <pre><code>typedef T <strong>value_type</strong>;</code></pre>
406                <blockquote>
407                        <p>Template version.</p>
408                </blockquote>
409                <pre><code>typedef float <strong>value_type</strong>;</code></pre>
410                <blockquote>
411                        <p>Float specialization version.</p>
412                </blockquote>
413                <pre><code>typedef double <strong>value_type</strong>;</code></pre>
414                <blockquote>
415                        <p>Double specialization version.</p>
416                </blockquote>
417                <pre><code>typedef long double <strong>value_type</strong>;</code></pre>
418                <blockquote>
419                        <p>Long double specialization version.</p>
420                        <p>These provide easy acces to the type the template is built upon.</p>
421                </blockquote>
422                <h2><a name="octonion member functions"></a><code>octonion</code> member functions</h2>
423                <h3><a name="Constructors"></a>Constructors</h3>
424                <pre><code>explicit             <strong>octonion</strong>(T const &amp; requested_a = T(), T const &amp; requested_b = T(), T const &amp; requested_c = T(), T const &amp; requested_d = T(), T const & requested_e = T(), T const & requested_f = T(), T const & requested_g = T(), T const & requested_h = T());
425explicit                <strong>octonion</strong>(::std::complex&lt;T&gt; const &amp; z0, ::std::complex&lt;T&gt; const &amp; z1 = ::std::complex&lt;T&gt;(), ::std::complex&lt;T&gt; const & z2 = ::std::complex&lt;T&gt;(), ::std::complex&lt;T&gt; const & z3 = ::std::complex&lt;T&gt;());
426explicit                <strong>octonion</strong>(::boost::math::quaternion&lt;T&gt; const &amp; q0, ::boost::math::quaternion&lt;T&gt; const &amp; q1 = ::boost::math::quaternion&lt;T&gt;());
427template&lt;typename X&gt; explicit     <strong>octonion</strong>(octonion&lt;X&gt; const &amp; a_recopier);</code></pre>
428                <blockquote>
429                        <p>Template version.</p>
430                </blockquote>
431                <pre><code>explicit             <strong>octonion</strong>(float const &amp; requested_a = 0.0f, float const &amp; requested_b = 0.0f, float const &amp; requested_c = 0.0f, float const &amp; requested_d = 0.0f, float const &amp; requested_e = 0.0f, float const &amp; requested_f = 0.0f, float const &amp; requested_g = 0.0f, float const &amp; requested_h = 0.0f);
432explicit                <strong>octonion</strong>(::std::complex&lt;float&gt; const &amp; z0, ::std::complex&lt;float&gt; const &amp; z1 = ::std::complex&lt;float&gt;(), ::std::complex&lt;float&gt; const &amp; z2 = ::std::complex&lt;float&gt;(), ::std::complex&lt;float&gt; const &amp; z3 = ::std::complex&lt;float&gt;());
433explicit                <strong>octonion</strong>(::boost::math::quaternion&lt;float&gt; const &amp; q0, ::boost::math::quaternion&lt;float&gt; const &amp; q1 = ::boost::math::quaternion&lt;float&gt;());
434explicit                <strong>octonion</strong>(octonion&lt;double&gt; const &amp; a_recopier);
435explicit                <strong>octonion</strong>(octonion&lt;long double&gt; const &amp; a_recopier);</code></pre>
436                <blockquote>
437                        <p>Float specialization version.</p>
438                </blockquote>
439                <pre><code>explicit             <strong>octonion</strong>(double const &amp; requested_a = 0.0, double const &amp; requested_b = 0.0, double const &amp; requested_c = 0.0, double const &amp; requested_d = 0.0, double const &amp; requested_e = 0.0, double const &amp; requested_f = 0.0, double const &amp; requested_g = 0.0, double const &amp; requested_h = 0.0);
440explicit                <strong>octonion</strong>(::std::complex&lt;double&gt; const &amp; z0, ::std::complex&lt;double&gt; const &amp; z1 = ::std::complex&lt;double&gt;(), ::std::complex&lt;double&gt; const &amp; z2 = ::std::complex&lt;double&gt;(), ::std::complex&lt;double&gt; const &amp; z3 = ::std::complex&lt;double&gt;());
441explicit                <strong>octonion</strong>(::boost::math::quaternion&lt;double&gt; const &amp; q0, ::boost::math::quaternion&lt;double&gt; const &amp; q1 = ::boost::math::quaternion&lt;double&gt;());
442explicit                <strong>octonion</strong>(octonion&lt;float&gt; const &amp; a_recopier);
443explicit                <strong>octonion</strong>(octonion&lt;long double&gt; const &amp; a_recopier);</code></pre>
444                <blockquote>
445                        <p>Double specialization version.</p>
446                </blockquote>
447                <pre><code>explicit             <strong>octonion</strong>(long double const &amp; requested_a = 0.0L, long double const &amp; requested_b = 0.0L, long double const &amp; requested_c = 0.0L, long double const &amp; requested_d = 0.0L, long double const &amp; requested_e = 0.0L, long double const &amp; requested_f = 0.0L, long double const &amp; requested_g = 0.0L, long double const &amp; requested_h = 0.0L);
448explicit                <strong>octonion</strong>(      ::std::complex&lt;long double&gt; const &amp; z0, ::std::complex&lt;long double&gt; const &amp; z1 = ::std::complex&lt;long double&gt;(), ::std::complex&lt;long double&gt; const &amp; z2 = ::std::complex&lt;long double&gt;(), ::std::complex&lt;long double&gt; const &amp; z3 = ::std::complex&lt;long double&gt;());
449explicit                <strong>octonion</strong>(::boost::math::quaternion&lt;long double&gt; const &amp; q0, ::boost::math::quaternion&lt;long double&gt; const &amp; q1 = ::boost::math::quaternion&lt;long double&gt;());
450explicit                <strong>octonion</strong>(octonion&lt;float&gt; const &amp; a_recopier);
451explicit                <strong>octonion</strong>(octonion&lt;double&gt; const &amp; a_recopier);</code></pre>
452                <blockquote>
453                        <p>Long double specialization version.</p>
454                        <p>A default constructor is provided for each form, which initializes each component to the default values for their type (<cite>i.e.</cite> zero for floating numbers). This constructor can also accept one to eight base type arguments. A constructor is also provided to build octonions from one to four complex numbers sharing the same base type, and another taking one or two quaternionssharing the same base type. The unspecialized template also sports a templarized copy constructor, while the specialized forms have copy constructors from the other two specializations, which are explicit when a risk of precision loss exists. For the unspecialized form, the base type's constructors must not throw.</p>
455                        <p>Destructors and untemplated copy constructors (from the same type) are provided by the compiler. Converting copy constructors make use of a templated helper function in a &quot;detail&quot; subnamespace.</p>
456                </blockquote>
457                <h3><a name="Other member functions"></a>Other member functions</h3>
458                <pre><code>T                    <strong>real</strong>() const;
459octonion&lt;T&gt;               <strong>unreal</strong>() const;</code></pre>
460                <blockquote>
461                        <p>Like complex number, octonions do have a meaningful notion of &quot;real part&quot;, but unlike them there is no meaningful notion of &quot;imaginary part&quot;. Instead there is an &quot;unreal part&quot; which itself is a octonion, and usually nothing simpler (as opposed to the complex number case). These are returned by the first two functions.</p>
462                </blockquote>
463                <pre><code>T                    <strong>R_component_1</strong>() const;
464T                       <strong>R_component_2</strong>() const;
465T                       <strong>R_component_3</strong>() const;
466T                       <strong>R_component_4</strong>() const;
467T                       <strong>R_component_5</strong>() const;
468T                       <strong>R_component_6</strong>() const;
469T                       <strong>R_component_7</strong>() const;
470T                       <strong>R_component_8</strong>() const;</code></pre>
471                <blockquote>
472                        <p>A octonion having eight real components, these are returned by these eight functions. Hence <code>real</code> and <code>R_component_1</code> return the same value.</p>
473                </blockquote>
474                <pre><code>::std::complex&lt;T&gt;      <strong>C_component_1</strong>() const;
475::std::complex&lt;T&gt; <strong>C_component_2</strong>() const;
476::std::complex&lt;T&gt; <strong>C_component_3</strong>() const;
477::std::complex&lt;T&gt; <strong>C_component_4</strong>() const;</code></pre>
478                <blockquote>
479                        <p>A octonion likewise has four complex components. Actually, <font color="#000000">octonions are indeed a (left) vector field over the complexes</font>, but <em>beware</em>, as <font color="#000000">for any octonion <img src="graphics/octonion_blurb18.jpeg" width="215" height="15" naturalsizeflag="3" align=absmiddle></font><font color="#000000"> we also have <img src="graphics/octonion_blurb19.jpeg" width="228" height="17" naturalsizeflag="3" align=absmiddle></font><font color="#000000"> (note the <strong>minus</strong> sign in the last factor)</font><font color="#000000">. What the <code>C_component_n</code> functions return, however, are the complexes which could be used to build the octonion using the constructor, and <strong>not</strong> the components of the octonion on the basis <img src="graphics/octonion_blurb21.jpeg" width="52" height="16" naturalsizeflag="3" align=absmiddle></font><font color="#000000">.</font></p>
480                </blockquote>
481                <pre><code>::boost::math::quaternion&lt;T&gt;   <strong>H_component_1</strong>() const;
482::boost::math::quaternion&lt;T&gt;      <strong>H_component_2</strong>() const;</code></pre>
483                <blockquote>
484                        <p>Likewise, for any octonion <img src="graphics/octonion_blurb18.jpeg" width="215" height="15" naturalsizeflag="3" align=absmiddle> we also have<font color="#000000"> <img src="graphics/octonion_blurb20.jpeg" width="219" height="17" naturalsizeflag="3" align=absmiddle>, though there is no meaningful vector-space-like structure based on the quaternions. What the <code>H_component_n</code> functions return are the quaternions which could be used to build the octonion</font><font color="#000000"> using the constructor.</font></p>
485                </blockquote>
486                <h2><a name="octonion member operators"></a><code>octonion</code> member operators</h2>
487                <h3><a name="Assignment operators"></a>Assignment operators</h3>
488                <pre><code>octonion&lt;T&gt; &amp; <strong>operator =</strong> (octonion&lt;T&gt; const &amp; a_affecter);
489template&lt;typename X&gt; octonion&lt;T&gt; &amp; <strong>operator =</strong> (octonion&lt;X&gt; const &amp; a_affecter);
490octonion&lt;T&gt; &amp; <strong>operator =</strong> (T const &amp; a_affecter);
491octonion&lt;T&gt; &amp; <strong>operator =</strong> (::std::complex&lt;T&gt; const &amp; a_affecter);
492octonion&lt;T&gt; &amp; <strong>operator =</strong> (::boost::math::quaternion&lt;T&gt; const &amp; a_affecter);</code></pre>
493                <blockquote>
494                        <p>These perform the expected assignment, with type modification if necessary (for instance, assigning from a base type will set the real part to that value, and all other components to zero). For the unspecialized form, the base type's assignment operators must not throw.</p>
495                </blockquote>
496                <h3><a name="Other member operators"></a>Other member operators</h3>
497                <pre><code>octonion&lt;T&gt; &amp;      <strong>operator +=</strong> (T const &amp; rhs)
498octonion&lt;T&gt; &amp; <strong>operator +=</strong> (::std::complex&lt;T&gt; const &amp; rhs);
499octonion&lt;T&gt; &amp; <strong>operator +=</strong> (::boost::math::quaternion&lt;T&gt; const &amp; rhs);
500template&lt;typename X&gt;      octonion&lt;T&gt; &amp; <strong>operator +=</strong> (octonion&lt;X&gt; const &amp; rhs);</code></pre>
501                <blockquote>
502                        <p>These perform the mathematical operation (*this)+rhs and store the result in *this. The unspecialized form has exception guards, which the specialized forms do not, so as to insure exception safety. For the unspecialized form, the base type's assignment operators must not throw.</p>
503                </blockquote>
504                <pre><code>octonion&lt;T&gt; &amp;      <strong>operator -=</strong> (T const &amp; rhs)
505octonion&lt;T&gt; &amp; <strong>operator -=</strong> (::std::complex&lt;T&gt; const &amp; rhs);
506octonion&lt;T&gt; &amp; <strong>operator -=</strong> (::boost::math::quaternion&lt;T&gt; const &amp; rhs);
507template&lt;typename X&gt;      octonion&lt;T&gt; &amp; <strong>operator -=</strong> (octonion&lt;X&gt; const &amp; rhs);</code></pre>
508                <blockquote>
509                        <p>These perform the mathematical operation (*this)-rhs and store the result in *this. The unspecialized form has exception guards, which the specialized forms do not, so as to insure exception safety. For the unspecialized form, the base type's assignment operators must not throw.</p>
510                </blockquote>
511                <pre><code>octonion&lt;T&gt; &amp;      <strong>operator *=</strong> (T const &amp; rhs)
512octonion&lt;T&gt; &amp; <strong>operator *=</strong> (::std::complex&lt;T&gt; const &amp; rhs);
513octonion&lt;T&gt; &amp; <strong>operator *=</strong> (::boost::math::quaternion&lt;T&gt; const &amp; rhs);
514template&lt;typename X&gt;      octonion&lt;T&gt; &amp; <strong>operator *=</strong> (octonion&lt;X&gt; const &amp; rhs);</code></pre>
515                <blockquote>
516                        <p>These perform the mathematical operation (*this)*rhs <strong>in this order</strong> (order is important as multiplication is not commutative for octonions) and store the result in *this. The unspecialized form has exception guards, which the specialized forms do not, so as to insure exception safety. For the unspecialized form, the base type's assignment operators must not throw. Also, for clarity's sake, you should <em>always</em> group the factors in a multiplication by groups of two, as the multiplication is not even associative on the octonions (though there are of course cases where this does not matter, it usually does).</p>
517                </blockquote>
518                <pre><code>octonion&lt;T&gt; &amp;      <strong>operator /=</strong> (T const &amp; rhs)
519octonion&lt;T&gt; &amp; <strong>operator /=</strong> (::std::complex&lt;T&gt; const &amp; rhs);
520octonion&lt;T&gt; &amp; <strong>operator /=</strong> (::boost::math::quaternion&lt;T&gt; const &amp; rhs);
521template&lt;typename X&gt;      octonion&lt;T&gt; &amp; <strong>operator /=</strong> (octonion&lt;X&gt; const &amp; rhs);</code></pre>
522                <blockquote>
523                        <p>These perform the mathematical operation (*this)*inverse_of(rhs) <strong>in this order</strong> (order is important as multiplication is not commutative for octonions) and store the result in *this. The unspecialized form has exception guards, which the specialized forms do not, so as to insure exception safety. For the unspecialized form, the base type's assignment operators must not throw. As for the multiplication, remember to group any two factors using parenthesis.</p>
524                </blockquote>
525                <h2><a name="octonion non-member operations"></a><code>octonion</code> non-member operations</h2>
526                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>operator +</strong> (octonion&lt;T&gt; const &amp; o);</code></pre>
527                <blockquote>
528                        <p>This unary operator simply returns <code>o</code>.</p>
529                </blockquote>
530                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>operator -</strong> (octonion&lt;T&gt; const &amp; o);</code></pre>
531                <blockquote>
532                        <p>This unary operator returns the opposite of <code>o</code>.</p>
533                </blockquote>
534                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>operator +</strong> (T const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
535template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator +</strong> (octonion&lt;T&gt; const &amp; lhs, T const &amp; rhs);
536template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator +</strong> (::std::complex&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
537template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator +</strong> (octonion&lt;T&gt; const &amp; lhs, ::std::complex&lt;T&gt; const &amp; rhs);
538template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator +</strong> (::boost::math::quaternion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
539template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator +</strong> (octonion&lt;T&gt; const &amp; lhs, ::boost::math::quaternion&lt;T&gt; const &amp; rhs);
540template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator +</strong> (octonion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);</code></pre>
541                <blockquote>
542                        <p>These operators return <code>octonion&lt;T&gt;(lhs) += rhs</code>.</p>
543                </blockquote>
544                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>operator -</strong> (T const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
545template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator -</strong> (octonion&lt;T&gt; const &amp; lhs, T const &amp; rhs);
546template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator -</strong> (::std::complex&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
547template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator -</strong> (octonion&lt;T&gt; const &amp; lhs, ::std::complex&lt;T&gt; const &amp; rhs);
548template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator -</strong> (::boost::math::quaternion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
549template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator -</strong> (octonion&lt;T&gt; const &amp; lhs, ::boost::math::quaternion&lt;T&gt; const &amp; rhs);
550template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator -</strong> (octonion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);</code></pre>
551                <blockquote>
552                        <p>These operators return <code>octonion&lt;T&gt;(lhs) -= rhs</code>.</p>
553                </blockquote>
554                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>operator *</strong> (T const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
555template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator *</strong> (octonion&lt;T&gt; const &amp; lhs, T const &amp; rhs);
556template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator *</strong> (::std::complex&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
557template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator *</strong> (octonion&lt;T&gt; const &amp; lhs, ::std::complex&lt;T&gt; const &amp; rhs);
558template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator *</strong> (::boost::math::quaternion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
559template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator *</strong> (octonion&lt;T&gt; const &amp; lhs, ::boost::math::quaternion&lt;T&gt; const &amp; rhs);
560template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator *</strong> (octonion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);</code></pre>
561                <blockquote>
562                        <p>These operators return <code>octonion&lt;T&gt;(lhs) *= rhs</code>.</p>
563                </blockquote>
564                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>operator /</strong> (T const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
565template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator /</strong> (octonion&lt;T&gt; const &amp; lhs, T const &amp; rhs);
566template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator /</strong> (::std::complex&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
567template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator /</strong> (octonion&lt;T&gt; const &amp; lhs, ::std::complex&lt;T&gt; const &amp; rhs);
568template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator /</strong> (::boost::math::quaternion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
569template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator /</strong> (octonion&lt;T&gt; const &amp; lhs, ::boost::math::quaternion&lt;T&gt; const &amp; rhs);
570template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>operator /</strong> (octonion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);</code></pre>
571                <blockquote>
572                        <p>These operators return <code>octonion&lt;T&gt;(lhs) /= rhs</code>. It is of course still an error to divide by zero...</p>
573                </blockquote>
574                <pre><code>template&lt;typename T&gt;   inline bool     <strong>operator ==</strong> (T const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
575template&lt;typename T&gt;      inline bool     <strong>operator ==</strong> (octonion&lt;T&gt; const &amp; lhs, T const &amp; rhs);
576template&lt;typename T&gt;      inline bool     <strong>operator ==</strong> (::std::complex&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
577template&lt;typename T&gt;      inline bool     <strong>operator ==</strong> (octonion&lt;T&gt; const &amp; lhs, ::std::complex&lt;T&gt; const &amp; rhs);
578template&lt;typename T&gt;      inline bool     <strong>operator ==</strong> (::boost::math::quaternion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
579template&lt;typename T&gt;      inline bool     <strong>operator ==</strong> (octonion&lt;T&gt; const &amp; lhs, ::boost::math::quaternion&lt;T&gt; const &amp; rhs);
580template&lt;typename T&gt;      inline bool     <strong>operator ==</strong> (octonion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);</code></pre>
581                <blockquote>
582                        <p>These return <code>true</code> if and only if the four components of <code>octonion&lt;T&gt;(lhs)</code> are equal to their counterparts in <code>octonion&lt;T&gt;(rhs)</code>. As with any floating-type entity, this is essentially meaningless.</p>
583                </blockquote>
584                <pre><code>template&lt;typename T&gt;   inline bool     <strong>operator !=</strong> (T const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
585template&lt;typename T&gt;      inline bool     <strong>operator !=</strong> (octonion&lt;T&gt; const &amp; lhs, T const &amp; rhs);
586template&lt;typename T&gt;      inline bool     <strong>operator !=</strong> (::std::complex&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
587template&lt;typename T&gt;      inline bool     <strong>operator !=</strong> (octonion&lt;T&gt; const &amp; lhs, ::std::complex&lt;T&gt; const &amp; rhs);
588template&lt;typename T&gt;      inline bool     <strong>operator !=</strong> (::boost::math::quaternion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);
589template&lt;typename T&gt;      inline bool     <strong>operator !=</strong> (octonion&lt;T&gt; const &amp; lhs, ::boost::math::quaternion&lt;T&gt; const &amp; rhs);
590template&lt;typename T&gt;      inline bool     <strong>operator !=</strong> (octonion&lt;T&gt; const &amp; lhs, octonion&lt;T&gt; const &amp; rhs);</code></pre>
591                <blockquote>
592                        <p>These return <code>true</code> if and only if <code>octonion&lt;T&gt;(lhs) == octonion&lt;T&gt;(rhs)</code> is <code>false</code>. As with any floating-type entity, this is essentially meaningless.</p>
593                </blockquote>
594                <pre><code>template&lt;typename T, typename charT, class traits&gt;
595::std::basic_istream&lt;charT,traits&gt; &amp;  <strong>operator &gt;&gt;</strong> (::std::basic_istream&lt;charT,traits&gt; &amp; is, octonion&lt;T&gt; &amp; o);</code></pre>
596                <blockquote>
597                        <p>Extracts an octonion <code>o</code>. We accept any format which seems reasonable. However, since this leads to a great many ambiguities, decisions were made to lift these. In case of doubt, stick to lists of reals.</p>
598                        <p>The input values must be convertible to T. If bad input is encountered, calls is.setstate(ios::failbit) (which may throw ios::failure (27.4.5.3)).</p>
599                        <p>Returns <code>is</code>.</p>
600                </blockquote>
601                <pre><code>template&lt;typename T, typename charT, class traits&gt;
602::std::basic_ostream&lt;charT,traits&gt; &amp;  <strong>operator &lt;&lt;</strong> (::std::basic_ostream&lt;charT,traits&gt; &amp; os, octonion&lt;T&gt; const &amp; o);</code></pre>
603                <blockquote>
604                        <p>Inserts the octonion <code>o</code> onto the stream <code>os</code> as if it were implemented as follows:</p>
605                </blockquote>
606                <pre><code>     template&lt;typename T, typename charT, class traits&gt;
607        ::std::basic_ostream&lt;charT,traits&gt; &amp;  operator &lt;&lt; (     ::std::basic_ostream&lt;charT,traits&gt; &amp; os,
608                                                                octonion&lt;T&gt; const &amp; o)
609                                        {
610                                                ::std::basic_ostringstream&lt;charT,traits&gt;  s;
611                                               
612                                                s.flags(os.flags());
613                                                s.imbue(os.getloc());
614                                                s.precision(os.precision());
615                                               
616                                                s &lt;&lt; '('  &lt;&lt; o.R_component_1() &lt;&lt; ','
617                                                                &lt;&lt; o.R_component_2() &lt;&lt; ','
618                                                                &lt;&lt; o.R_component_3() &lt;&lt; ','
619                                                                &lt;&lt; o.R_component_4() &lt;&lt; ','
620                                                                &lt;&lt; o.R_component_5() &lt;&lt; ','
621                                                                &lt;&lt; o.R_component_6() &lt;&lt; ','
622                                                                &lt;&lt; o.R_component_7() &lt;&lt; ','
623                                                                &lt;&lt; o.R_component_8() &lt;&lt; ')';
624                                                                       
625                                                return os &lt;&lt; s.str();
626                                        }</code></pre>
627                <h2><a name="octonion value operations"></a><code>octonion</code> value operations</h2>
628                <pre><code>template&lt;typename T&gt;   inline T                <strong>real</strong>(octonion&lt;T&gt; const &amp; o);
629template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>unreal</strong>(octonion&lt;T&gt; const &amp; o);</code></pre>
630                <blockquote>
631                        <p>These return <code>o.real()</code> and <code>o.unreal()</code> respectively.</p>
632                </blockquote>
633                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>conj</strong>(octonion&lt;T&gt; const &amp; o);</code></pre>
634                <blockquote>
635                        <p>This returns the conjugate of the octonion.</p>
636                </blockquote>
637                <pre><code>template&lt;typename T&gt;   inline T                <strong>sup</strong>(octonion&lt;T&gt; const &amp; o);</code></pre>
638                <blockquote>
639                        <p>This return the sup norm (the greatest among <code>abs(o.R_component_1())</code>...<code>abs(o.R_component_8())</code>) of the octonion.</p>
640                </blockquote>
641                <pre><code>template&lt;typename T&gt;   inline T                <strong>l1</strong>(octonion&lt;T&gt; const &amp; o);</code></pre>
642                <blockquote>
643                        <p>This return the l1 norm (<code>abs(o.R_component_1())+...+abs(o.R_component_8())</code>) of the octonion.</p>
644                </blockquote>
645                <pre><code>template&lt;typename T&gt;   inline T                <strong>abs</strong>(octonion&lt;T&gt; const &amp; o);</code></pre>
646                <blockquote>
647                        <p>This return the magnitude (Euclidian norm) of the octonion.</p>
648                </blockquote>
649                <pre><code>template&lt;typename T&gt;   inline T                <strong>norm</strong>(octonion&lt;T&gt;const  &amp; o);</code></pre>
650                <blockquote>
651                        <p>This return the (Cayley) norm of the octonion. The term &quot;norm&quot; might be confusing, as most people associate it with the Euclidian norm (and quadratic functionals). For this version of (the mathematical objects known as) octonions, the Euclidian norm (also known as magnitude) is the square root of the Cayley norm.</p>
652                </blockquote>
653                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>spherical</strong>(T const &amp; rho, T const &amp; theta, T const &amp; phi1, T const &amp; phi2, T const &amp; phi3, T const &amp; phi4, T const &amp; phi5, T const &amp; phi6);
654template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>multipolar</strong>(T const &amp; rho1, T const &amp; theta1, T const &amp; rho2, T const &amp; theta2, T const &amp; rho3, T const &amp; theta3, T const &amp; rho4, T const &amp; theta4);
655template&lt;typename T&gt;      inline octonion&lt;T&gt;        <strong>cylindrical</strong>(T const &amp; r, T const &amp; angle, T const &amp; h1, T const &amp; h2, T const &amp; h3, T const &amp; h4, T const &amp; h5, T const &amp; h6);</code></pre>
656                <blockquote>
657                        <p>These build octonions in a way similar to the way <code>polar</code> builds complex numbers, as there is no strict equivalent to polar coordinates for octonions.</p>
658                        <p><code>spherical</code> is a simple transposition of <code>polar</code>, it takes as inputs a (positive) magnitude and a point on the hypersphere, given by three angles. The first of these, <code>theta</code> has a natural range of -pi to +pi, and the other two have natural ranges of -pi/2 to +pi/2 (as is the case with the usual spherical coordinates in R^3). Due to the many symmetries and periodicities, nothing untoward happens if the magnitude is negative or the angles are outside their natural ranges. The expected degeneracies (a magnitude of zero ignores the angles settings...) do happen however.</p>
659                        <p><code>cylindrical</code> is likewise a simple transposition of the usual cylindrical coordinates in R^3, which in turn is another derivative of planar polar coordinates. The first two inputs are the polar coordinates of the first C component of the octonion. The third and fourth inputs are placed into the third and fourth R components of the octonion, respectively.</p>
660                        <p><code>multipolar</code> is yet another simple generalization of polar coordinates. This time, both C components of the octonion are given in polar coordinates.</p>
661                </blockquote>
662                <p>In this version of our implementation of octonions, there is no analogue of the complex value operation <code>arg</code> as the situation is somewhat more complicated.</p>
663                <h2><a name="octonion transcendentals"></a><code>octonion</code> transcendentals</h2>
664                <p>There is no <code>log</code> or <code>sqrt</code> provided for octonions in this implementation, and <code>pow</code> is likewise restricted to integral powers of the exponent. There are several reasons to this: on the one hand, the equivalent of analytic continuation for octonions (&quot;branch cuts&quot;) remains to be investigated thoroughly (by me, at any rate...), and we wish to avoid the nonsense introduced in the standard by exponentiations of complexes by complexes (which is well defined, but not in the standard...). Talking of nonsense, saying that <code>pow(0,0)</code> is &quot;implementation defined&quot; is just plain brain-dead...</p>
665                <p>We do, however provide several transcendentals, chief among which is the exponential. That it allows for a &quot;closed formula&quot; is a result of the author (the existence and definition of the exponential, on the octonions among others, on the other hand, is a few centuries old). Basically, any converging power series with real coefficients which allows for a closed formula in C can be transposed to O. More transcendentals of this type could be added in a further revision upon request. It should be noted that it is these functions which force the dependency upon the <a href="../../../boost/math/special_functions/sinc.hpp">boost/math/<code>special_functions/sinc.hpp</code></a> and the <a href="../../../boost/math/special_functions/sinhc.hpp">boost/math/<code>special_functions/sinhc.hpp</code></a> headers.</p>
666                <h3><a name="exp"></a>exp</h3>
667                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>exp</strong>(octonion&lt;T&gt; const &amp; o);</code></pre>
668                <blockquote>
669                        <p>Computes the exponential of the octonion.</p>
670                </blockquote>
671                <h3><a name="cos"></a>cos</h3>
672                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>cos</strong>(octonion&lt;T&gt; const &amp; o);</code></pre>
673                <blockquote>
674                        <p>Computes the cosine of the octonion</p>
675                </blockquote>
676                <h3><a name="sin"></a>sin</h3>
677                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>sin</strong>(octonion&lt;T&gt; const &amp; o);</code></pre>
678                <blockquote>
679                        <p>Computes the sine of the octonion.</p>
680                </blockquote>
681                <h3><a name="tan"></a>tan</h3>
682                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>tan</strong>(octonion&lt;T&gt; const &amp; o);</code></pre>
683                <blockquote>
684                        <p>Computes the tangent of the octonion.</p>
685                </blockquote>
686                <h3><a name="cosh"></a>cosh</h3>
687                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>cosh</strong>(octonion&lt;T&gt; const &amp; o);</code></pre>
688                <blockquote>
689                        <p>Computes the hyperbolic cosine of the octonion.</p>
690                </blockquote>
691                <h3><a name="sinh"></a>sinh</h3>
692                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>sinh</strong>(octonion&lt;T&gt; const &amp; o);</code></pre>
693                <blockquote>
694                        <p>Computes the hyperbolic sine of the octonion.</p>
695                </blockquote>
696                <h3><a name="tanh"></a>tanh</h3>
697                <pre><code>template&lt;typename T&gt;   inline octonion&lt;T&gt;        <strong>tanh</strong>(octonion&lt;T&gt; const &amp; o);</code></pre>
698                <blockquote>
699                        <p>Computes the hyperbolic tangent of the octonion.</p>
700                </blockquote>
701                <h3><a name="pow"></a>pow</h3>
702                <pre><code>template&lt;typename T&gt;   octonion&lt;T&gt;               <strong>pow</strong>(octonion&lt;T&gt; const &amp; o, int n);</code></pre>
703                <blockquote>
704                        <p>Computes the <code>n</code>-th power of the octonion <code>q</code>.</p>
705                </blockquote>
706                <h2><a name="History"></a>History</h2>
707                <ul>
708                        <li>1.5.7 - 25/02/2003: transitionned to the unit test framework; &lt;boost/config.hpp&gt; now included by the library header (rather than the test files), via &lt;boost/math/quaternion.hpp&gt;.
709                        <li>1.5.6 - 15/10/2002: Gcc2.95.x and stlport on linux compatibility by Alkis Evlogimenos (alkis@routescience.com).
710                        <li>1.5.5 - 27/09/2002: Microsoft VCPP 7 compatibility, by Michael Stevens (michael@acfr.usyd.edu.au); requires the /Za compiler option.
711                        <li>1.5.4 - 19/09/2002: fixed problem with multiple inclusion (in different translation units); attempt at an improved compatibility with Microsoft compilers, by Michael Stevens (michael@acfr.usyd.edu.au) and Fredrik Blomqvist; other compatibility fixes. 
712                        <li>1.5.3 - 01/02/2002: bugfix and Gcc 2.95.3 compatibility by Douglas Gregor (gregod@cs.rpi.edu).
713                        <li>1.5.2 - 07/07/2001: introduced <code>namespace math</code>.
714                        <li>1.5.1 - 07/06/2001: (end of Boost review) now includes <code>&lt;boost/math/special_functions/sinc.hpp&gt;</code> and <code>&lt;boost/math/special_functions/sinhc.hpp&gt;</code> instead of <code>&lt;boost/special_functions.hpp&gt;</code>; corrected bug in <code>sin</code> (Daryle Walker); removed check for self-assignment (Gary Powel); made converting functions <code>explicit</code> (Gary Powel); added overflow guards for division operators and <code>abs</code> (Peter Schmitteckert); added <code>sup</code> and <code>l1</code>; used Vesa Karvonen's CPP metaprograming technique to simplify code.
715                        <li>1.5.0 - 23/03/2001: boostification, inlining of all operators except input, output and <code>pow</code>, fixed exception safety of some members (template version).
716                        <li>1.4.0 - 09/01/2001: added <code>tan</code> and <code>tanh</code>.                   <li>1.3.1 - 08/01/2001: cosmetic fixes.
717                        <li>1.3.0 - 12/07/2000: <code>pow</code> now uses Maarten Hilferink's (mhilferink@tip.nl) algorithm.                    <li>1.2.0 - 25/05/2000: fixed the division operators and output; changed many signatures.                       <li>1.1.0 - 23/05/2000: changed <code>sinc</code> into <code>sinc_pi</code>; added <code>sin</code>, <code>cos</code>, <code>sinh</code>, <code>cosh</code>.   
718                        <li>1.0.0 - 10/08/1999: first public version.
719                </ul>
720                <h2><a name="ToDo"></a>To Do</h2>
721                <ul>
722                        <li>Improve testing.
723                        <li>Rewrite input operatore using Spirit (creates a dependency).
724                        <li>Put in place an Expression Template mechanism (perhaps borrowing from uBlas).
725                </ul>
726                <hr>
727                <p>Revised <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->25 Feb 2003<!--webbot bot="Timestamp" endspan i-checksum="18778" --></p>
728                <p>&copy; Copyright Hubert Holin 2001-2003. Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears in all copies. This software is provided &quot;as is&quot; without express or implied&nbsp; warranty, and with no claim as to its suitability for any purpose.</p>
729        </body>
730
731</html>
Note: See TracBrowser for help on using the repository browser.