Negative number integer division
Posted: Fri Jan 15, 2016 11:53 am
My Nodemcu build: nodemcu-master-9-modules-2016-01-09-07-57-31-integer
Positive integer OK: 234567 / 10000 -> 23
Negative integer: -234567 / 10000 -> -24
Why rounding? and only for negative number!
If I want to round, I do it before the division: 234567 + 5555 or -234567 + -5555.
amelia
Positive integer OK: 234567 / 10000 -> 23
Negative integer: -234567 / 10000 -> -24
Why rounding? and only for negative number!
If I want to round, I do it before the division: 234567 + 5555 or -234567 + -5555.
amelia