-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Description
The documentation for @round states
Rounds the given floating point number to an integer, away from zero. Uses a dedicated hardware instruction when available.
This language implies that is an exact opposite of @trunc which states:
Rounds the given floating point number to an integer, towards zero. Uses a dedicated hardware instruction when available.
But this is not the case. The actual rounding mode being used by @round is rounding to the nearest integer with "round half away from zero" as a tiebreaker.
https://en.wikipedia.org/wiki/Rounding#Round_half_away_from_zero
Reactions are currently unavailable