4

floor and ceil, because in every language they are called differently, and, what's worse, they work differently

Comments
  • 5
    they work differently? what do you mean?
  • 1
    They round down or up to the nearest integer in every language I've used...
  • 0
    @AlmondSauce try doing that with a negative number, it may be rounded up or down depending on the language
  • 0
    @LotsOfCaffeine try doing it with a negative number, it may be rounded up or down depending on the language
  • 1
    @basedtho What language do you think it’s behaving in a different way with negative values?
  • 0
    @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
Add Comment