Average Error: 0.0 → 0.0
Time: 3.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 r340112 = x;
        double r340113 = 2.0;
        double r340114 = r340112 * r340113;
        double r340115 = r340112 * r340112;
        double r340116 = r340114 + r340115;
        double r340117 = y;
        double r340118 = r340117 * r340117;
        double r340119 = r340116 + r340118;
        return r340119;
}

double f(double x, double y) {
        double r340120 = x;
        double r340121 = 2.0;
        double r340122 = r340120 * r340121;
        double r340123 = r340120 * r340120;
        double r340124 = r340122 + r340123;
        double r340125 = y;
        double r340126 = r340125 * r340125;
        double r340127 = r340124 + r340126;
        return r340127;
}

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