Average Error: 0.0 → 0.0
Time: 14.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 r8208498 = x;
        double r8208499 = y;
        double r8208500 = r8208498 + r8208499;
        double r8208501 = r8208498 - r8208499;
        double r8208502 = r8208500 * r8208501;
        return r8208502;
}

double f(double x, double y) {
        double r8208503 = y;
        double r8208504 = x;
        double r8208505 = r8208503 + r8208504;
        double r8208506 = r8208504 - r8208503;
        double r8208507 = r8208505 * r8208506;
        return r8208507;
}

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