Average Error: 0.0 → 0.0
Time: 9.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 r10148166 = x;
        double r10148167 = y;
        double r10148168 = r10148166 + r10148167;
        double r10148169 = r10148166 - r10148167;
        double r10148170 = r10148168 * r10148169;
        return r10148170;
}

double f(double x, double y) {
        double r10148171 = y;
        double r10148172 = x;
        double r10148173 = r10148171 + r10148172;
        double r10148174 = r10148172 - r10148171;
        double r10148175 = r10148173 * r10148174;
        return r10148175;
}

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