Average Error: 0.0 → 0.0
Time: 12.3s
Precision: 64
\[200.0 \cdot \left(x - y\right)\]
\[200.0 \cdot \left(-y\right) + x \cdot 200.0\]
200.0 \cdot \left(x - y\right)
200.0 \cdot \left(-y\right) + x \cdot 200.0
double f(double x, double y) {
        double r13287430 = 200.0;
        double r13287431 = x;
        double r13287432 = y;
        double r13287433 = r13287431 - r13287432;
        double r13287434 = r13287430 * r13287433;
        return r13287434;
}

double f(double x, double y) {
        double r13287435 = 200.0;
        double r13287436 = y;
        double r13287437 = -r13287436;
        double r13287438 = r13287435 * r13287437;
        double r13287439 = x;
        double r13287440 = r13287439 * r13287435;
        double r13287441 = r13287438 + r13287440;
        return r13287441;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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-rgt-in0.0

    \[\leadsto \color{blue}{x \cdot 200.0 + \left(-y\right) \cdot 200.0}\]
  5. Final simplification0.0

    \[\leadsto 200.0 \cdot \left(-y\right) + x \cdot 200.0\]

Reproduce

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