Average Error: 0.0 → 0.0
Time: 3.2s
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 r242212 = x;
        double r242213 = 2.0;
        double r242214 = r242212 * r242213;
        double r242215 = r242212 * r242212;
        double r242216 = r242214 + r242215;
        double r242217 = y;
        double r242218 = r242217 * r242217;
        double r242219 = r242216 + r242218;
        return r242219;
}

double f(double x, double y) {
        double r242220 = x;
        double r242221 = 2.0;
        double r242222 = r242220 * r242221;
        double r242223 = r242220 * r242220;
        double r242224 = r242222 + r242223;
        double r242225 = y;
        double r242226 = r242225 * r242225;
        double r242227 = r242224 + r242226;
        return r242227;
}

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 +o rules:numerics
(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)))