Average Error: 0.0 → 0.0
Time: 792.0ms
Precision: 64
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
double f(double x, double y) {
        double r445663 = x;
        double r445664 = 2.0;
        double r445665 = r445663 * r445664;
        double r445666 = r445663 * r445663;
        double r445667 = r445665 + r445666;
        double r445668 = y;
        double r445669 = r445668 * r445668;
        double r445670 = r445667 + r445669;
        return r445670;
}

double f(double x, double y) {
        double r445671 = x;
        double r445672 = 2.0;
        double r445673 = r445671 * r445672;
        double r445674 = r445671 * r445671;
        double r445675 = r445673 + r445674;
        double r445676 = y;
        double r445677 = r445676 * r445676;
        double r445678 = r445675 + r445677;
        return r445678;
}

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. Final simplification0.0

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

Reproduce

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