Average Error: 0.0 → 0.0
Time: 1.8s
Precision: 64
\[200 \cdot \left(x - y\right)\]
\[200 \cdot x + 200 \cdot \left(-y\right)\]
200 \cdot \left(x - y\right)
200 \cdot x + 200 \cdot \left(-y\right)
double f(double x, double y) {
        double r265897 = 200.0;
        double r265898 = x;
        double r265899 = y;
        double r265900 = r265898 - r265899;
        double r265901 = r265897 * r265900;
        return r265901;
}

double f(double x, double y) {
        double r265902 = 200.0;
        double r265903 = x;
        double r265904 = r265902 * r265903;
        double r265905 = y;
        double r265906 = -r265905;
        double r265907 = r265902 * r265906;
        double r265908 = r265904 + r265907;
        return r265908;
}

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 add-sqr-sqrt0.9

    \[\leadsto \color{blue}{\left(\sqrt{200} \cdot \sqrt{200}\right)} \cdot \left(x - y\right)\]
  4. Applied associate-*l*0.5

    \[\leadsto \color{blue}{\sqrt{200} \cdot \left(\sqrt{200} \cdot \left(x - y\right)\right)}\]
  5. Using strategy rm
  6. Applied sub-neg0.5

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

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

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

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

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

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

Reproduce

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