Average Error: 0.0 → 0.0
Time: 5.4s
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 r7090740 = x;
        double r7090741 = y;
        double r7090742 = r7090740 + r7090741;
        double r7090743 = r7090740 - r7090741;
        double r7090744 = r7090742 * r7090743;
        return r7090744;
}

double f(double x, double y) {
        double r7090745 = y;
        double r7090746 = x;
        double r7090747 = r7090745 + r7090746;
        double r7090748 = r7090746 - r7090745;
        double r7090749 = r7090747 * r7090748;
        return r7090749;
}

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