Average Error: 0.0 → 0.0
Time: 2.6s
Precision: 64
\[\left(x + y\right) \cdot \left(x - y\right)\]
\[\left(y + x\right) \cdot \left(x - y\right)\]
\left(x + y\right) \cdot \left(x - y\right)
\left(y + x\right) \cdot \left(x - y\right)
double f(double x, double y) {
        double r2891437 = x;
        double r2891438 = y;
        double r2891439 = r2891437 + r2891438;
        double r2891440 = r2891437 - r2891438;
        double r2891441 = r2891439 * r2891440;
        return r2891441;
}

double f(double x, double y) {
        double r2891442 = y;
        double r2891443 = x;
        double r2891444 = r2891442 + r2891443;
        double r2891445 = r2891443 - r2891442;
        double r2891446 = r2891444 * r2891445;
        return r2891446;
}

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(y + x\right) \cdot \left(x - y\right)\]

Reproduce

herbie shell --seed 2019156 +o rules:numerics
(FPCore (x y)
  :name "Examples.Basics.BasicTests:f1 from sbv-4.4"
  (* (+ x y) (- x y)))