Difference between revisions of "Documentation/How Tos/Calc: TRUNC function"
From Apache OpenOffice Wiki
< Documentation | How Tos
Javier Lopez (Talk | contribs) |
Javier Lopez (Talk | contribs) |
||
Line 31: | Line 31: | ||
* [[Documentation/How_Tos/Calc:_ACOTH_function|<div style="font-size: 120%;">Acoth]] | * [[Documentation/How_Tos/Calc:_ACOTH_function|<div style="font-size: 120%;">Acoth]] | ||
* [[Documentation/How_Tos/Calc:_ASINH_function|<div style="font-size: 120%;">Asinh]] | * [[Documentation/How_Tos/Calc:_ASINH_function|<div style="font-size: 120%;">Asinh]] | ||
− | * [[Documentation/How_Tos/Calc:_ATANH_function<div style="font-size: 120%;">|Atanh]] | + | * [[Documentation/How_Tos/Calc:_ATANH_function|<div style="font-size: 120%;">|Atanh]] |
<div style="font-size: 140%; border-style: outset outset outset none; border-color:#DCE9FC;">Rounding and remainders</div> | <div style="font-size: 140%; border-style: outset outset outset none; border-color:#DCE9FC;">Rounding and remainders</div> |
Revision as of 07:36, 1 June 2013
CALC FUNCTIONS
- Mathematical FunctionsTrigonometric
- CosSinTanCotAcosAcotAsinAtanAtan2DegreesRadiansPiHyperbolic
- CoshSinhTanhCothAcoshAcothAsinh|AtanhRounding and remainders
- TruncRoundRounddownRoundupCeilingFloorEvenOddMroundIntQuotientModLogarithm/Powers
- ExpPowerLogLnLog10Bessel functions
- BesseliBesseljBesselkBesselyMiscellaneous
- AbsCombinCombinaConvertConvert AddCountblankCountifDeltaErfErfcFactFactdoubleGcdGcd AddGestepIsevenIsoddLcmLcm AddMultinomialProductRandRandbetweenSeriessumSignSqrtSqrtpiSubtotal
Contents
TRUNC
Truncates a number by removing decimal places.
Syntax:
TRUNC(number; places)
- returns number with at most places decimal places. Excess decimal places are simply removed, irrespective of sign.
- TRUNC(number; 0) behaves as INT(number) for positive numbers, but effectively rounds towards zero for negative numbers.
Example:
TRUNC(1.239; 2)
- returns 1.23. The 9 is lost.
TRUNC(-1.234999; 3)
- returns -1.234. All the 9s are lost.
If these examples do not seem to work, see Tools - Options - OpenOffice.org Calc - Calculate to check the display precision.
Template:Documentation/SeeAlso
-