From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- helpcontent2/source/text/scalc/01/func_trunc.xhp | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 helpcontent2/source/text/scalc/01/func_trunc.xhp (limited to 'helpcontent2/source/text/scalc/01/func_trunc.xhp') diff --git a/helpcontent2/source/text/scalc/01/func_trunc.xhp b/helpcontent2/source/text/scalc/01/func_trunc.xhp new file mode 100644 index 000000000..22b58a278 --- /dev/null +++ b/helpcontent2/source/text/scalc/01/func_trunc.xhp @@ -0,0 +1,54 @@ + + + + + + + TRUNC function + /text/scalc/01/func_trunc.xhp + + + + + + TRUNC function + decimal places;cutting off + numbers;truncate + + +

TRUNC function

+
+ Truncates a number while keeping a specified number of decimal digits. +
+ This function is equivalent to the ROUNDDOWN function. +
+ The rounding method used by this function is known as rounding towards zero. The resulting number will always be smaller than or equal to the original number. +
+ + + TRUNC(Number [; Count]) + +
+ Number: The number to be truncated. + Count: Optional parameter that defines the number of decimal places to be kept. The default value is 0 (zero). + Use negative values for Count to round the integer part of the original Number. 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. +
+ + =TRUNC(21.89) returns 21. Note that this example uses the default value for Count which is 0. + =TRUNC(103.37,1) returns 103.3. + =TRUNC(0.664,2) returns 0.66. + =TRUNC(214.2,-1) returns 210. Note the negative value for Count, which causes the first integer value before the decimal separator to be rounded towards zero. + +
+ + +
+ +
-- cgit v1.2.3