Average Error: 0.0 → 0.0
Time: 3.8s
Precision: 64
\[500.0 \cdot \left(x - y\right)\]
\[\left(-y\right) \cdot 500.0 + 500.0 \cdot x\]
500.0 \cdot \left(x - y\right)
\left(-y\right) \cdot 500.0 + 500.0 \cdot x
double f(double x, double y) {
        double r5064852 = 500.0;
        double r5064853 = x;
        double r5064854 = y;
        double r5064855 = r5064853 - r5064854;
        double r5064856 = r5064852 * r5064855;
        return r5064856;
}

double f(double x, double y) {
        double r5064857 = y;
        double r5064858 = -r5064857;
        double r5064859 = 500.0;
        double r5064860 = r5064858 * r5064859;
        double r5064861 = x;
        double r5064862 = r5064859 * r5064861;
        double r5064863 = r5064860 + r5064862;
        return r5064863;
}

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.0 \cdot \left(x - y\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.0

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

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

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

Reproduce

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