Average Error: 0.0 → 0.0
Time: 5.0s
Precision: 64
\[500 \cdot \left(x - y\right)\]
\[\left(-y\right) \cdot 500 + 500 \cdot x\]
500 \cdot \left(x - y\right)
\left(-y\right) \cdot 500 + 500 \cdot x
double f(double x, double y) {
        double r12121958 = 500.0;
        double r12121959 = x;
        double r12121960 = y;
        double r12121961 = r12121959 - r12121960;
        double r12121962 = r12121958 * r12121961;
        return r12121962;
}

double f(double x, double y) {
        double r12121963 = y;
        double r12121964 = -r12121963;
        double r12121965 = 500.0;
        double r12121966 = r12121964 * r12121965;
        double r12121967 = x;
        double r12121968 = r12121965 * r12121967;
        double r12121969 = r12121966 + r12121968;
        return r12121969;
}

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(-y\right) \cdot 500 + 500 \cdot x\]

Reproduce

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