Average Error: 0.0 → 0.0
Time: 660.0ms
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 r188978 = x;
        double r188979 = y;
        double r188980 = r188978 + r188979;
        double r188981 = r188978 - r188979;
        double r188982 = r188980 * r188981;
        return r188982;
}

double f(double x, double y) {
        double r188983 = x;
        double r188984 = y;
        double r188985 = r188983 + r188984;
        double r188986 = r188983 - r188984;
        double r188987 = r188985 * r188986;
        return r188987;
}

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