Average Error: 0.0 → 0.0
Time: 1.3s
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 r526087 = x;
        double r526088 = 2.0;
        double r526089 = r526087 * r526088;
        double r526090 = r526087 * r526087;
        double r526091 = r526089 + r526090;
        double r526092 = y;
        double r526093 = r526092 * r526092;
        double r526094 = r526091 + r526093;
        return r526094;
}

double f(double x, double y) {
        double r526095 = x;
        double r526096 = 2.0;
        double r526097 = r526095 * r526096;
        double r526098 = r526095 * r526095;
        double r526099 = r526097 + r526098;
        double r526100 = y;
        double r526101 = r526100 * r526100;
        double r526102 = r526099 + r526101;
        return r526102;
}

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 2019354 
(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)))