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 r468500 = x;
        double r468501 = 2.0;
        double r468502 = r468500 * r468501;
        double r468503 = r468500 * r468500;
        double r468504 = r468502 + r468503;
        double r468505 = y;
        double r468506 = r468505 * r468505;
        double r468507 = r468504 + r468506;
        return r468507;
}

double f(double x, double y) {
        double r468508 = x;
        double r468509 = 2.0;
        double r468510 = r468508 * r468509;
        double r468511 = r468508 * r468508;
        double r468512 = r468510 + r468511;
        double r468513 = y;
        double r468514 = r468513 * r468513;
        double r468515 = r468512 + r468514;
        return r468515;
}

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 +o rules:numerics
(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)))