Average Error: 0.1 → 0.1
Time: 16.8s
Precision: 64
\[\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y\]
\[y \cdot y + \left(y \cdot y + \left(x \cdot x + y \cdot y\right)\right)\]
\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
y \cdot y + \left(y \cdot y + \left(x \cdot x + y \cdot y\right)\right)
double f(double x, double y) {
        double r23040531 = x;
        double r23040532 = r23040531 * r23040531;
        double r23040533 = y;
        double r23040534 = r23040533 * r23040533;
        double r23040535 = r23040532 + r23040534;
        double r23040536 = r23040535 + r23040534;
        double r23040537 = r23040536 + r23040534;
        return r23040537;
}

double f(double x, double y) {
        double r23040538 = y;
        double r23040539 = r23040538 * r23040538;
        double r23040540 = x;
        double r23040541 = r23040540 * r23040540;
        double r23040542 = r23040541 + r23040539;
        double r23040543 = r23040539 + r23040542;
        double r23040544 = r23040539 + r23040543;
        return r23040544;
}

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.1
Target0.1
Herbie0.1
\[x \cdot x + y \cdot \left(y + \left(y + y\right)\right)\]

Derivation

  1. Initial program 0.1

    \[\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y\]
  2. Final simplification0.1

    \[\leadsto y \cdot y + \left(y \cdot y + \left(x \cdot x + y \cdot y\right)\right)\]

Reproduce

herbie shell --seed 2019164 
(FPCore (x y)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, E"

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

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