Average Error: 0.0 → 0.0
Time: 7.0s
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 r659143 = 2.0;
        double r659144 = x;
        double r659145 = r659144 * r659144;
        double r659146 = y;
        double r659147 = r659144 * r659146;
        double r659148 = r659145 - r659147;
        double r659149 = r659143 * r659148;
        return r659149;
}

double f(double x, double y) {
        double r659150 = 2.0;
        double r659151 = x;
        double r659152 = r659151 * r659151;
        double r659153 = y;
        double r659154 = r659151 * r659153;
        double r659155 = r659152 - r659154;
        double r659156 = r659150 * r659155;
        return r659156;
}

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 +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))))