Average Error: 0.0 → 0.0
Time: 14.5s
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 r247513 = 500.0;
        double r247514 = x;
        double r247515 = y;
        double r247516 = r247514 - r247515;
        double r247517 = r247513 * r247516;
        return r247517;
}

double f(double x, double y) {
        double r247518 = x;
        double r247519 = y;
        double r247520 = r247518 - r247519;
        double r247521 = 500.0;
        double r247522 = r247520 * r247521;
        return r247522;
}

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