Rounding strategy of the 'round' function
Rounding strategy of the 'round' function
От:
Rudolph Froger <rudolphfroger@dreamsolution.nl>
Дата:
Hi, The 'round' mathematical function documentation doesn't specify its rounding strategy. If this would be documented then users can rely on its rounding behavior. For double precision the rounding probably depends on your platform. For numeric the function seems to round to nearest with ties going away from zero (sometimes referred to as "round half up). 6.5 -> 7.0 and -6.5 -> -7.0. https://www.postgresql.org/docs/current/functions-math.html Kind regards, Rudolph