Average Error: 0.0 → 0.0
Time: 1.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 r633278 = 2.0;
        double r633279 = x;
        double r633280 = r633279 * r633279;
        double r633281 = y;
        double r633282 = r633279 * r633281;
        double r633283 = r633280 - r633282;
        double r633284 = r633278 * r633283;
        return r633284;
}

double f(double x, double y) {
        double r633285 = 2.0;
        double r633286 = x;
        double r633287 = r633286 * r633286;
        double r633288 = y;
        double r633289 = r633286 * r633288;
        double r633290 = r633287 - r633289;
        double r633291 = r633285 * r633290;
        return r633291;
}

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