Average Error: 0.0 → 0
Time: 583.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 r247572 = x;
        double r247573 = 116.0;
        double r247574 = r247572 * r247573;
        double r247575 = 16.0;
        double r247576 = r247574 - r247575;
        return r247576;
}

double f(double x) {
        double r247577 = x;
        double r247578 = 116.0;
        double r247579 = 16.0;
        double r247580 = -r247579;
        double r247581 = fma(r247577, r247578, r247580);
        return r247581;
}

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 2019356 +o rules:numerics
(FPCore (x)
  :name "Data.Colour.CIE:lightness from colour-2.3.3"
  :precision binary64
  (- (* x 116) 16))