2.5.4.16 Ceiling

The Ceiling function performs a ceiling calculation.

ABNF:

 Ceiling = val [val] sp ("1" / "2") ";CEILING():129"

Required Arguments:

Name: Number

Type: vDouble

An argument that specifies the value to be rounded.

Optional Arguments:

Name: Multiple

Type: vDouble

An argument that specifies the rounding increment. The default value is 1 if Number is greater than or equal to 0, and -1 if Number is less than 0.

Return Value:

Type: vNum, PtgErr

This function returns a vNum containing the next multiple of Multiple after Number that is further from zero. If Number is a multiple of Multiple, the value is equal to Number. If Number is equal to zero or Multiple is equal to zero, the value is zero. The unit of the return value is equal to the unit of Number. If Number and Multiple do not have the same sign, the function returns a PtgErr with an error code of #NUM!.