Skip to main content

Module rounding

Module rounding 

Source
Expand description

Java-compatible floating-point rounding

Functions§

round_f32
Rounds ties toward positive infinity, unlike f32::round, which rounds them away from zero. Uses the JDK’s IEEE 754 bit-shift implementation of Math.round(float), including saturation and NaN handling, without rounding up values just below a half-integer