Dutchman
Posts: 851 Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag:
Post
by Dutchman » Thu Dec 05, 2013 10:41 am
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:
Post
by Dalede » Thu Dec 05, 2013 5:48 pm
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