Average Error: 0.0 → 0.0
Time: 11.3s
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 r7251623 = x;
        double r7251624 = y;
        double r7251625 = r7251623 + r7251624;
        double r7251626 = r7251623 - r7251624;
        double r7251627 = r7251625 * r7251626;
        return r7251627;
}

double f(double x, double y) {
        double r7251628 = y;
        double r7251629 = x;
        double r7251630 = r7251628 + r7251629;
        double r7251631 = r7251629 - r7251628;
        double r7251632 = r7251630 * r7251631;
        return r7251632;
}

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