Fish Touching🐟🎣

Floating Point Rounding

Apr 3, 2023

Rounding - Wikipedia

The IEEE floating-point format defines four different rounding modes.

# Round-to-even (round-to-nearest)

# Round-toward-zero

Round-toward-zero mode rounds positive numbers downward and negative numbers upward
giving $|\hat{x}| \leq |x|$

# Round-down

Round-down mode rounds both positive and negative numbers downward
giving $x^- \leq x$

# Round-up

Round-up mode rounds both positive and negative numbers upward
giving $x^+ \geq x$

# Example