Average Error: 0.0 → 0
Time: 753.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 r219053 = x;
        double r219054 = 116.0;
        double r219055 = r219053 * r219054;
        double r219056 = 16.0;
        double r219057 = r219055 - r219056;
        return r219057;
}

double f(double x) {
        double r219058 = x;
        double r219059 = 116.0;
        double r219060 = 16.0;
        double r219061 = -r219060;
        double r219062 = fma(r219058, r219059, r219061);
        return r219062;
}

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