Average Error: 0.0 → 0.0
Time: 12.5s
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 r171399 = x;
        double r171400 = y;
        double r171401 = r171399 + r171400;
        double r171402 = r171399 - r171400;
        double r171403 = r171401 * r171402;
        return r171403;
}

double f(double x, double y) {
        double r171404 = x;
        double r171405 = y;
        double r171406 = r171404 + r171405;
        double r171407 = r171404 - r171405;
        double r171408 = r171406 * r171407;
        return r171408;
}

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)))