Average Error: 0.0 → 0.0
Time: 4.6s
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 r163304 = 500.0;
        double r163305 = x;
        double r163306 = y;
        double r163307 = r163305 - r163306;
        double r163308 = r163304 * r163307;
        return r163308;
}

double f(double x, double y) {
        double r163309 = y;
        double r163310 = -r163309;
        double r163311 = 500.0;
        double r163312 = r163310 * r163311;
        double r163313 = x;
        double r163314 = r163311 * r163313;
        double r163315 = r163312 + r163314;
        return r163315;
}

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