Average Error: 0.0 → 0.0
Time: 4.0s
Precision: 64
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\[y \cdot y + x \cdot \left(2 + x\right)\]
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
y \cdot y + x \cdot \left(2 + x\right)
double f(double x, double y) {
        double r372844 = x;
        double r372845 = 2.0;
        double r372846 = r372844 * r372845;
        double r372847 = r372844 * r372844;
        double r372848 = r372846 + r372847;
        double r372849 = y;
        double r372850 = r372849 * r372849;
        double r372851 = r372848 + r372850;
        return r372851;
}

double f(double x, double y) {
        double r372852 = y;
        double r372853 = r372852 * r372852;
        double r372854 = x;
        double r372855 = 2.0;
        double r372856 = r372855 + r372854;
        double r372857 = r372854 * r372856;
        double r372858 = r372853 + r372857;
        return r372858;
}

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. Simplified0.0

    \[\leadsto \color{blue}{y \cdot y + x \cdot \left(2 + x\right)}\]
  3. Final simplification0.0

    \[\leadsto y \cdot y + x \cdot \left(2 + x\right)\]

Reproduce

herbie shell --seed 2019199 
(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)))