Average Error: 0.0 → 0.0
Time: 17.2s
Precision: 64
\[500 \cdot \left(x - y\right)\]
\[500 \cdot \left(-y\right) + x \cdot 500\]
500 \cdot \left(x - y\right)
500 \cdot \left(-y\right) + x \cdot 500
double f(double x, double y) {
        double r13767562 = 500.0;
        double r13767563 = x;
        double r13767564 = y;
        double r13767565 = r13767563 - r13767564;
        double r13767566 = r13767562 * r13767565;
        return r13767566;
}

double f(double x, double y) {
        double r13767567 = 500.0;
        double r13767568 = y;
        double r13767569 = -r13767568;
        double r13767570 = r13767567 * r13767569;
        double r13767571 = x;
        double r13767572 = r13767571 * r13767567;
        double r13767573 = r13767570 + r13767572;
        return r13767573;
}

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 \cdot \left(x - y\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.0

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

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

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

Reproduce

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