2.3:: after addition of 0.5:: 2.8 ::and after shortint casting:: 2
2.5:: after addition of 0.5:: 3 ::and after shortint casting:: 2
2.51:: after addition of 0.5:: 3.01 ::and after shortint casting:: 3
3:: after addition of 0.5:: 3.5 ::and after shortint casting:: 3
Check the second value, after the addition of 0.5 , the value is already is 3, then when I cast it to floor, it is decremented to 2. Should it be like it ?
I expected to remain at 2 even after the floor() call.
2.29999999999999982236 :: after addition of 0.5 :: 2.79999999999999982236
and after shortint casting:: 2
2.49999999000000006077 :: after addition of 0.5 :: 2.99999999000000006077
and after shortint casting:: 2
2.50999999999999978684 :: after addition of 0.5 :: 3.00999999999999978684
and after shortint casting:: 3
2.99999999989999999173 :: after addition of 0.5 :: 3.49999999989999999173
and after shortint casting:: 3