Average Error: 0.0 → 0.0
Time: 15.0s
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 r9282758 = 500.0;
        double r9282759 = x;
        double r9282760 = y;
        double r9282761 = r9282759 - r9282760;
        double r9282762 = r9282758 * r9282761;
        return r9282762;
}

double f(double x, double y) {
        double r9282763 = x;
        double r9282764 = y;
        double r9282765 = r9282763 - r9282764;
        double r9282766 = 500.0;
        double r9282767 = r9282765 * r9282766;
        return r9282767;
}

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