Average Error: 0.0 → 0.0
Time: 2.9s
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 r411126 = x;
        double r411127 = 2.0;
        double r411128 = r411126 * r411127;
        double r411129 = r411126 * r411126;
        double r411130 = r411128 + r411129;
        double r411131 = y;
        double r411132 = r411131 * r411131;
        double r411133 = r411130 + r411132;
        return r411133;
}

double f(double x, double y) {
        double r411134 = x;
        double r411135 = 2.0;
        double r411136 = r411134 * r411135;
        double r411137 = r411134 * r411134;
        double r411138 = r411136 + r411137;
        double r411139 = y;
        double r411140 = r411139 * r411139;
        double r411141 = r411138 + r411140;
        return r411141;
}

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 2020035 +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)))