View comments | RSS feed

Ceiling

Description

Determines the closest integer that is greater than a specified number.

Returns

The closest integer that is greater than a given number.

Category

Mathematical functions

Function syntax

Ceiling(number)

See also

Int, Fix, Round

Parameters

Parameter Description

number

A real number

Example

<h3>Ceiling Example</h3>

<cfoutput>
<p>The ceiling of 3.4 is #ceiling(3.4)#
<p>The ceiling of 3 is #ceiling(3)#
<p>The ceiling of 3.8 is #ceiling(3.8)#
<p>The ceiling of -4.2 is #ceiling(-4.2)#
</cfoutput>


ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | KnowledgeBase | Bug Reporting

Version 7

Comments


barneyb said on May 11, 2005 at 1:07 PM :
This should say it returns the "smallest integer greater than or equal to a given number", which is subtly different than what currently is listed. It should also indicate the 'int' is the complementary operation.
JohnEric said on Jun 16, 2008 at 9:07 AM :
No, the wording is actually correct, even if the notion of the function goes against the generally accepted definition of the ceiling function.


ceiling(1.1) = 2
ceiling(1.8) = 2
ceiling(2) = 3

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/7/htmldocs/00000414.htm