Average Error: 18.5 → 18.5
Time: 15.2s
Precision: 64
\[2.0 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}\]
\[\sqrt{\left(y + z\right) \cdot x + z \cdot y} \cdot 2.0\]
2.0 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}
\sqrt{\left(y + z\right) \cdot x + z \cdot y} \cdot 2.0
double f(double x, double y, double z) {
        double r34245835 = 2.0;
        double r34245836 = x;
        double r34245837 = y;
        double r34245838 = r34245836 * r34245837;
        double r34245839 = z;
        double r34245840 = r34245836 * r34245839;
        double r34245841 = r34245838 + r34245840;
        double r34245842 = r34245837 * r34245839;
        double r34245843 = r34245841 + r34245842;
        double r34245844 = sqrt(r34245843);
        double r34245845 = r34245835 * r34245844;
        return r34245845;
}

double f(double x, double y, double z) {
        double r34245846 = y;
        double r34245847 = z;
        double r34245848 = r34245846 + r34245847;
        double r34245849 = x;
        double r34245850 = r34245848 * r34245849;
        double r34245851 = r34245847 * r34245846;
        double r34245852 = r34245850 + r34245851;
        double r34245853 = sqrt(r34245852);
        double r34245854 = 2.0;
        double r34245855 = r34245853 * r34245854;
        return r34245855;
}

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.5
Target18.0
Herbie18.5
\[\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.5

    \[2.0 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}\]
  2. Simplified18.5

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

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

Reproduce

herbie shell --seed 2019158 
(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)))))