Average Error: 0.0 → 0.0
Time: 2.7s
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 r495406 = x;
        double r495407 = 2.0;
        double r495408 = r495406 * r495407;
        double r495409 = r495406 * r495406;
        double r495410 = r495408 + r495409;
        double r495411 = y;
        double r495412 = r495411 * r495411;
        double r495413 = r495410 + r495412;
        return r495413;
}

double f(double x, double y) {
        double r495414 = x;
        double r495415 = 2.0;
        double r495416 = r495414 * r495415;
        double r495417 = r495414 * r495414;
        double r495418 = r495416 + r495417;
        double r495419 = y;
        double r495420 = r495419 * r495419;
        double r495421 = r495418 + r495420;
        return r495421;
}

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