Average Error: 0.0 → 0.0
Time: 12.9s
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 r107941 = x;
        double r107942 = y;
        double r107943 = r107941 + r107942;
        double r107944 = r107941 - r107942;
        double r107945 = r107943 * r107944;
        return r107945;
}

double f(double x, double y) {
        double r107946 = x;
        double r107947 = y;
        double r107948 = r107946 + r107947;
        double r107949 = r107946 - r107947;
        double r107950 = r107948 * r107949;
        return r107950;
}

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