Average Error: 0.0 → 0.0
Time: 1.0s
Precision: 64
\[\left(x + y\right) \cdot \left(x - y\right)\]
\[\left(x + y\right) \cdot \left(x - y\right)\]
\left(x + y\right) \cdot \left(x - y\right)
\left(x + y\right) \cdot \left(x - y\right)
double f(double x, double y) {
        double r154857 = x;
        double r154858 = y;
        double r154859 = r154857 + r154858;
        double r154860 = r154857 - r154858;
        double r154861 = r154859 * r154860;
        return r154861;
}

double f(double x, double y) {
        double r154862 = x;
        double r154863 = y;
        double r154864 = r154862 + r154863;
        double r154865 = r154862 - r154863;
        double r154866 = r154864 * r154865;
        return r154866;
}

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(x + y\right) \cdot \left(x - y\right)\]

Reproduce

herbie shell --seed 2020036 +o rules:numerics
(FPCore (x y)
  :name "Examples.Basics.BasicTests:f1 from sbv-4.4"
  :precision binary64
  (* (+ x y) (- x y)))