Average Error: 0.0 → 0.0
Time: 8.9s
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 r11283846 = 500.0;
        double r11283847 = x;
        double r11283848 = y;
        double r11283849 = r11283847 - r11283848;
        double r11283850 = r11283846 * r11283849;
        return r11283850;
}

double f(double x, double y) {
        double r11283851 = x;
        double r11283852 = y;
        double r11283853 = r11283851 - r11283852;
        double r11283854 = 500.0;
        double r11283855 = r11283853 * r11283854;
        return r11283855;
}

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