Average Error: 0.0 → 0.0
Time: 6.5s
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 r365307 = 2.0;
        double r365308 = x;
        double r365309 = r365308 * r365308;
        double r365310 = y;
        double r365311 = r365308 * r365310;
        double r365312 = r365309 - r365311;
        double r365313 = r365307 * r365312;
        return r365313;
}

double f(double x, double y) {
        double r365314 = 2.0;
        double r365315 = x;
        double r365316 = r365315 * r365315;
        double r365317 = y;
        double r365318 = r365315 * r365317;
        double r365319 = r365316 - r365318;
        double r365320 = r365314 * r365319;
        return r365320;
}

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