Average Error: 0.1 → 0.1
Time: 15.8s
Precision: 64
\[\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y\]
\[\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y\]
\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
\left(\left(x \cdot x + y \cdot y\right) + y \cdot y\right) + y \cdot y
double f(double x, double y) {
        double r370848 = x;
        double r370849 = r370848 * r370848;
        double r370850 = y;
        double r370851 = r370850 * r370850;
        double r370852 = r370849 + r370851;
        double r370853 = r370852 + r370851;
        double r370854 = r370853 + r370851;
        return r370854;
}

double f(double x, double y) {
        double r370855 = x;
        double r370856 = r370855 * r370855;
        double r370857 = y;
        double r370858 = r370857 * r370857;
        double r370859 = r370856 + r370858;
        double r370860 = r370859 + r370858;
        double r370861 = r370860 + r370858;
        return r370861;
}

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.1
Target0.1
Herbie0.1
\[x \cdot x + y \cdot \left(y + \left(y + y\right)\right)\]

Derivation

  1. Initial program 0.1

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

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

Reproduce

herbie shell --seed 2019325 
(FPCore (x y)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, E"
  :precision binary64

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

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