Average Error: 0.0 → 0
Time: 559.0ms
Precision: 64
\[x \cdot 116 - 16\]
\[\mathsf{fma}\left(x, 116, -16\right)\]
x \cdot 116 - 16
\mathsf{fma}\left(x, 116, -16\right)
double f(double x) {
        double r202055 = x;
        double r202056 = 116.0;
        double r202057 = r202055 * r202056;
        double r202058 = 16.0;
        double r202059 = r202057 - r202058;
        return r202059;
}

double f(double x) {
        double r202060 = x;
        double r202061 = 116.0;
        double r202062 = 16.0;
        double r202063 = -r202062;
        double r202064 = fma(r202060, r202061, r202063);
        return r202064;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[x \cdot 116 - 16\]
  2. Using strategy rm
  3. Applied fma-neg0

    \[\leadsto \color{blue}{\mathsf{fma}\left(x, 116, -16\right)}\]
  4. Final simplification0

    \[\leadsto \mathsf{fma}\left(x, 116, -16\right)\]

Reproduce

herbie shell --seed 2020001 +o rules:numerics
(FPCore (x)
  :name "Data.Colour.CIE:lightness from colour-2.3.3"
  :precision binary64
  (- (* x 116) 16))