Average Error: 0.0 → 0.0
Time: 4.8s
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 r340221 = 2.0;
        double r340222 = x;
        double r340223 = r340222 * r340222;
        double r340224 = y;
        double r340225 = r340222 * r340224;
        double r340226 = r340223 - r340225;
        double r340227 = r340221 * r340226;
        return r340227;
}

double f(double x, double y) {
        double r340228 = 2.0;
        double r340229 = x;
        double r340230 = r340229 * r340229;
        double r340231 = y;
        double r340232 = r340229 * r340231;
        double r340233 = r340230 - r340232;
        double r340234 = r340228 * r340233;
        return r340234;
}

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 2019208 +o rules:numerics
(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))))