Average Error: 0.0 → 0.0
Time: 9.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 r13045196 = 500.0;
        double r13045197 = x;
        double r13045198 = y;
        double r13045199 = r13045197 - r13045198;
        double r13045200 = r13045196 * r13045199;
        return r13045200;
}

double f(double x, double y) {
        double r13045201 = y;
        double r13045202 = -r13045201;
        double r13045203 = 500.0;
        double r13045204 = r13045202 * r13045203;
        double r13045205 = x;
        double r13045206 = r13045203 * r13045205;
        double r13045207 = r13045204 + r13045206;
        return r13045207;
}

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 2019168 
(FPCore (x y)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, B"
  (* 500.0 (- x y)))