Average Error: 0.0 → 0.0
Time: 3.5s
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 r165026 = x;
        double r165027 = y;
        double r165028 = r165026 + r165027;
        double r165029 = r165026 - r165027;
        double r165030 = r165028 * r165029;
        return r165030;
}

double f(double x, double y) {
        double r165031 = y;
        double r165032 = x;
        double r165033 = r165031 + r165032;
        double r165034 = r165032 - r165031;
        double r165035 = r165033 * r165034;
        return r165035;
}

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 2019195 
(FPCore (x y)
  :name "Examples.Basics.BasicTests:f1 from sbv-4.4"
  (* (+ x y) (- x y)))