Average Error: 0.0 → 0.0
Time: 11.5s
Precision: 64
\[200.0 \cdot \left(x - y\right)\]
\[\left(-y\right) \cdot 200.0 + 200.0 \cdot x\]
200.0 \cdot \left(x - y\right)
\left(-y\right) \cdot 200.0 + 200.0 \cdot x
double f(double x, double y) {
        double r12160865 = 200.0;
        double r12160866 = x;
        double r12160867 = y;
        double r12160868 = r12160866 - r12160867;
        double r12160869 = r12160865 * r12160868;
        return r12160869;
}

double f(double x, double y) {
        double r12160870 = y;
        double r12160871 = -r12160870;
        double r12160872 = 200.0;
        double r12160873 = r12160871 * r12160872;
        double r12160874 = x;
        double r12160875 = r12160872 * r12160874;
        double r12160876 = r12160873 + r12160875;
        return r12160876;
}

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

    \[200.0 \cdot \left(x - y\right)\]
  2. Using strategy rm
  3. Applied sub-neg0.0

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

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

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

Reproduce

herbie shell --seed 2019168 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, C"
  (* 200.0 (- x y)))