Average Error: 0.0 → 0.0
Time: 3.8s
Precision: 64
\[\left(x \cdot x + y\right) + y\]
\[x \cdot x + \left(y + y\right)\]
\left(x \cdot x + y\right) + y
x \cdot x + \left(y + y\right)
double f(double x, double y) {
        double r1042685 = x;
        double r1042686 = r1042685 * r1042685;
        double r1042687 = y;
        double r1042688 = r1042686 + r1042687;
        double r1042689 = r1042688 + r1042687;
        return r1042689;
}

double f(double x, double y) {
        double r1042690 = x;
        double r1042691 = r1042690 * r1042690;
        double r1042692 = y;
        double r1042693 = r1042692 + r1042692;
        double r1042694 = r1042691 + r1042693;
        return r1042694;
}

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 associate-+l+0.0

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

    \[\leadsto x \cdot x + \left(y + y\right)\]

Reproduce

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