Average Error: 0.0 → 0.0
Time: 11.2s
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 r121057 = x;
        double r121058 = y;
        double r121059 = r121057 + r121058;
        double r121060 = r121057 - r121058;
        double r121061 = r121059 * r121060;
        return r121061;
}

double f(double x, double y) {
        double r121062 = x;
        double r121063 = y;
        double r121064 = r121062 + r121063;
        double r121065 = r121062 - r121063;
        double r121066 = r121064 * r121065;
        return r121066;
}

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