Average Error: 0.0 → 0.0
Time: 12.3s
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 r95664 = x;
        double r95665 = y;
        double r95666 = r95664 + r95665;
        double r95667 = r95664 - r95665;
        double r95668 = r95666 * r95667;
        return r95668;
}

double f(double x, double y) {
        double r95669 = x;
        double r95670 = y;
        double r95671 = r95669 + r95670;
        double r95672 = r95669 - r95670;
        double r95673 = r95671 * r95672;
        return r95673;
}

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