Average Error: 0.0 → 0.0
Time: 5.0s
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 r209978 = x;
        double r209979 = 2.0;
        double r209980 = r209978 * r209979;
        double r209981 = r209978 * r209978;
        double r209982 = r209980 + r209981;
        double r209983 = y;
        double r209984 = r209983 * r209983;
        double r209985 = r209982 + r209984;
        return r209985;
}

double f(double x, double y) {
        double r209986 = x;
        double r209987 = 2.0;
        double r209988 = r209986 * r209987;
        double r209989 = r209986 * r209986;
        double r209990 = r209988 + r209989;
        double r209991 = y;
        double r209992 = r209991 * r209991;
        double r209993 = r209990 + r209992;
        return r209993;
}

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