Average Error: 0.0 → 0.0
Time: 14.8s
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 r5401635 = x;
        double r5401636 = y;
        double r5401637 = r5401635 + r5401636;
        double r5401638 = r5401635 - r5401636;
        double r5401639 = r5401637 * r5401638;
        return r5401639;
}

double f(double x, double y) {
        double r5401640 = y;
        double r5401641 = x;
        double r5401642 = r5401640 + r5401641;
        double r5401643 = r5401641 - r5401640;
        double r5401644 = r5401642 * r5401643;
        return r5401644;
}

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