Average Error: 0.0 → 0.0
Time: 4.2s
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 r2477 = x;
        double r2478 = 2.0;
        double r2479 = r2477 * r2478;
        double r2480 = r2477 * r2477;
        double r2481 = r2479 + r2480;
        double r2482 = y;
        double r2483 = r2482 * r2482;
        double r2484 = r2481 + r2483;
        return r2484;
}

double f(double x, double y) {
        double r2485 = x;
        double r2486 = 2.0;
        double r2487 = r2485 * r2486;
        double r2488 = r2485 * r2485;
        double r2489 = r2487 + r2488;
        double r2490 = y;
        double r2491 = r2490 * r2490;
        double r2492 = r2489 + r2491;
        return r2492;
}

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 2020025 +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)))