Average Error: 0.0 → 0.0
Time: 4.8s
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 r155959 = 500.0;
        double r155960 = x;
        double r155961 = y;
        double r155962 = r155960 - r155961;
        double r155963 = r155959 * r155962;
        return r155963;
}

double f(double x, double y) {
        double r155964 = x;
        double r155965 = y;
        double r155966 = r155964 - r155965;
        double r155967 = 500.0;
        double r155968 = r155966 * r155967;
        return r155968;
}

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. Using strategy rm
  3. Applied sub-neg0.0

    \[\leadsto 500 \cdot \color{blue}{\left(x + \left(-y\right)\right)}\]
  4. Applied distribute-lft-in0.0

    \[\leadsto \color{blue}{500 \cdot x + 500 \cdot \left(-y\right)}\]
  5. Final simplification0.0

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

Reproduce

herbie shell --seed 2019291 
(FPCore (x y)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, B"
  :precision binary64
  (* 500 (- x y)))