CEIL, FLOOR and INT

Post Reply
User avatar
Dutchman
Posts: 851
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

CEIL, FLOOR and INT

Post by Dutchman »

It was not clear to me wether 'less then' and 'greater then' included the sign.
Therefore I made the following examples on CEIL, FLOOR and INT
CEIL(-1.8)=-1 FLOOR(-1.8)=-2 INT(-1.8)=-2
CEIL(-1.2)=-1 FLOOR(-1.2)=-2 INT(-1.2)=-1
CEIL(-0.6)=-0 FLOOR(-0.6)=-1 INT(-0.6)=-1
CEIL( 0.6)= 1 FLOOR( 0.6)= 0 INT( 0.6)= 1
CEIL( 1.2)= 2 FLOOR( 1.2)= 1 INT( 1.2)= 1
CEIL( 1.8)= 2 FLOOR( 1.8)= 1 INT( 1.8)= 2
INT(-1.5)=-2 INT( 1.5)= 2

Dalede
Posts: 131
Joined: Fri Dec 28, 2012 4:00 pm
Location: Grass Valley, CA, USA
Contact:

Re: CEIL, FLOOR and INT

Post by Dalede »

Those examples seem ok to me. Floor and Ceiling should remain in the same direction no matter what the sign is.
Less than (floor) means smaller and greater than (Ceil) means larger. Thus the answers in your example bear this out.

-2, -1, 0, 1, 2
> > > > > > > greater than

Dale

Post Reply