Average Error: 0.0 → 0.0
Time: 7.6s
Precision: 64
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\[y \cdot y + \left(x \cdot x + x \cdot 2\right)\]
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
y \cdot y + \left(x \cdot x + x \cdot 2\right)
double f(double x, double y) {
        double r15258071 = x;
        double r15258072 = 2.0;
        double r15258073 = r15258071 * r15258072;
        double r15258074 = r15258071 * r15258071;
        double r15258075 = r15258073 + r15258074;
        double r15258076 = y;
        double r15258077 = r15258076 * r15258076;
        double r15258078 = r15258075 + r15258077;
        return r15258078;
}

double f(double x, double y) {
        double r15258079 = y;
        double r15258080 = r15258079 * r15258079;
        double r15258081 = x;
        double r15258082 = r15258081 * r15258081;
        double r15258083 = 2.0;
        double r15258084 = r15258081 * r15258083;
        double r15258085 = r15258082 + r15258084;
        double r15258086 = r15258080 + r15258085;
        return r15258086;
}

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 y \cdot y + \left(x \cdot x + x \cdot 2\right)\]

Reproduce

herbie shell --seed 2019170 +o rules:numerics
(FPCore (x y)
  :name "Numeric.Log:$clog1p from log-domain-0.10.2.1, A"

  :herbie-target
  (+ (* y y) (+ (* 2.0 x) (* x x)))

  (+ (+ (* x 2.0) (* x x)) (* y y)))