Important

   

This documentation space contains information about PATROL Agents when deployed in a TrueSight Operations Management environment. If you are a BMC Helix Operations Management user, see PATROL Agent 22.1 for BMC Helix Operations Management. Open link

ceil()

Return the smallest integer that is not less than the argument.

Syntax

ceil( arg )

Parameters

Parameter

Definition

arg

numeric argument whose least integer upper bound is to be determined

Description

The ceil() function returns the smallest integer that is not less than arg, that is, the least integer upper bound for arg

The ceil() function and the floor() function together bracket arg such that the following are true: 

If arg is an integer, ceil( arg ) = arg = floor( arg ) 

If arg is not an integer: floor( arg ) < arg < ceil( arg ) and ceil( arg ) = floor( arg ) + 1

Example

The following example shows how to use the ceil() function:

any_float = 8.4;
ceil_any_float = ceil(any_float);
printf("Ceiling of %f is %d\n",any_float,ceil_any_float);
Was this page helpful? Yes No Submitting... Thank you

Comments