Average Error: 0.0 → 0.0
Time: 2.6s
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 r440102 = x;
        double r440103 = 2.0;
        double r440104 = r440102 * r440103;
        double r440105 = r440102 * r440102;
        double r440106 = r440104 + r440105;
        double r440107 = y;
        double r440108 = r440107 * r440107;
        double r440109 = r440106 + r440108;
        return r440109;
}

double f(double x, double y) {
        double r440110 = x;
        double r440111 = 2.0;
        double r440112 = r440110 * r440111;
        double r440113 = r440110 * r440110;
        double r440114 = r440112 + r440113;
        double r440115 = y;
        double r440116 = r440115 * r440115;
        double r440117 = r440114 + r440116;
        return r440117;
}

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 2020034 
(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)))