1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Octonions Transcendentals</title> 5<link rel="stylesheet" href="../math.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../index.html" title="Math Toolkit 2.12.0"> 8<link rel="up" href="../octonions.html" title="Chapter 17. Octonions"> 9<link rel="prev" href="oct_create.html" title="Octonion Creation Functions"> 10<link rel="next" href="oct_tests.html" title="Test Program"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="oct_create.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../octonions.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="oct_tests.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 27<a name="math_toolkit.oct_trans"></a><a class="link" href="oct_trans.html" title="Octonions Transcendentals">Octonions Transcendentals</a> 28</h2></div></div></div> 29<p> 30 There is no <code class="computeroutput"><span class="identifier">log</span></code> or <code class="computeroutput"><span class="identifier">sqrt</span></code> provided for octonions in this implementation, 31 and <code class="computeroutput"><span class="identifier">pow</span></code> is likewise restricted 32 to integral powers of the exponent. There are several reasons to this: on the 33 one hand, the equivalent of analytic continuation for octonions ("branch 34 cuts") remains to be investigated thoroughly (by me, at any rate...), 35 and we wish to avoid the nonsense introduced in the standard by exponentiations 36 of complexes by complexes (which is well defined, but not in the standard...). 37 Talking of nonsense, saying that <code class="computeroutput"><span class="identifier">pow</span><span class="special">(</span><span class="number">0</span><span class="special">,</span><span class="number">0</span><span class="special">)</span></code> is "implementation 38 defined" is just plain brain-dead... 39 </p> 40<p> 41 We do, however provide several transcendentals, chief among which is the exponential. 42 That it allows for a "closed formula" is a result of the author (the 43 existence and definition of the exponential, on the octonions among others, 44 on the other hand, is a few centuries old). Basically, any converging power 45 series with real coefficients which allows for a closed formula in <span class="emphasis"><em><span class="bold"><strong>C</strong></span></em></span> can be transposed to <span class="emphasis"><em><span class="bold"><strong>O</strong></span></em></span>. More transcendentals of this type could 46 be added in a further revision upon request. It should be noted that it is 47 these functions which force the dependency upon the <a href="../../../../../boost/math/special_functions/sinc.hpp" target="_top">boost/math/special_functions/sinc.hpp</a> 48 and the <a href="../../../../../boost/math/special_functions/sinhc.hpp" target="_top">boost/math/special_functions/sinhc.hpp</a> 49 headers. 50 </p> 51<h5> 52<a name="math_toolkit.oct_trans.h0"></a> 53 <span class="phrase"><a name="math_toolkit.oct_trans.exp"></a></span><a class="link" href="oct_trans.html#math_toolkit.oct_trans.exp">exp</a> 54 </h5> 55<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> 56<span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">exp</span><span class="special">(</span><span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">o</span><span class="special">);</span> 57</pre> 58<p> 59 Computes the exponential of the octonion. 60 </p> 61<h5> 62<a name="math_toolkit.oct_trans.h1"></a> 63 <span class="phrase"><a name="math_toolkit.oct_trans.cos"></a></span><a class="link" href="oct_trans.html#math_toolkit.oct_trans.cos">cos</a> 64 </h5> 65<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> 66<span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">cos</span><span class="special">(</span><span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">o</span><span class="special">);</span> 67</pre> 68<p> 69 Computes the cosine of the octonion 70 </p> 71<h5> 72<a name="math_toolkit.oct_trans.h2"></a> 73 <span class="phrase"><a name="math_toolkit.oct_trans.sin"></a></span><a class="link" href="oct_trans.html#math_toolkit.oct_trans.sin">sin</a> 74 </h5> 75<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> 76<span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">sin</span><span class="special">(</span><span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">o</span><span class="special">);</span> 77</pre> 78<p> 79 Computes the sine of the octonion. 80 </p> 81<h5> 82<a name="math_toolkit.oct_trans.h3"></a> 83 <span class="phrase"><a name="math_toolkit.oct_trans.tan"></a></span><a class="link" href="oct_trans.html#math_toolkit.oct_trans.tan">tan</a> 84 </h5> 85<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> 86<span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">tan</span><span class="special">(</span><span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">o</span><span class="special">);</span> 87</pre> 88<p> 89 Computes the tangent of the octonion. 90 </p> 91<h5> 92<a name="math_toolkit.oct_trans.h4"></a> 93 <span class="phrase"><a name="math_toolkit.oct_trans.cosh"></a></span><a class="link" href="oct_trans.html#math_toolkit.oct_trans.cosh">cosh</a> 94 </h5> 95<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> 96<span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">cosh</span><span class="special">(</span><span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">o</span><span class="special">);</span> 97</pre> 98<p> 99 Computes the hyperbolic cosine of the octonion. 100 </p> 101<h5> 102<a name="math_toolkit.oct_trans.h5"></a> 103 <span class="phrase"><a name="math_toolkit.oct_trans.sinh"></a></span><a class="link" href="oct_trans.html#math_toolkit.oct_trans.sinh">sinh</a> 104 </h5> 105<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> 106<span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">sinh</span><span class="special">(</span><span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">o</span><span class="special">);</span> 107</pre> 108<p> 109 Computes the hyperbolic sine of the octonion. 110 </p> 111<h5> 112<a name="math_toolkit.oct_trans.h6"></a> 113 <span class="phrase"><a name="math_toolkit.oct_trans.tanh"></a></span><a class="link" href="oct_trans.html#math_toolkit.oct_trans.tanh">tanh</a> 114 </h5> 115<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> 116<span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">tanh</span><span class="special">(</span><span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">o</span><span class="special">);</span> 117</pre> 118<p> 119 Computes the hyperbolic tangent of the octonion. 120 </p> 121<h5> 122<a name="math_toolkit.oct_trans.h7"></a> 123 <span class="phrase"><a name="math_toolkit.oct_trans.pow"></a></span><a class="link" href="oct_trans.html#math_toolkit.oct_trans.pow">pow</a> 124 </h5> 125<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span> 126<span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="identifier">pow</span><span class="special">(</span><span class="identifier">octonion</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span> <span class="keyword">const</span> <span class="special">&</span> <span class="identifier">o</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">n</span><span class="special">);</span> 127</pre> 128<p> 129 Computes the n-th power of the octonion q. 130 </p> 131</div> 132<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 133<td align="left"></td> 134<td align="right"><div class="copyright-footer">Copyright © 2006-2019 Nikhar 135 Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, 136 Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan 137 Råde, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg, 138 Daryle Walker and Xiaogang Zhang<p> 139 Distributed under the Boost Software License, Version 1.0. (See accompanying 140 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 141 </p> 142</div></td> 143</tr></table> 144<hr> 145<div class="spirit-nav"> 146<a accesskey="p" href="oct_create.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../octonions.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="oct_tests.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> 147</div> 148</body> 149</html> 150