Average Error: 0.0 → 0.0
Time: 6.1s
Precision: 64
\[\left(x + y\right) \cdot \left(x - y\right)\]
\[\left(y + x\right) \cdot \left(x - y\right)\]
\left(x + y\right) \cdot \left(x - y\right)
\left(y + x\right) \cdot \left(x - y\right)
double f(double x, double y) {
        double r155629 = x;
        double r155630 = y;
        double r155631 = r155629 + r155630;
        double r155632 = r155629 - r155630;
        double r155633 = r155631 * r155632;
        return r155633;
}

double f(double x, double y) {
        double r155634 = y;
        double r155635 = x;
        double r155636 = r155634 + r155635;
        double r155637 = r155635 - r155634;
        double r155638 = r155636 * r155637;
        return r155638;
}

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(y + x\right) \cdot \left(x - y\right)\]

Reproduce

herbie shell --seed 2019174 
(FPCore (x y)
  :name "Examples.Basics.BasicTests:f1 from sbv-4.4"
  (* (+ x y) (- x y)))