Average Error: 0.0 → 0.0
Time: 9.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 r12478139 = 200.0;
        double r12478140 = x;
        double r12478141 = y;
        double r12478142 = r12478140 - r12478141;
        double r12478143 = r12478139 * r12478142;
        return r12478143;
}

double f(double x, double y) {
        double r12478144 = y;
        double r12478145 = -r12478144;
        double r12478146 = 200.0;
        double r12478147 = r12478145 * r12478146;
        double r12478148 = x;
        double r12478149 = r12478146 * r12478148;
        double r12478150 = r12478147 + r12478149;
        return r12478150;
}

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