Average Error: 0.0 → 0.0
Time: 4.4s
Precision: 64
\[500 \cdot \left(x - y\right)\]
\[\left(-y\right) \cdot 500 + 500 \cdot x\]
500 \cdot \left(x - y\right)
\left(-y\right) \cdot 500 + 500 \cdot x
double f(double x, double y) {
        double r244004 = 500.0;
        double r244005 = x;
        double r244006 = y;
        double r244007 = r244005 - r244006;
        double r244008 = r244004 * r244007;
        return r244008;
}

double f(double x, double y) {
        double r244009 = y;
        double r244010 = -r244009;
        double r244011 = 500.0;
        double r244012 = r244010 * r244011;
        double r244013 = x;
        double r244014 = r244011 * r244013;
        double r244015 = r244012 + r244014;
        return r244015;
}

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

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

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

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

Reproduce

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