blob: fc187005b1d1d6f838b0249cee64b0e272af945f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
<h3 class="section">Rounding Operations</h3> <p>The functions <code>ffloor</code>, <code>fceiling</code>, <code>fround</code>, and <code>ftruncate</code> take a floating-point argument and return a floating-point result whose value is a nearby integer. <code>ffloor</code> returns the nearest integer below; <code>fceiling</code>, the nearest integer above; <code>ftruncate</code>, the nearest integer in the direction towards zero; <code>fround</code>, the nearest integer. </p> <dl> <dt id="ffloor">Function: <strong>ffloor</strong> <em>float</em>
</dt> <dd><p>This function rounds <var>float</var> to the next lower integral value, and returns that value as a floating-point number. </p></dd>
</dl> <dl> <dt id="fceiling">Function: <strong>fceiling</strong> <em>float</em>
</dt> <dd><p>This function rounds <var>float</var> to the next higher integral value, and returns that value as a floating-point number. </p></dd>
</dl> <dl> <dt id="ftruncate">Function: <strong>ftruncate</strong> <em>float</em>
</dt> <dd><p>This function rounds <var>float</var> towards zero to an integral value, and returns that value as a floating-point number. </p></dd>
</dl> <dl> <dt id="fround">Function: <strong>fround</strong> <em>float</em>
</dt> <dd><p>This function rounds <var>float</var> to the nearest integral value, and returns that value as a floating-point number. Rounding a value equidistant between two integers returns the even integer. </p></dd>
</dl><div class="_attribution">
<p class="_attribution-p">
Copyright © 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/Rounding-Operations.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Rounding-Operations.html</a>
</p>
</div>
|