Average Error: 0.0 → 0.0
Time: 3.5s
Precision: 64
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\[y \cdot y + \left(x \cdot 2 + {x}^{2}\right)\]
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
y \cdot y + \left(x \cdot 2 + {x}^{2}\right)
double f(double x, double y) {
        double r330122 = x;
        double r330123 = 2.0;
        double r330124 = r330122 * r330123;
        double r330125 = r330122 * r330122;
        double r330126 = r330124 + r330125;
        double r330127 = y;
        double r330128 = r330127 * r330127;
        double r330129 = r330126 + r330128;
        return r330129;
}

double f(double x, double y) {
        double r330130 = y;
        double r330131 = r330130 * r330130;
        double r330132 = x;
        double r330133 = 2.0;
        double r330134 = r330132 * r330133;
        double r330135 = 2.0;
        double r330136 = pow(r330132, r330135);
        double r330137 = r330134 + r330136;
        double r330138 = r330131 + r330137;
        return r330138;
}

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

Derivation

  1. Initial program 0.0

    \[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
  2. Simplified0.0

    \[\leadsto \color{blue}{y \cdot y + x \cdot \left(2 + x\right)}\]
  3. Using strategy rm
  4. Applied distribute-lft-in0.0

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

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

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

Reproduce

herbie shell --seed 1978988140 
(FPCore (x y)
  :name "Numeric.Log:$clog1p from log-domain-0.10.2.1, A"
  :precision binary64

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

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