Average Error: 0.0 → 0.0
Time: 7.6s
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 r5908653 = x;
        double r5908654 = y;
        double r5908655 = r5908653 + r5908654;
        double r5908656 = r5908653 - r5908654;
        double r5908657 = r5908655 * r5908656;
        return r5908657;
}

double f(double x, double y) {
        double r5908658 = y;
        double r5908659 = x;
        double r5908660 = r5908658 + r5908659;
        double r5908661 = r5908659 - r5908658;
        double r5908662 = r5908660 * r5908661;
        return r5908662;
}

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