Average Error: 0.0 → 0.0
Time: 6.0s
Precision: 64
\[500.0 \cdot \left(x - y\right)\]
\[\left(x - y\right) \cdot 500.0\]
500.0 \cdot \left(x - y\right)
\left(x - y\right) \cdot 500.0
double f(double x, double y) {
        double r10781128 = 500.0;
        double r10781129 = x;
        double r10781130 = y;
        double r10781131 = r10781129 - r10781130;
        double r10781132 = r10781128 * r10781131;
        return r10781132;
}

double f(double x, double y) {
        double r10781133 = x;
        double r10781134 = y;
        double r10781135 = r10781133 - r10781134;
        double r10781136 = 500.0;
        double r10781137 = r10781135 * r10781136;
        return r10781137;
}

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.0 \cdot \left(x - y\right)\]
  2. Final simplification0.0

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

Reproduce

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