Average Error: 0.0 → 0.0
Time: 4.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 r540943 = x;
        double r540944 = 2.0;
        double r540945 = r540943 * r540944;
        double r540946 = r540943 * r540943;
        double r540947 = r540945 + r540946;
        double r540948 = y;
        double r540949 = r540948 * r540948;
        double r540950 = r540947 + r540949;
        return r540950;
}

double f(double x, double y) {
        double r540951 = x;
        double r540952 = 2.0;
        double r540953 = r540951 * r540952;
        double r540954 = r540951 * r540951;
        double r540955 = r540953 + r540954;
        double r540956 = y;
        double r540957 = r540956 * r540956;
        double r540958 = r540955 + r540957;
        return r540958;
}

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