Topic: DMD0545 CEILING - Adjust Up to Given Significance |
|
The Round Up to Significance (CEILING) function adjusts the input number up, away from zero, to the nearest multiple of the given significance. The function requires two parameters: the first is the number to adjust, the second is the degree of significance to adjust to.
This function always returns a Real value, so result should be placed in a Real memory location.
Both parameters must be positive, or both be negative. If the signs don't match, the result will be 0 and a Pos / Neg Mismatch math error will be generated. If the second parameter is 0 the result will be 0 and the Divide by Zero math error will be set.
Both parameters are expressions, which can be a numeric constant values, numeric memory locations, arithmetic expression or mathematical functions, or additional expressions up to a maximum of 1024 characters. Expressions can be nested, so use of parentheses is recommended to ensure proper evaluation order. Traditional math precedence rules are used to solve the math expression, so the use of parentheses to remove any ambiguity in the processing order is encouraged.
Refer to the examples below:
|
|
See Also:CEILING - Adjust Up To Significance
FLOOR - Adjust Down To Significance
|
|
Related Topics:
FRAC - Fractional Portion of a Real Number
ROUND - Round Real to Nearest Whole Number
TRUNC - Truncate Real to Whole Number
|
|