Average Error: 0.0 → 0.0
Time: 2.6s
Precision: 64
\[\left(x \cdot x + y\right) + y\]
\[{x}^{2} + 2 \cdot y\]
\left(x \cdot x + y\right) + y
{x}^{2} + 2 \cdot y
double f(double x, double y) {
        double r502038 = x;
        double r502039 = r502038 * r502038;
        double r502040 = y;
        double r502041 = r502039 + r502040;
        double r502042 = r502041 + r502040;
        return r502042;
}

double f(double x, double y) {
        double r502043 = x;
        double r502044 = 2.0;
        double r502045 = pow(r502043, r502044);
        double r502046 = y;
        double r502047 = r502044 * r502046;
        double r502048 = r502045 + r502047;
        return r502048;
}

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

Derivation

  1. Initial program 0.0

    \[\left(x \cdot x + y\right) + y\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.0

    \[\leadsto \left(x \cdot x + y\right) + \color{blue}{1 \cdot y}\]
  4. Applied *-un-lft-identity0.0

    \[\leadsto \color{blue}{1 \cdot \left(x \cdot x + y\right)} + 1 \cdot y\]
  5. Applied distribute-lft-out0.0

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

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

    \[\leadsto {x}^{2} + 2 \cdot y\]

Reproduce

herbie shell --seed 2019322 
(FPCore (x y)
  :name "Data.Random.Distribution.Normal:normalTail from random-fu-0.2.6.2"
  :precision binary64

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

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