Average Error: 0.0 → 0.0
Time: 1.6s
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 r547249 = 2.0;
        double r547250 = x;
        double r547251 = r547250 * r547250;
        double r547252 = y;
        double r547253 = r547250 * r547252;
        double r547254 = r547251 + r547253;
        double r547255 = r547249 * r547254;
        return r547255;
}

double f(double x, double y) {
        double r547256 = 2.0;
        double r547257 = x;
        double r547258 = r547257 * r547257;
        double r547259 = y;
        double r547260 = r547257 * r547259;
        double r547261 = r547258 + r547260;
        double r547262 = r547256 * r547261;
        return r547262;
}

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