Average Error: 0.0 → 0.0
Time: 9.0s
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 r8642248 = x;
        double r8642249 = y;
        double r8642250 = r8642248 + r8642249;
        double r8642251 = r8642248 - r8642249;
        double r8642252 = r8642250 * r8642251;
        return r8642252;
}

double f(double x, double y) {
        double r8642253 = y;
        double r8642254 = x;
        double r8642255 = r8642253 + r8642254;
        double r8642256 = r8642254 - r8642253;
        double r8642257 = r8642255 * r8642256;
        return r8642257;
}

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