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 r212295 = x;
        double r212296 = y;
        double r212297 = r212295 + r212296;
        double r212298 = r212295 - r212296;
        double r212299 = r212297 * r212298;
        return r212299;
}

double f(double x, double y) {
        double r212300 = x;
        double r212301 = y;
        double r212302 = r212300 + r212301;
        double r212303 = r212300 - r212301;
        double r212304 = r212302 * r212303;
        return r212304;
}

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