Average Error: 0.0 → 0.0
Time: 7.7s
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 r152077 = x;
        double r152078 = y;
        double r152079 = r152077 + r152078;
        double r152080 = r152077 - r152078;
        double r152081 = r152079 * r152080;
        return r152081;
}

double f(double x, double y) {
        double r152082 = y;
        double r152083 = x;
        double r152084 = r152082 + r152083;
        double r152085 = r152083 - r152082;
        double r152086 = r152084 * r152085;
        return r152086;
}

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