Average Error: 0.0 → 0.0
Time: 9.7s
Precision: 64
\[500 \cdot \left(x - y\right)\]
\[\left(x - y\right) \cdot 500\]
500 \cdot \left(x - y\right)
\left(x - y\right) \cdot 500
double f(double x, double y) {
        double r224468 = 500.0;
        double r224469 = x;
        double r224470 = y;
        double r224471 = r224469 - r224470;
        double r224472 = r224468 * r224471;
        return r224472;
}

double f(double x, double y) {
        double r224473 = x;
        double r224474 = y;
        double r224475 = r224473 - r224474;
        double r224476 = 500.0;
        double r224477 = r224475 * r224476;
        return r224477;
}

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. Simplified0.0

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

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

Reproduce

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