+ 2
NEED EXPLICATION PLEASE !!! 🙏🏼🙏🏼🙏🏼
Can somebody please explain me : -15 // 10 = -2.0 ? Can it be that -15 // 10 = -1.5 rounded up in -2.0. ?? If my interpretation is true so why usually it’s rounded down ?? Is it rounded down when the decimal is lesser then 0.5.... ex. if result would have been 1.49 output would have been = -1.0 ??? Thanks in forward for making this more clear for me 🙏🏼🙏🏼 stay safe buddies
5 Réponses
+ 4
Floor division means to round DOWN a number when it's not a whole number.
-1.5 round down to -2 because -2 is LESS than -1.5
In other words, ceiling of -1.5 will be -1 because ceiling is round up.
+ 3
Yes. Because 1 is less than 1.5.
+ 3
okey thx very much for ya explication 🙏🏼 stay safe !!
+ 2
ok... so 1.5 would run down to 1 !
Right ???
+ 2
It is coz I ve understood now ☺️