Average Error: 0.1 → 0.1
Time: 2.6s
Precision: 64
\[\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y\]
\[y \cdot y + \left({x}^{2} + y \cdot \left(y + y\right)\right)\]
\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
y \cdot y + \left({x}^{2} + y \cdot \left(y + y\right)\right)
double f(double x, double y) {
        double r520536 = x;
        double r520537 = r520536 * r520536;
        double r520538 = y;
        double r520539 = r520538 * r520538;
        double r520540 = r520537 + r520539;
        double r520541 = r520540 + r520539;
        double r520542 = r520541 + r520539;
        return r520542;
}

double f(double x, double y) {
        double r520543 = y;
        double r520544 = r520543 * r520543;
        double r520545 = x;
        double r520546 = 2.0;
        double r520547 = pow(r520545, r520546);
        double r520548 = r520543 + r520543;
        double r520549 = r520543 * r520548;
        double r520550 = r520547 + r520549;
        double r520551 = r520544 + r520550;
        return r520551;
}

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. Taylor expanded around 0 0.1

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

    \[\leadsto \color{blue}{\left({x}^{2} + y \cdot \left(y + y\right)\right)} + y \cdot y\]
  4. Using strategy rm
  5. Applied pow10.1

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

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

Reproduce

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