Loading...
Searching...
No Matches
For

A set of rounding algorithms for scaled integrals.

Template Parameters

  T | The integral type.
  Scaling | The scaling factor.

emulating fixed point of two decimal places we could use a scaling factor of '100'. To round the result of scaled int calculations using 'Banker's Rounding' we would define this.

int final_result = round_half_even_unscaled<100>(accumulated_result);

For