Average Error: 0.0 → 0.0
Time: 8.2s
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 r13553169 = 500.0;
        double r13553170 = x;
        double r13553171 = y;
        double r13553172 = r13553170 - r13553171;
        double r13553173 = r13553169 * r13553172;
        return r13553173;
}

double f(double x, double y) {
        double r13553174 = x;
        double r13553175 = y;
        double r13553176 = r13553174 - r13553175;
        double r13553177 = 500.0;
        double r13553178 = r13553176 * r13553177;
        return r13553178;
}

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. Final simplification0.0

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

Reproduce

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