3.5.1.1.2 Ceil


Description

Minimum Origin Version Required: 2019 SR0

This function returns a value by adjusting the given value x away from 0 and to the multiple of sig nearest to x. That is,

  • if x > 0 and sig > 0, returns a value rounded up away from 0.
  • if x > 0 and sig < 0, returns missing.
  • if x < 0 and sig > 0, returns a value rounded up towards 0.
  • if x < 0 and sig < 0, returns a value rounded down away from 0.
  • if sig = 0, returns 0.


Syntax

double Ceil( double x[, double sig])

Parameters

x

can be any real number.

sig

Optional. can be any real number. If significance is not specified, default value 1 is used.

Return

Returns a value (or dataset) adjusting x away from 0 and to the multiple of sig nearest to x.

Example

ceil(2.9714, 2)=;     // ANS: ceil(2.9714, 2)=4
ceil(2.9714)=;        // ANS: ceil(2.9714)=3
ceil(-2.9714, -2)=;   // ANS: ceil(-2.9714, -2)=-4
ceil(-2.9714, 2)=;    // ANS: ceil(-2.9714, 2)=-2

See Also

Floor