Average Error: 0.1 → 0.1
Time: 3.3s
Precision: 64
\[\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y\]
\[\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y\]
\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
double f(double x, double y) {
        double r699434 = x;
        double r699435 = r699434 * r699434;
        double r699436 = y;
        double r699437 = r699436 * r699436;
        double r699438 = r699435 + r699437;
        double r699439 = r699438 + r699437;
        double r699440 = r699439 + r699437;
        return r699440;
}

double f(double x, double y) {
        double r699441 = x;
        double r699442 = r699441 * r699441;
        double r699443 = y;
        double r699444 = r699443 * r699443;
        double r699445 = r699442 + r699444;
        double r699446 = r699445 + r699444;
        double r699447 = r699446 + r699444;
        return r699447;
}

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 \left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y\]

Reproduce

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

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

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