Truncate a Number
Truncates a decimal number to a specified precision without rounding.
Overview
This procedure removes digits from a decimal number beyond a specified number of decimal places, effectively shortening the number without rounding it up or down. If no precision is provided, the number is truncated to an integer (zero decimal places).
Syntax
Below is a line-by-line overview of the automation syntax. Expand each line to learn more.
Examples
1. Truncate a Number (No Specified Precision)
the number 123.0
2. Truncate a Number with Precision 3
the number 123.456
3. Truncate a Number with Precision 0
the number 3.0
4. Truncate a Negative Decimal
the number -3.141
5. Truncate a Number (Alternative Syntax)
the number 123.45
Last updated
Was this helpful?
