Average Error: 0.0 → 0.0
Time: 899.0ms
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 r492311 = 2.0;
        double r492312 = x;
        double r492313 = r492312 * r492312;
        double r492314 = y;
        double r492315 = r492312 * r492314;
        double r492316 = r492313 + r492315;
        double r492317 = r492311 * r492316;
        return r492317;
}

double f(double x, double y) {
        double r492318 = 2.0;
        double r492319 = x;
        double r492320 = r492319 * r492319;
        double r492321 = y;
        double r492322 = r492319 * r492321;
        double r492323 = r492320 + r492322;
        double r492324 = r492318 * r492323;
        return r492324;
}

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 2020064 +o rules:numerics
(FPCore (x y)
  :name "Linear.Matrix:fromQuaternion from linear-1.19.1.3, B"
  :precision binary64

  :herbie-target
  (* (* x 2) (+ x y))

  (* 2 (+ (* x x) (* x y))))