Average Error: 0.0 → 0.0
Time: 6.6s
Precision: 64
\[x \cdot x - y \cdot y\]
\[\left(y + x\right) \cdot \left(x - y\right)\]
x \cdot x - y \cdot y
\left(y + x\right) \cdot \left(x - y\right)
double f(double x, double y) {
        double r139200 = x;
        double r139201 = r139200 * r139200;
        double r139202 = y;
        double r139203 = r139202 * r139202;
        double r139204 = r139201 - r139203;
        return r139204;
}

double f(double x, double y) {
        double r139205 = y;
        double r139206 = x;
        double r139207 = r139205 + r139206;
        double r139208 = r139206 - r139205;
        double r139209 = r139207 * r139208;
        return r139209;
}

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

    \[x \cdot x - y \cdot y\]
  2. Using strategy rm
  3. Applied difference-of-squares0.0

    \[\leadsto \color{blue}{\left(x + y\right) \cdot \left(x - y\right)}\]
  4. Final simplification0.0

    \[\leadsto \left(y + x\right) \cdot \left(x - y\right)\]

Reproduce

herbie shell --seed 2019194 
(FPCore (x y)
  :name "Examples.Basics.BasicTests:f2 from sbv-4.4"
  (- (* x x) (* y y)))