function

ceil . math . sncode

VERSIONlatest Smallest integral value not less than argument

CEIL

NAME

ceil - Smallest integral value not less than argument

SYNOPSIS

ceil(var);

DESCRIPTION

This function rounds the variable up to the nearest integer. It is replacing the value by an approximately equal but greater value. It returns the greatest integer possible. If var is a string, then the string is converted to a double. If var is a complex object, all items within the object are returned as absolute values. A deep copy of the object is returned.

EXAMPLES

Note: In the followings examples, the _ between the { should be removed to make it work.

res={_{ceil(2.5); }}. return res=3.
res={_{ceil(-2.5); }}. return res=-2.
res={_{a=[-2, 2, 2.5, { x : -2.5 } ]; ceil(a); a;}}. return res=[-2,2,3,{"x":-2}][-2,2,2.5,{"x":-2.5}].

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>