Average Error: 0.0 → 0.0
Time: 1.4s
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 r296549 = 200.0;
        double r296550 = x;
        double r296551 = y;
        double r296552 = r296550 - r296551;
        double r296553 = r296549 * r296552;
        return r296553;
}

double f(double x, double y) {
        double r296554 = 200.0;
        double r296555 = x;
        double r296556 = r296554 * r296555;
        double r296557 = y;
        double r296558 = -r296557;
        double r296559 = r296554 * r296558;
        double r296560 = r296556 + r296559;
        return r296560;
}

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 
(FPCore (x y)
  :name "Data.Colour.CIE:cieLABView from colour-2.3.3, C"
  :precision binary64
  (* 200 (- x y)))