Average Error: 0.0 → 0.0
Time: 1.0s
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 r489496 = x;
        double r489497 = 2.0;
        double r489498 = r489496 * r489497;
        double r489499 = r489496 * r489496;
        double r489500 = r489498 + r489499;
        double r489501 = y;
        double r489502 = r489501 * r489501;
        double r489503 = r489500 + r489502;
        return r489503;
}

double f(double x, double y) {
        double r489504 = x;
        double r489505 = 2.0;
        double r489506 = r489504 * r489505;
        double r489507 = r489504 * r489504;
        double r489508 = r489506 + r489507;
        double r489509 = y;
        double r489510 = r489509 * r489509;
        double r489511 = r489508 + r489510;
        return r489511;
}

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