summaryrefslogtreecommitdiff
path: root/devdocs/elisp/math-functions.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/elisp/math-functions.html')
-rw-r--r--devdocs/elisp/math-functions.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/devdocs/elisp/math-functions.html b/devdocs/elisp/math-functions.html
new file mode 100644
index 00000000..678e4f35
--- /dev/null
+++ b/devdocs/elisp/math-functions.html
@@ -0,0 +1,28 @@
+ <h3 class="section">Standard Mathematical Functions</h3> <p>These mathematical functions allow integers as well as floating-point numbers as arguments. </p> <dl> <dt id="sin">Function: <strong>sin</strong> <em>arg</em>
+</dt> <dt id="cos">Function: <strong>cos</strong> <em>arg</em>
+</dt> <dt id="tan">Function: <strong>tan</strong> <em>arg</em>
+</dt> <dd><p>These are the basic trigonometric functions, with argument <var>arg</var> measured in radians. </p></dd>
+</dl> <dl> <dt id="asin">Function: <strong>asin</strong> <em>arg</em>
+</dt> <dd><p>The value of <code>(asin <var>arg</var>)</code> is a number between -pi/2 and pi/2 (inclusive) whose sine is <var>arg</var>. If <var>arg</var> is out of range (outside [-1, 1]), <code>asin</code> returns a NaN. </p></dd>
+</dl> <dl> <dt id="acos">Function: <strong>acos</strong> <em>arg</em>
+</dt> <dd><p>The value of <code>(acos <var>arg</var>)</code> is a number between 0 and pi (inclusive) whose cosine is <var>arg</var>. If <var>arg</var> is out of range (outside [-1, 1]), <code>acos</code> returns a NaN. </p></dd>
+</dl> <dl> <dt id="atan">Function: <strong>atan</strong> <em>y &amp;optional x</em>
+</dt> <dd><p>The value of <code>(atan <var>y</var>)</code> is a number between -pi/2 and pi/2 (exclusive) whose tangent is <var>y</var>. If the optional second argument <var>x</var> is given, the value of <code>(atan y x)</code> is the angle in radians between the vector <code>[<var>x</var>, <var>y</var>]</code> and the <code>X</code> axis. </p></dd>
+</dl> <dl> <dt id="exp">Function: <strong>exp</strong> <em>arg</em>
+</dt> <dd><p>This is the exponential function; it returns <em>e</em> to the power <var>arg</var>. </p></dd>
+</dl> <dl> <dt id="log">Function: <strong>log</strong> <em>arg &amp;optional base</em>
+</dt> <dd><p>This function returns the logarithm of <var>arg</var>, with base <var>base</var>. If you don’t specify <var>base</var>, the natural base <em>e</em> is used. If <var>arg</var> or <var>base</var> is negative, <code>log</code> returns a NaN. </p></dd>
+</dl> <dl> <dt id="expt">Function: <strong>expt</strong> <em>x y</em>
+</dt> <dd><p>This function returns <var>x</var> raised to power <var>y</var>. If both arguments are integers and <var>y</var> is nonnegative, the result is an integer; in this case, overflow signals an error, so watch out. If <var>x</var> is a finite negative number and <var>y</var> is a finite non-integer, <code>expt</code> returns a NaN. </p></dd>
+</dl> <dl> <dt id="sqrt">Function: <strong>sqrt</strong> <em>arg</em>
+</dt> <dd><p>This returns the square root of <var>arg</var>. If <var>arg</var> is finite and less than zero, <code>sqrt</code> returns a NaN. </p></dd>
+</dl> <p>In addition, Emacs defines the following common mathematical constants: </p> <dl> <dt id="float-e">Variable: <strong>float-e</strong>
+</dt> <dd><p>The mathematical constant <em>e</em> (2.71828…). </p></dd>
+</dl> <dl> <dt id="float-pi">Variable: <strong>float-pi</strong>
+</dt> <dd><p>The mathematical constant <em>pi</em> (3.14159…). </p></dd>
+</dl><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
+ <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Math-Functions.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Math-Functions.html</a>
+ </p>
+</div>