Average Error: 0.0 → 0.0
Time: 8.8s
Precision: 64
\[200 \cdot \left(x - y\right)\]
\[x \cdot 200 + \left(-y\right) \cdot 200\]
200 \cdot \left(x - y\right)
x \cdot 200 + \left(-y\right) \cdot 200
double f(double x, double y) {
        double r287631 = 200.0;
        double r287632 = x;
        double r287633 = y;
        double r287634 = r287632 - r287633;
        double r287635 = r287631 * r287634;
        return r287635;
}

double f(double x, double y) {
        double r287636 = x;
        double r287637 = 200.0;
        double r287638 = r287636 * r287637;
        double r287639 = y;
        double r287640 = -r287639;
        double r287641 = r287640 * r287637;
        double r287642 = r287638 + r287641;
        return r287642;
}

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 \color{blue}{x \cdot 200} + 200 \cdot \left(-y\right)\]
  6. Simplified0.0

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

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

Reproduce

herbie shell --seed 2020047 
(FPCore (x y)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, C"
  :precision binary64
  (* 200 (- x y)))