Average Error: 0.0 → 0
Time: 567.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 r238532 = x;
        double r238533 = 116.0;
        double r238534 = r238532 * r238533;
        double r238535 = 16.0;
        double r238536 = r238534 - r238535;
        return r238536;
}

double f(double x) {
        double r238537 = x;
        double r238538 = 116.0;
        double r238539 = 16.0;
        double r238540 = -r238539;
        double r238541 = fma(r238537, r238538, r238540);
        return r238541;
}

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))