Left here for archival purposes.

User avatar
By amelia
#38872 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
User avatar
By TerryE
#39212 It's not rounding, just truncating towards minus infinity. This way the remainder is a positive integer

-24 * 10000 + 5433 = -234567