Average Error: 0.0 → 0.0
Time: 10.4s
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 r249690 = 500.0;
        double r249691 = x;
        double r249692 = y;
        double r249693 = r249691 - r249692;
        double r249694 = r249690 * r249693;
        return r249694;
}

double f(double x, double y) {
        double r249695 = x;
        double r249696 = y;
        double r249697 = r249695 - r249696;
        double r249698 = 500.0;
        double r249699 = r249697 * r249698;
        return r249699;
}

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)))