Average Error: 0.0 → 0.0
Time: 8.1s
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 r139292 = x;
        double r139293 = y;
        double r139294 = r139292 + r139293;
        double r139295 = r139292 - r139293;
        double r139296 = r139294 * r139295;
        return r139296;
}

double f(double x, double y) {
        double r139297 = y;
        double r139298 = x;
        double r139299 = r139297 + r139298;
        double r139300 = r139298 - r139297;
        double r139301 = r139299 * r139300;
        return r139301;
}

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