Average Error: 0.0 → 0.0
Time: 6.4s
Precision: 64
\[500.0 \cdot \left(x - y\right)\]
\[500.0 \cdot \left(-y\right) + x \cdot 500.0\]
500.0 \cdot \left(x - y\right)
500.0 \cdot \left(-y\right) + x \cdot 500.0
double f(double x, double y) {
        double r12692520 = 500.0;
        double r12692521 = x;
        double r12692522 = y;
        double r12692523 = r12692521 - r12692522;
        double r12692524 = r12692520 * r12692523;
        return r12692524;
}

double f(double x, double y) {
        double r12692525 = 500.0;
        double r12692526 = y;
        double r12692527 = -r12692526;
        double r12692528 = r12692525 * r12692527;
        double r12692529 = x;
        double r12692530 = r12692529 * r12692525;
        double r12692531 = r12692528 + r12692530;
        return r12692531;
}

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

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

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

Reproduce

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