Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
basedtho204y@AlmondSauce try doing that with a negative number, it may be rounded up or down depending on the language
-
basedtho204y@LotsOfCaffeine try doing it with a negative number, it may be rounded up or down depending on the language
-
@basedtho What language do you think it’s behaving in a different way with negative values?
-
basedtho204y@AmyShackles according to this
https://stackoverflow.com/a/...
>Rounding half to the nearest integers always has to break the tie somehow, and different programming languages don't always agree on how to do this
yeah, should have said rounding. not necessarily floor or ceil. i can't come up with a concrete example, sorry, it was too long ago
Related Rants
-
justamuslimguy20All the stupid date functions where the days range from 1 to 31 but the months range from 0 to 11
-
sudo-woodo16Whatever the fuck Python's ternary operator syntax is supposed to be.
-
Root18Most hated language features? PL/SQL: • it exists XSLT: • it also exists PHP: • it still exists. VB:...
floor and ceil, because in every language they are called differently, and, what's worse, they work differently
devrant
wk229