Average Error: 0.0 → 0.0
Time: 11.1s
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 r176856 = 500.0;
        double r176857 = x;
        double r176858 = y;
        double r176859 = r176857 - r176858;
        double r176860 = r176856 * r176859;
        return r176860;
}

double f(double x, double y) {
        double r176861 = x;
        double r176862 = y;
        double r176863 = r176861 - r176862;
        double r176864 = 500.0;
        double r176865 = r176863 * r176864;
        return r176865;
}

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