Average Error: 0.1 → 0.1
Time: 3.0s
Precision: 64
\[\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y\]
\[\left(y \cdot \left(y + y\right) + {x}^{2}\right) + y \cdot y\]
\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
\left(y \cdot \left(y + y\right) + {x}^{2}\right) + y \cdot y
double f(double x, double y) {
        double r475271 = x;
        double r475272 = r475271 * r475271;
        double r475273 = y;
        double r475274 = r475273 * r475273;
        double r475275 = r475272 + r475274;
        double r475276 = r475275 + r475274;
        double r475277 = r475276 + r475274;
        return r475277;
}

double f(double x, double y) {
        double r475278 = y;
        double r475279 = r475278 + r475278;
        double r475280 = r475278 * r475279;
        double r475281 = x;
        double r475282 = 2.0;
        double r475283 = pow(r475281, r475282);
        double r475284 = r475280 + r475283;
        double r475285 = r475278 * r475278;
        double r475286 = r475284 + r475285;
        return r475286;
}

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. Using strategy rm
  3. Applied add-sqr-sqrt0.2

    \[\leadsto \color{blue}{\sqrt{\left(x \cdot x + y \cdot y\right) + y \cdot y} \cdot \sqrt{\left(x \cdot x + y \cdot y\right) + y \cdot y}} + y \cdot y\]
  4. Taylor expanded around 0 0.1

    \[\leadsto \color{blue}{\left({x}^{2} + 2 \cdot {y}^{2}\right)} + y \cdot y\]
  5. Simplified0.1

    \[\leadsto \color{blue}{\left(y \cdot \left(y + y\right) + {x}^{2}\right)} + y \cdot y\]
  6. Final simplification0.1

    \[\leadsto \left(y \cdot \left(y + y\right) + {x}^{2}\right) + y \cdot y\]

Reproduce

herbie shell --seed 2020062 
(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)))