Average Error: 0.0 → 0.0
Time: 15.1s
Precision: 64
\[500.0 \cdot \left(x - y\right)\]
\[\left(-y\right) \cdot 500.0 + 500.0 \cdot x\]
500.0 \cdot \left(x - y\right)
\left(-y\right) \cdot 500.0 + 500.0 \cdot x
double f(double x, double y) {
        double r16354458 = 500.0;
        double r16354459 = x;
        double r16354460 = y;
        double r16354461 = r16354459 - r16354460;
        double r16354462 = r16354458 * r16354461;
        return r16354462;
}

double f(double x, double y) {
        double r16354463 = y;
        double r16354464 = -r16354463;
        double r16354465 = 500.0;
        double r16354466 = r16354464 * r16354465;
        double r16354467 = x;
        double r16354468 = r16354465 * r16354467;
        double r16354469 = r16354466 + r16354468;
        return r16354469;
}

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

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

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

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

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

Reproduce

herbie shell --seed 2019164 
(FPCore (x y)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, B"
  (* 500.0 (- x y)))