Average Error: 0.0 → 0.0
Time: 834.0ms
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 r639281 = 2.0;
        double r639282 = x;
        double r639283 = r639282 * r639282;
        double r639284 = y;
        double r639285 = r639282 * r639284;
        double r639286 = r639283 - r639285;
        double r639287 = r639281 * r639286;
        return r639287;
}

double f(double x, double y) {
        double r639288 = 2.0;
        double r639289 = x;
        double r639290 = r639289 * r639289;
        double r639291 = y;
        double r639292 = r639289 * r639291;
        double r639293 = r639290 - r639292;
        double r639294 = r639288 * r639293;
        return r639294;
}

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 2020060 
(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))))