Average Error: 0.0 → 0.0
Time: 5.2s
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 r7516043 = x;
        double r7516044 = y;
        double r7516045 = r7516043 + r7516044;
        double r7516046 = r7516043 - r7516044;
        double r7516047 = r7516045 * r7516046;
        return r7516047;
}

double f(double x, double y) {
        double r7516048 = y;
        double r7516049 = x;
        double r7516050 = r7516048 + r7516049;
        double r7516051 = r7516049 - r7516048;
        double r7516052 = r7516050 * r7516051;
        return r7516052;
}

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