Average Error: 0.0 → 0.0
Time: 9.5s
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 r6921355 = x;
        double r6921356 = y;
        double r6921357 = r6921355 + r6921356;
        double r6921358 = r6921355 - r6921356;
        double r6921359 = r6921357 * r6921358;
        return r6921359;
}

double f(double x, double y) {
        double r6921360 = y;
        double r6921361 = x;
        double r6921362 = r6921360 + r6921361;
        double r6921363 = r6921361 - r6921360;
        double r6921364 = r6921362 * r6921363;
        return r6921364;
}

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