Average Error: 0.0 → 0.0
Time: 4.5s
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 r175400 = x;
        double r175401 = r175400 * r175400;
        double r175402 = y;
        double r175403 = r175402 * r175402;
        double r175404 = r175401 - r175403;
        return r175404;
}

double f(double x, double y) {
        double r175405 = y;
        double r175406 = x;
        double r175407 = r175405 + r175406;
        double r175408 = r175406 - r175405;
        double r175409 = r175407 * r175408;
        return r175409;
}

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. Simplified0.0

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

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

Reproduce

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