Average Error: 0.0 → 0.0
Time: 1.9s
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 r672654 = x;
        double r672655 = 2.0;
        double r672656 = r672654 * r672655;
        double r672657 = r672654 * r672654;
        double r672658 = r672656 + r672657;
        double r672659 = y;
        double r672660 = r672659 * r672659;
        double r672661 = r672658 + r672660;
        return r672661;
}

double f(double x, double y) {
        double r672662 = x;
        double r672663 = 2.0;
        double r672664 = r672662 * r672663;
        double r672665 = r672662 * r672662;
        double r672666 = r672664 + r672665;
        double r672667 = y;
        double r672668 = r672667 * r672667;
        double r672669 = r672666 + r672668;
        return r672669;
}

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