Average Error: 0.0 → 0.0
Time: 31.7s
Precision: 64
\[200.0 \cdot \left(x - y\right)\]
\[\mathsf{fma}\left(200.0, x, \left(-y\right) \cdot 200.0\right)\]
200.0 \cdot \left(x - y\right)
\mathsf{fma}\left(200.0, x, \left(-y\right) \cdot 200.0\right)
double f(double x, double y) {
        double r10727540 = 200.0;
        double r10727541 = x;
        double r10727542 = y;
        double r10727543 = r10727541 - r10727542;
        double r10727544 = r10727540 * r10727543;
        return r10727544;
}

double f(double x, double y) {
        double r10727545 = 200.0;
        double r10727546 = x;
        double r10727547 = y;
        double r10727548 = -r10727547;
        double r10727549 = r10727548 * r10727545;
        double r10727550 = fma(r10727545, r10727546, r10727549);
        return r10727550;
}

Error

Bits error versus x

Bits error versus y

Derivation

  1. Initial program 0.0

    \[200.0 \cdot \left(x - y\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto 200.0 \cdot \color{blue}{\left(x + \left(-y\right)\right)}\]
  4. Applied distribute-lft-in0.0

    \[\leadsto \color{blue}{200.0 \cdot x + 200.0 \cdot \left(-y\right)}\]
  5. Using strategy rm
  6. Applied fma-def0.0

    \[\leadsto \color{blue}{\mathsf{fma}\left(200.0, x, 200.0 \cdot \left(-y\right)\right)}\]
  7. Final simplification0.0

    \[\leadsto \mathsf{fma}\left(200.0, x, \left(-y\right) \cdot 200.0\right)\]

Reproduce

herbie shell --seed 2019165 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, C"
  (* 200.0 (- x y)))