Average Error: 0.0 → 0.0
Time: 5.6s
Precision: 64
\[\left(x \cdot 2.0 + x \cdot x\right) + y \cdot y\]
\[y \cdot y + \left(x \cdot x + x \cdot 2.0\right)\]
\left(x \cdot 2.0 + x \cdot x\right) + y \cdot y
y \cdot y + \left(x \cdot x + x \cdot 2.0\right)
double f(double x, double y) {
        double r19640039 = x;
        double r19640040 = 2.0;
        double r19640041 = r19640039 * r19640040;
        double r19640042 = r19640039 * r19640039;
        double r19640043 = r19640041 + r19640042;
        double r19640044 = y;
        double r19640045 = r19640044 * r19640044;
        double r19640046 = r19640043 + r19640045;
        return r19640046;
}

double f(double x, double y) {
        double r19640047 = y;
        double r19640048 = r19640047 * r19640047;
        double r19640049 = x;
        double r19640050 = r19640049 * r19640049;
        double r19640051 = 2.0;
        double r19640052 = r19640049 * r19640051;
        double r19640053 = r19640050 + r19640052;
        double r19640054 = r19640048 + r19640053;
        return r19640054;
}

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.0 \cdot x + x \cdot x\right)\]

Derivation

  1. Initial program 0.0

    \[\left(x \cdot 2.0 + x \cdot x\right) + y \cdot y\]
  2. Final simplification0.0

    \[\leadsto y \cdot y + \left(x \cdot x + x \cdot 2.0\right)\]

Reproduce

herbie shell --seed 2019163 
(FPCore (x y)
  :name "Numeric.Log:$clog1p from log-domain-0.10.2.1, A"

  :herbie-target
  (+ (* y y) (+ (* 2.0 x) (* x x)))

  (+ (+ (* x 2.0) (* x x)) (* y y)))