Average Error: 0.0 → 0.0
Time: 2.1s
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 r439996 = x;
        double r439997 = 2.0;
        double r439998 = r439996 * r439997;
        double r439999 = r439996 * r439996;
        double r440000 = r439998 + r439999;
        double r440001 = y;
        double r440002 = r440001 * r440001;
        double r440003 = r440000 + r440002;
        return r440003;
}

double f(double x, double y) {
        double r440004 = x;
        double r440005 = 2.0;
        double r440006 = r440004 * r440005;
        double r440007 = r440004 * r440004;
        double r440008 = r440006 + r440007;
        double r440009 = y;
        double r440010 = r440009 * r440009;
        double r440011 = r440008 + r440010;
        return r440011;
}

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