Average Error: 0.0 → 0.0
Time: 2.0s
Precision: 64
\[2 \cdot \left(x \cdot x - x \cdot y\right)\]
\[\left(x \cdot x - y \cdot x\right) \cdot 2\]
2 \cdot \left(x \cdot x - x \cdot y\right)
\left(x \cdot x - y \cdot x\right) \cdot 2
double f(double x, double y) {
        double r17655096 = 2.0;
        double r17655097 = x;
        double r17655098 = r17655097 * r17655097;
        double r17655099 = y;
        double r17655100 = r17655097 * r17655099;
        double r17655101 = r17655098 - r17655100;
        double r17655102 = r17655096 * r17655101;
        return r17655102;
}

double f(double x, double y) {
        double r17655103 = x;
        double r17655104 = r17655103 * r17655103;
        double r17655105 = y;
        double r17655106 = r17655105 * r17655103;
        double r17655107 = r17655104 - r17655106;
        double r17655108 = 2.0;
        double r17655109 = r17655107 * r17655108;
        return r17655109;
}

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 \left(x \cdot x - y \cdot x\right) \cdot 2\]

Reproduce

herbie shell --seed 2019172 +o rules:numerics
(FPCore (x y)
  :name "Linear.Matrix:fromQuaternion from linear-1.19.1.3, A"

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

  (* 2.0 (- (* x x) (* x y))))