Average Error: 0.0 → 0.0
Time: 7.6s
Precision: 64
\[200 \cdot \left(x - y\right)\]
\[\left(-y\right) \cdot 200 + 200 \cdot x\]
200 \cdot \left(x - y\right)
\left(-y\right) \cdot 200 + 200 \cdot x
double f(double x, double y) {
        double r128218 = 200.0;
        double r128219 = x;
        double r128220 = y;
        double r128221 = r128219 - r128220;
        double r128222 = r128218 * r128221;
        return r128222;
}

double f(double x, double y) {
        double r128223 = y;
        double r128224 = -r128223;
        double r128225 = 200.0;
        double r128226 = r128224 * r128225;
        double r128227 = x;
        double r128228 = r128225 * r128227;
        double r128229 = r128226 + r128228;
        return r128229;
}

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

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

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

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

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

Reproduce

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