Average Error: 0.0 → 0.0
Time: 8.3s
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 r41754658 = x;
        double r41754659 = r41754658 * r41754658;
        double r41754660 = y;
        double r41754661 = r41754659 + r41754660;
        double r41754662 = r41754661 + r41754660;
        return r41754662;
}

double f(double x, double y) {
        double r41754663 = x;
        double r41754664 = r41754663 * r41754663;
        double r41754665 = y;
        double r41754666 = r41754665 + r41754665;
        double r41754667 = r41754664 + r41754666;
        return r41754667;
}

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 2019169 
(FPCore (x y)
  :name "Data.Random.Distribution.Normal:normalTail from random-fu-0.2.6.2"

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

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