Page 1 of 1

CEIL, FLOOR and INT

Posted: Thu Dec 05, 2013 10:41 am
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

Re: CEIL, FLOOR and INT

Posted: Thu Dec 05, 2013 5:48 pm
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