Average Error: 0.0 → 0.0
Time: 7.6s
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 r160884 = x;
        double r160885 = y;
        double r160886 = r160884 + r160885;
        double r160887 = r160884 - r160885;
        double r160888 = r160886 * r160887;
        return r160888;
}

double f(double x, double y) {
        double r160889 = x;
        double r160890 = y;
        double r160891 = r160889 + r160890;
        double r160892 = r160889 - r160890;
        double r160893 = r160891 * r160892;
        return r160893;
}

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