Average Error: 0.0 → 0.0
Time: 12.1s
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 r136707 = x;
        double r136708 = y;
        double r136709 = r136707 + r136708;
        double r136710 = r136707 - r136708;
        double r136711 = r136709 * r136710;
        return r136711;
}

double f(double x, double y) {
        double r136712 = x;
        double r136713 = y;
        double r136714 = r136712 + r136713;
        double r136715 = r136712 - r136713;
        double r136716 = r136714 * r136715;
        return r136716;
}

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