Average Error: 18.8 → 18.8
Time: 17.5s
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 r30701140 = 2.0;
        double r30701141 = x;
        double r30701142 = y;
        double r30701143 = r30701141 * r30701142;
        double r30701144 = z;
        double r30701145 = r30701141 * r30701144;
        double r30701146 = r30701143 + r30701145;
        double r30701147 = r30701142 * r30701144;
        double r30701148 = r30701146 + r30701147;
        double r30701149 = sqrt(r30701148);
        double r30701150 = r30701140 * r30701149;
        return r30701150;
}

double f(double x, double y, double z) {
        double r30701151 = y;
        double r30701152 = z;
        double r30701153 = r30701151 + r30701152;
        double r30701154 = x;
        double r30701155 = r30701153 * r30701154;
        double r30701156 = r30701152 * r30701151;
        double r30701157 = r30701155 + r30701156;
        double r30701158 = sqrt(r30701157);
        double r30701159 = 2.0;
        double r30701160 = r30701158 * r30701159;
        return r30701160;
}

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

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

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

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

Reproduce

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