Average Error: 18.7 → 18.7
Time: 18.1s
Precision: 64
\[2.0 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}\]
\[2.0 \cdot \sqrt{\left(y + z\right) \cdot x + z \cdot y}\]
2.0 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}
2.0 \cdot \sqrt{\left(y + z\right) \cdot x + z \cdot y}
double f(double x, double y, double z) {
        double r35666555 = 2.0;
        double r35666556 = x;
        double r35666557 = y;
        double r35666558 = r35666556 * r35666557;
        double r35666559 = z;
        double r35666560 = r35666556 * r35666559;
        double r35666561 = r35666558 + r35666560;
        double r35666562 = r35666557 * r35666559;
        double r35666563 = r35666561 + r35666562;
        double r35666564 = sqrt(r35666563);
        double r35666565 = r35666555 * r35666564;
        return r35666565;
}

double f(double x, double y, double z) {
        double r35666566 = 2.0;
        double r35666567 = y;
        double r35666568 = z;
        double r35666569 = r35666567 + r35666568;
        double r35666570 = x;
        double r35666571 = r35666569 * r35666570;
        double r35666572 = r35666568 * r35666567;
        double r35666573 = r35666571 + r35666572;
        double r35666574 = sqrt(r35666573);
        double r35666575 = r35666566 * r35666574;
        return r35666575;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original18.7
Target18.1
Herbie18.7
\[\begin{array}{l} \mathbf{if}\;z \lt 7.636950090573675 \cdot 10^{+176}:\\ \;\;\;\;2.0 \cdot \sqrt{\left(x + y\right) \cdot z + x \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\frac{1}{4} \cdot \left(\left({y}^{\frac{-3}{4}} \cdot \left({z}^{\frac{-3}{4}} \cdot x\right)\right) \cdot \left(y + z\right)\right) + {z}^{\frac{1}{4}} \cdot {y}^{\frac{1}{4}}\right) \cdot \left(\frac{1}{4} \cdot \left(\left({y}^{\frac{-3}{4}} \cdot \left({z}^{\frac{-3}{4}} \cdot x\right)\right) \cdot \left(y + z\right)\right) + {z}^{\frac{1}{4}} \cdot {y}^{\frac{1}{4}}\right)\right) \cdot 2.0\\ \end{array}\]

Derivation

  1. Initial program 18.7

    \[2.0 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}\]
  2. Taylor expanded around 0 18.7

    \[\leadsto 2.0 \cdot \sqrt{\color{blue}{\left(x \cdot y + x \cdot z\right)} + y \cdot z}\]
  3. Simplified18.7

    \[\leadsto 2.0 \cdot \sqrt{\color{blue}{\left(y + z\right) \cdot x} + y \cdot z}\]
  4. Final simplification18.7

    \[\leadsto 2.0 \cdot \sqrt{\left(y + z\right) \cdot x + z \cdot y}\]

Reproduce

herbie shell --seed 2019162 
(FPCore (x y z)
  :name "Diagrams.TwoD.Apollonian:descartes from diagrams-contrib-1.3.0.5"

  :herbie-target
  (if (< z 7.636950090573675e+176) (* 2.0 (sqrt (+ (* (+ x y) z) (* x y)))) (* (* (+ (* 1/4 (* (* (pow y -3/4) (* (pow z -3/4) x)) (+ y z))) (* (pow z 1/4) (pow y 1/4))) (+ (* 1/4 (* (* (pow y -3/4) (* (pow z -3/4) x)) (+ y z))) (* (pow z 1/4) (pow y 1/4)))) 2.0))

  (* 2.0 (sqrt (+ (+ (* x y) (* x z)) (* y z)))))