Average Error: 0.0 → 0.0
Time: 4.6s
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 r5706987 = x;
        double r5706988 = y;
        double r5706989 = r5706987 + r5706988;
        double r5706990 = r5706987 - r5706988;
        double r5706991 = r5706989 * r5706990;
        return r5706991;
}

double f(double x, double y) {
        double r5706992 = y;
        double r5706993 = x;
        double r5706994 = r5706992 + r5706993;
        double r5706995 = r5706993 - r5706992;
        double r5706996 = r5706994 * r5706995;
        return r5706996;
}

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