Average Error: 0.0 → 0.0
Time: 13.6s
Precision: 64
\[200 \cdot \left(x - y\right)\]
\[\mathsf{fma}\left(x, 200, \left(-y\right) \cdot 200\right)\]
200 \cdot \left(x - y\right)
\mathsf{fma}\left(x, 200, \left(-y\right) \cdot 200\right)
double f(double x, double y) {
        double r13244526 = 200.0;
        double r13244527 = x;
        double r13244528 = y;
        double r13244529 = r13244527 - r13244528;
        double r13244530 = r13244526 * r13244529;
        return r13244530;
}

double f(double x, double y) {
        double r13244531 = x;
        double r13244532 = 200.0;
        double r13244533 = y;
        double r13244534 = -r13244533;
        double r13244535 = r13244534 * r13244532;
        double r13244536 = fma(r13244531, r13244532, r13244535);
        return r13244536;
}

Error

Bits error versus x

Bits error versus y

Derivation

  1. Initial program 0.0

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

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

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

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

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

Reproduce

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