Average Error: 0.0 → 0.0
Time: 10.5s
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 r9162535 = x;
        double r9162536 = y;
        double r9162537 = r9162535 + r9162536;
        double r9162538 = r9162535 - r9162536;
        double r9162539 = r9162537 * r9162538;
        return r9162539;
}

double f(double x, double y) {
        double r9162540 = y;
        double r9162541 = x;
        double r9162542 = r9162540 + r9162541;
        double r9162543 = r9162541 - r9162540;
        double r9162544 = r9162542 * r9162543;
        return r9162544;
}

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