Average Error: 0.0 → 0.0
Time: 603.0ms
Precision: 64
\[\left(x + y\right) \cdot \left(x - y\right)\]
\[\left(x + y\right) \cdot \left(x - y\right)\]
\left(x + y\right) \cdot \left(x - y\right)
\left(x + y\right) \cdot \left(x - y\right)
double f(double x, double y) {
        double r182711 = x;
        double r182712 = y;
        double r182713 = r182711 + r182712;
        double r182714 = r182711 - r182712;
        double r182715 = r182713 * r182714;
        return r182715;
}

double f(double x, double y) {
        double r182716 = x;
        double r182717 = y;
        double r182718 = r182716 + r182717;
        double r182719 = r182716 - r182717;
        double r182720 = r182718 * r182719;
        return r182720;
}

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

    \[\left(x + y\right) \cdot \left(x - y\right)\]
  2. Final simplification0.0

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

Reproduce

herbie shell --seed 2020062 +o rules:numerics
(FPCore (x y)
  :name "Examples.Basics.BasicTests:f1 from sbv-4.4"
  :precision binary64
  (* (+ x y) (- x y)))