Floor, Ceiling, and Round
Floor, Ceiling, and Round
Move the sliders to plot the cubic equation , then pick one of the three functions.
a+b+cx+d
3
x
2
x
Floor, or the greatest integer function, gives the greatest integer less than or equal to a given value. Some examples: , , , , and .
floor(3.1)=3
floor(-7.2)=-8
floor(2.5)=2
floor(1.5)=1
floor(5)=5
Round, or the nearest integer function, gives the nearest integer. For an integer and a half, rounding goes to the nearest even number. Some examples: , , , , and .
nint(3.1)=3
nint(-7.2)=-7
nint(2.5)=2
nint(1.5)=2
nint(5)=5
Ceiling, or the least integer function, gives the least integer greater than or equal to a given value. Some examples: , , , , and .
ceiling(3.1)=4
ceiling(-7.2)=-7
ceiling(2.5)=3
ceiling(1.5)=2
ceiling(5)=5