message: Rework round again: perform old computation instead of manual loop, but simply return unrounded value if the result is nan or inf
diff: @@ -106,17 +106,12 @@ struct RoundOperator {
  if (precision < 0) {
  precision = 0;
  }
  - TA modifier = 1;
  - for(TB i = 0; i < precision; i++) {
  - TA next = input * 10;
  - TA next_modifier = modifier * 10;
  - if (std::isinf(next) || std::isinf(next_modifier)) {
  + double modifier = pow(10, precision);
  + double rounded_value = (round(input * modifier)) / modifier;
  + if (std::isinf(rounded_value) || std::isnan(rounded_value)) {
  return input;
  }
  - modifier = next_modifier;
  - input = next;
  - }
  - return round(input) / modifier;
  + return rounded_value;
  }
  };
  