Make money doing the work you believe in

Rounding to Odd: a simple and useful non standard (yet!) rounding mode

You might know the standard IEEE-754 (2019) binary rounding modes:

  • round to nearest, ties to even

  • round to nearest, ties to away

  • round toward positive

  • round toward negative

  • round toward zero

But do you know about round toward odd / round to odd?

This rounding mode jams any bit that fall outside of the significand range (round and sticky bits) into the LSB of the result significand.

It does not require an incrementer and can be implemented by a simple OR reduction.

It offers nice numerical property, in particular to avoid the double rounding problem when converting from a large to a small format through the use of an intermediary mid-sized format (e.g. when converting from fp64 to fp16 by performing a first conversion from fp64 to fp32, you want to use round to odd for this conversion, before performing the final fp32 to fp16 conversion using you desired rounding mode).

May 31
at
3:49 PM
Relevant people

Log in or sign up

Join the most interesting and insightful discussions.