BloombergLP::bdldfp::DecimalUtil::ceil

Return the smallest integral value that is not less than the specified x.

Synopsis

Declared in <bdldfp_decimalutil.h>

static
Decimal32
ceil(Decimal32 x);

Description

Special value handling: * if x is quiet NaN, quiet NaN is returned. * If x is signaling NaN, quiet NaN is returned and the value of the macro EDOM is stored into errno. * if x is +/-infinity or +/-0, it is returned unmodified.

Examples: ceil(0.5) ==> 1.0; ceil(-0.5) ==> 0.0