Average Error: 0.0 → 0.0
Time: 7.9s
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 r9917585 = x;
        double r9917586 = y;
        double r9917587 = r9917585 + r9917586;
        double r9917588 = r9917585 - r9917586;
        double r9917589 = r9917587 * r9917588;
        return r9917589;
}

double f(double x, double y) {
        double r9917590 = y;
        double r9917591 = x;
        double r9917592 = r9917590 + r9917591;
        double r9917593 = r9917591 - r9917590;
        double r9917594 = r9917592 * r9917593;
        return r9917594;
}

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