Ceil - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

Trunc

truncate a number to the next nearest integer multiple of a given real number

Round

round a number to the nearest integer multiple of a given real number

Floor

greatest integer multiple less than or equal to a  given number

Ceil

smallest integer multiple greater than or equal to a given number

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Trunc(x, alpha)

Round(x, alpha)

Floor(x, alpha)

Ceil(x, alpha)

Parameters

x

-

any expression

alpha

-

a nonzero real number

Description

• 

These functions compute integer multiples of alpha near to x

– 

Floor returns the greatest integer multiple of x less than or equal to alpha

– 

Ceil returns the least integer multiple of x greater than or equal to alpha

– 

Round returns the integer multiple of alpha nearest to x

– 

Trunc returns truncxα·α, i.e. whichever of the Floor or Ceil that is closer to 0.

• 

All these functions call their lowercase name equivalents on xα and so behave the same for nonreal, and nonconstant values of x. See trunc for those details.

Examples

A common use case is to find a nearest multiple of 1000 to round to 3 digits e.g.

Trunc75341,1000

75000

(1)

Ceil75341,1000

76000

(2)

Trunc75341,1000

−75000

(3)

Floor75341,1000

−76000

(4)

Floor75341,1000

−76000

(5)

The second argument α does not have to be an integer; we can round to the nearest multiple of π or any real constant.

Round11.1,π

4π

(6)

Floorsqrt3,π4

π2

(7)

Another application is doing unit conversions with rounding.

Ceil14Unitm,Unitinches

552in

(8)

These commands support a symbolic first argument, but the second argument must be a nonzero real constant.

Floorx,10

10x10

(9)

Floorx,10

10x10

(10)

Floor10,x

Error, (in Floor) invalid input: 2nd argument, alpha, expected to be a real number with or without a unit but received, x

Compatibility

• 

The Trunc, Round, Floor and Ceil commands were introduced in Maple 2025.

• 

For more information on Maple 2025 changes, see Updates in Maple 2025.

See Also

trunc, round, floor, and ceil

 


Download Help Document