Average Error: 0.0 → 0.0
Time: 1.3s
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 r573408 = 2.0;
        double r573409 = x;
        double r573410 = r573409 * r573409;
        double r573411 = y;
        double r573412 = r573409 * r573411;
        double r573413 = r573410 + r573412;
        double r573414 = r573408 * r573413;
        return r573414;
}

double f(double x, double y) {
        double r573415 = 2.0;
        double r573416 = x;
        double r573417 = r573416 * r573416;
        double r573418 = y;
        double r573419 = r573416 * r573418;
        double r573420 = r573417 + r573419;
        double r573421 = r573415 * r573420;
        return r573421;
}

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