Average Error: 0.0 → 0.0
Time: 9.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 r7666278 = x;
        double r7666279 = y;
        double r7666280 = r7666278 + r7666279;
        double r7666281 = r7666278 - r7666279;
        double r7666282 = r7666280 * r7666281;
        return r7666282;
}

double f(double x, double y) {
        double r7666283 = y;
        double r7666284 = x;
        double r7666285 = r7666283 + r7666284;
        double r7666286 = r7666284 - r7666283;
        double r7666287 = r7666285 * r7666286;
        return r7666287;
}

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