SAXONICA |
fn:round-half-to-even(numeric? $srcval) → numeric?
Function signature
$srcval |
numeric ? |
Result |
numeric ? |
Rounds a numeric value to the nearest whole number, rounding x.5 towards the nearest even number.
fn:round-half-to-even(numeric? $srcval, integer $precision) → numeric?
Function signature
$srcval |
numeric ? |
$precision |
xs:integer |
Result |
numeric ? |
Rounds a numeric value to the nearest integer multiple of 10 the power of minus precision, rounding x.5 towards the nearest number whose last digit is even.
Note:In the case of doubles and floats, rounding errors may occur giving unexpected effects.