Average Error: 0.0 → 0.0
Time: 4.6s
Precision: 64
\[2 \cdot \left(x \cdot x - x \cdot y\right)\]
\[2 \cdot \left(x \cdot x - x \cdot y\right)\]
2 \cdot \left(x \cdot x - x \cdot y\right)
2 \cdot \left(x \cdot x - x \cdot y\right)
double f(double x, double y) {
        double r831418 = 2.0;
        double r831419 = x;
        double r831420 = r831419 * r831419;
        double r831421 = y;
        double r831422 = r831419 * r831421;
        double r831423 = r831420 - r831422;
        double r831424 = r831418 * r831423;
        return r831424;
}

double f(double x, double y) {
        double r831425 = 2.0;
        double r831426 = x;
        double r831427 = r831426 * r831426;
        double r831428 = y;
        double r831429 = r831426 * r831428;
        double r831430 = r831427 - r831429;
        double r831431 = r831425 * r831430;
        return r831431;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[\left(x \cdot 2\right) \cdot \left(x - y\right)\]

Derivation

  1. Initial program 0.0

    \[2 \cdot \left(x \cdot x - x \cdot y\right)\]
  2. Final simplification0.0

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

Reproduce

herbie shell --seed 2020047 
(FPCore (x y)
  :name "Linear.Matrix:fromQuaternion from linear-1.19.1.3, A"
  :precision binary64

  :herbie-target
  (* (* x 2) (- x y))

  (* 2 (- (* x x) (* x y))))