Average Error: 0.0 → 0.0
Time: 588.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 r179569 = x;
        double r179570 = y;
        double r179571 = r179569 + r179570;
        double r179572 = r179569 - r179570;
        double r179573 = r179571 * r179572;
        return r179573;
}

double f(double x, double y) {
        double r179574 = x;
        double r179575 = y;
        double r179576 = r179574 + r179575;
        double r179577 = r179574 - r179575;
        double r179578 = r179576 * r179577;
        return r179578;
}

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