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 r698628 = x;
        double r698629 = 2.0;
        double r698630 = r698628 * r698629;
        double r698631 = r698628 * r698628;
        double r698632 = r698630 + r698631;
        double r698633 = y;
        double r698634 = r698633 * r698633;
        double r698635 = r698632 + r698634;
        return r698635;
}

double f(double x, double y) {
        double r698636 = x;
        double r698637 = 2.0;
        double r698638 = r698636 * r698637;
        double r698639 = r698636 * r698636;
        double r698640 = r698638 + r698639;
        double r698641 = y;
        double r698642 = r698641 * r698641;
        double r698643 = r698640 + r698642;
        return r698643;
}

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