blob: e273fcdab4163ce0599e54aaf4ad9c7d9ed5e1d7 (
plain)
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
|
<?xml version="1.0" encoding="UTF-8"?>
<helpdocument version="1.0">
<!--
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
-->
<meta>
<topic id="rounddown_function" indexer="include" status="PUBLISH">
<title id="tit" xml-lang="en-US">ROUNDDOWN function</title>
<filename>/text/scalc/01/func_rounddown.xhp</filename>
</topic>
</meta>
<body>
<bookmark xml-lang="en-US" branch="index" id="bm_id3156384">
<bookmark_value>ROUNDDOWN function</bookmark_value>
<bookmark_value>numbers;rounding down</bookmark_value>
</bookmark>
<bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_ABRUNDEN" id="bm_id3146003" localize="false"/>
<h1 id="hd_id601641846107898"><variable id="rounddown_h1"><link href="text/scalc/01/func_rounddown.xhp">ROUNDDOWN function</link></variable></h1>
<section id="rounddown_desc">
<paragraph role="paragraph" id="par_id841641927277474">Rounds down a number while keeping a specified number of decimal digits.</paragraph>
</section>
<paragraph role="paragraph" id="par_id701642530512560">This function is equivalent to the <link href="text/scalc/01/func_trunc.xhp">TRUNC function</link>.</paragraph>
<embed href="text/scalc/01/func_trunc.xhp#trunc_tip"/>
<embed href="text/scalc/01/ful_func.xhp#func_head_syntax"/>
<paragraph role="paragraph" id="par_id341641927560587">
<input>ROUNDDOWN(Number [; Count])</input>
</paragraph>
<section id="rounddown_parameters">
<paragraph role="paragraph" id="par_id11641927688319"><emph>Number:</emph> The number to be rounded down.</paragraph>
<paragraph role="paragraph" id="par_id861641927715672"><emph>Count:</emph> Optional parameter that defines the number of decimal places to be kept. The default value is 0 (zero).</paragraph>
<paragraph role="paragraph" id="par_id911641928545976">Use negative values for <emph>Count</emph> to round the integer part of the original <emph>Number</emph>. For example, -1 will round down the first integer number before the decimal separator, -2 will round down the two integer numbers before the decimal separator, and so forth.</paragraph>
</section>
<note id="par_id181641929609906">In %PRODUCTNAME, the <emph>Count</emph> parameter is optional, whereas in Microsoft Excel this parameter is mandatory. When an ODS file contains a call to ROUNDDOWN without the <emph>Count</emph> parameter and the file is exported to XLS or XLSX formats, the missing argument will automatically be added with value zero to maintain compatibility.</note>
<embed href="text/scalc/01/ful_func.xhp#func_head_example"/>
<paragraph role="paragraph" id="par_id901641928192870"><input>=ROUNDDOWN(21.89)</input> returns 21. Note that this example uses the default value for <emph>Count</emph> which is 0.</paragraph>
<paragraph role="paragraph" id="par_id901641928192110"><input>=ROUNDDOWN(103.37,1)</input> returns 103.3.</paragraph>
<paragraph role="paragraph" id="par_id171641928456743"><input>=ROUNDDOWN(0.664,2)</input> returns 0.66.</paragraph>
<paragraph role="paragraph" id="par_id641641928712287"><input>=ROUNDDOWN(214.2,-1)</input> returns 210. Note the negative value for <emph>Count</emph>, which causes the first integer value before the decimal separator to be rounded towards zero.</paragraph>
<section id="relatedtopics">
<tip id="par_id161677014850199"><link href="https://wiki.documentfoundation.org/Documentation/Calc_Functions/ROUNDDOWN">ROUNDDOWN wiki page</link>.</tip>
<embed href="text/scalc/01/func_trunc.xhp#trunc_h1"/>
<embed href="text/scalc/01/04060106.xhp#math_functions_h1"/>
</section>
</body>
</helpdocument>
|