Average Error: 0.0 → 0.0
Time: 9.1s
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 r6257604 = x;
        double r6257605 = y;
        double r6257606 = r6257604 + r6257605;
        double r6257607 = r6257604 - r6257605;
        double r6257608 = r6257606 * r6257607;
        return r6257608;
}

double f(double x, double y) {
        double r6257609 = y;
        double r6257610 = x;
        double r6257611 = r6257609 + r6257610;
        double r6257612 = r6257610 - r6257609;
        double r6257613 = r6257611 * r6257612;
        return r6257613;
}

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