Average Error: 0.0 → 0.0
Time: 9.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 r8295033 = x;
        double r8295034 = y;
        double r8295035 = r8295033 + r8295034;
        double r8295036 = r8295033 - r8295034;
        double r8295037 = r8295035 * r8295036;
        return r8295037;
}

double f(double x, double y) {
        double r8295038 = y;
        double r8295039 = x;
        double r8295040 = r8295038 + r8295039;
        double r8295041 = r8295039 - r8295038;
        double r8295042 = r8295040 * r8295041;
        return r8295042;
}

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)))