Average Error: 0.0 → 0.0
Time: 959.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 r152324 = x;
        double r152325 = y;
        double r152326 = r152324 + r152325;
        double r152327 = r152324 - r152325;
        double r152328 = r152326 * r152327;
        return r152328;
}

double f(double x, double y) {
        double r152329 = x;
        double r152330 = y;
        double r152331 = r152329 + r152330;
        double r152332 = r152329 - r152330;
        double r152333 = r152331 * r152332;
        return r152333;
}

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