/usr/share/doc/octave/octave.html/Exponents-and-Logarithms.html is in octave-doc 4.2.2-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Exponents and Logarithms (GNU Octave)</title>
<meta name="description" content="Exponents and Logarithms (GNU Octave)">
<meta name="keywords" content="Exponents and Logarithms (GNU Octave)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Arithmetic.html#Arithmetic" rel="up" title="Arithmetic">
<link href="Complex-Arithmetic.html#Complex-Arithmetic" rel="next" title="Complex Arithmetic">
<link href="Arithmetic.html#Arithmetic" rel="prev" title="Arithmetic">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
<link rel="stylesheet" type="text/css" href="octave.css">
</head>
<body lang="en">
<a name="Exponents-and-Logarithms"></a>
<div class="header">
<p>
Next: <a href="Complex-Arithmetic.html#Complex-Arithmetic" accesskey="n" rel="next">Complex Arithmetic</a>, Up: <a href="Arithmetic.html#Arithmetic" accesskey="u" rel="up">Arithmetic</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Exponents-and-Logarithms-1"></a>
<h3 class="section">17.1 Exponents and Logarithms</h3>
<a name="XREFexp"></a><dl>
<dt><a name="index-exp"></a>: <em></em> <strong>exp</strong> <em>(<var>x</var>)</em></dt>
<dd><p>Compute
<code>e^x</code>
for each element of <var>x</var>.
</p>
<p>To compute the matrix exponential, see <a href="Linear-Algebra.html#Linear-Algebra">Linear Algebra</a>.
</p>
<p><strong>See also:</strong> <a href="#XREFlog">log</a>.
</p></dd></dl>
<a name="XREFexpm1"></a><dl>
<dt><a name="index-expm1"></a>: <em></em> <strong>expm1</strong> <em>(<var>x</var>)</em></dt>
<dd><p>Compute
<code>exp (<var>x</var>) - 1</code>
accurately in the neighborhood of zero.
</p>
<p><strong>See also:</strong> <a href="#XREFexp">exp</a>.
</p></dd></dl>
<a name="XREFlog"></a><dl>
<dt><a name="index-log"></a>: <em></em> <strong>log</strong> <em>(<var>x</var>)</em></dt>
<dd><p>Compute the natural logarithm,
<code>ln (<var>x</var>)</code>,
for each element of <var>x</var>.
</p>
<p>To compute the matrix logarithm, see <a href="Linear-Algebra.html#Linear-Algebra">Linear Algebra</a>.
</p>
<p><strong>See also:</strong> <a href="#XREFexp">exp</a>, <a href="#XREFlog1p">log1p</a>, <a href="#XREFlog2">log2</a>, <a href="#XREFlog10">log10</a>, <a href="Special-Utility-Matrices.html#XREFlogspace">logspace</a>.
</p></dd></dl>
<a name="XREFreallog"></a><dl>
<dt><a name="index-reallog"></a>: <em></em> <strong>reallog</strong> <em>(<var>x</var>)</em></dt>
<dd><p>Return the real-valued natural logarithm of each element of <var>x</var>.
</p>
<p>If any element results in a complex return value <code>reallog</code> aborts and
issues an error.
</p>
<p><strong>See also:</strong> <a href="#XREFlog">log</a>, <a href="#XREFrealpow">realpow</a>, <a href="#XREFrealsqrt">realsqrt</a>.
</p></dd></dl>
<a name="XREFlog1p"></a><dl>
<dt><a name="index-log1p"></a>: <em></em> <strong>log1p</strong> <em>(<var>x</var>)</em></dt>
<dd><p>Compute
<code>log (1 + <var>x</var>)</code>
accurately in the neighborhood of zero.
</p>
<p><strong>See also:</strong> <a href="#XREFlog">log</a>, <a href="#XREFexp">exp</a>, <a href="#XREFexpm1">expm1</a>.
</p></dd></dl>
<a name="XREFlog10"></a><dl>
<dt><a name="index-log10"></a>: <em></em> <strong>log10</strong> <em>(<var>x</var>)</em></dt>
<dd><p>Compute the base-10 logarithm of each element of <var>x</var>.
</p>
<p><strong>See also:</strong> <a href="#XREFlog">log</a>, <a href="#XREFlog2">log2</a>, <a href="Special-Utility-Matrices.html#XREFlogspace">logspace</a>, <a href="#XREFexp">exp</a>.
</p></dd></dl>
<a name="XREFlog2"></a><dl>
<dt><a name="index-log2"></a>: <em></em> <strong>log2</strong> <em>(<var>x</var>)</em></dt>
<dt><a name="index-log2-1"></a>: <em>[<var>f</var>, <var>e</var>] =</em> <strong>log2</strong> <em>(<var>x</var>)</em></dt>
<dd><p>Compute the base-2 logarithm of each element of <var>x</var>.
</p>
<p>If called with two output arguments, split <var>x</var> into
binary mantissa and exponent so that
<code>1/2 <= abs(f) < 1</code><!-- /@w -->
and <var>e</var> is an integer. If
<code>x = 0</code><!-- /@w -->, <code>f = e = 0</code><!-- /@w -->.
</p>
<p><strong>See also:</strong> <a href="#XREFpow2">pow2</a>, <a href="#XREFlog">log</a>, <a href="#XREFlog10">log10</a>, <a href="#XREFexp">exp</a>.
</p></dd></dl>
<a name="XREFpow2"></a><dl>
<dt><a name="index-pow2"></a>: <em></em> <strong>pow2</strong> <em>(<var>x</var>)</em></dt>
<dt><a name="index-pow2-1"></a>: <em></em> <strong>pow2</strong> <em>(<var>f</var>, <var>e</var>)</em></dt>
<dd><p>With one input argument, compute
2 .^ x
for each element of <var>x</var>.
</p>
<p>With two input arguments, return
f .* (2 .^ e).
</p>
<p><strong>See also:</strong> <a href="#XREFlog2">log2</a>, <a href="#XREFnextpow2">nextpow2</a>, <a href="Arithmetic-Ops.html#XREFpower">power</a>.
</p></dd></dl>
<a name="XREFnextpow2"></a><dl>
<dt><a name="index-nextpow2"></a>: <em></em> <strong>nextpow2</strong> <em>(<var>x</var>)</em></dt>
<dd><p>Compute the exponent for the smallest power of two larger than the input.
</p>
<p>For each element in the input array <var>x</var>, return the first integer
<var>n</var> such that
2^n ≥ abs (x).
</p>
<p><strong>See also:</strong> <a href="#XREFpow2">pow2</a>, <a href="#XREFlog2">log2</a>.
</p></dd></dl>
<a name="XREFrealpow"></a><dl>
<dt><a name="index-realpow"></a>: <em></em> <strong>realpow</strong> <em>(<var>x</var>, <var>y</var>)</em></dt>
<dd><p>Compute the real-valued, element-by-element power operator.
</p>
<p>This is equivalent to <code><var>x</var> .^ <var>y</var></code><!-- /@w -->, except that
<code>realpow</code> reports an error if any return value is complex.
</p>
<p><strong>See also:</strong> <a href="Arithmetic-Ops.html#XREFpower">power</a>, <a href="#XREFreallog">reallog</a>, <a href="#XREFrealsqrt">realsqrt</a>.
</p></dd></dl>
<a name="XREFsqrt"></a><dl>
<dt><a name="index-sqrt"></a>: <em></em> <strong>sqrt</strong> <em>(<var>x</var>)</em></dt>
<dd><p>Compute the square root of each element of <var>x</var>.
</p>
<p>If <var>x</var> is negative, a complex result is returned.
</p>
<p>To compute the matrix square root, see <a href="Linear-Algebra.html#Linear-Algebra">Linear Algebra</a>.
</p>
<p><strong>See also:</strong> <a href="#XREFrealsqrt">realsqrt</a>, <a href="#XREFnthroot">nthroot</a>.
</p></dd></dl>
<a name="XREFrealsqrt"></a><dl>
<dt><a name="index-realsqrt"></a>: <em></em> <strong>realsqrt</strong> <em>(<var>x</var>)</em></dt>
<dd><p>Return the real-valued square root of each element of <var>x</var>.
</p>
<p>If any element results in a complex return value <code>realsqrt</code> aborts and
issues an error.
</p>
<p><strong>See also:</strong> <a href="#XREFsqrt">sqrt</a>, <a href="#XREFrealpow">realpow</a>, <a href="#XREFreallog">reallog</a>.
</p></dd></dl>
<a name="XREFcbrt"></a><dl>
<dt><a name="index-cbrt"></a>: <em></em> <strong>cbrt</strong> <em>(<var>x</var>)</em></dt>
<dd><p>Compute the real cube root of each element of <var>x</var>.
</p>
<p>Unlike <code><var>x</var>^(1/3)</code>, the result will be negative if <var>x</var> is
negative.
</p>
<p><strong>See also:</strong> <a href="#XREFnthroot">nthroot</a>.
</p></dd></dl>
<a name="XREFnthroot"></a><dl>
<dt><a name="index-nthroot"></a>: <em></em> <strong>nthroot</strong> <em>(<var>x</var>, <var>n</var>)</em></dt>
<dd>
<p>Compute the real (non-complex) <var>n</var>-th root of <var>x</var>.
</p>
<p><var>x</var> must have all real entries and <var>n</var> must be a scalar.
If <var>n</var> is an even integer and <var>x</var> has negative entries then
<code>nthroot</code> aborts and issues an error.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">nthroot (-1, 3)
⇒ -1
(-1) ^ (1 / 3)
⇒ 0.50000 - 0.86603i
</pre></div>
<p><strong>See also:</strong> <a href="#XREFrealsqrt">realsqrt</a>, <a href="#XREFsqrt">sqrt</a>, <a href="#XREFcbrt">cbrt</a>.
</p></dd></dl>
<hr>
<div class="header">
<p>
Next: <a href="Complex-Arithmetic.html#Complex-Arithmetic" accesskey="n" rel="next">Complex Arithmetic</a>, Up: <a href="Arithmetic.html#Arithmetic" accesskey="u" rel="up">Arithmetic</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>
|