Average Error: 19.2 → 19.2
Time: 11.7s
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 r29472841 = 2.0;
        double r29472842 = x;
        double r29472843 = y;
        double r29472844 = r29472842 * r29472843;
        double r29472845 = z;
        double r29472846 = r29472842 * r29472845;
        double r29472847 = r29472844 + r29472846;
        double r29472848 = r29472843 * r29472845;
        double r29472849 = r29472847 + r29472848;
        double r29472850 = sqrt(r29472849);
        double r29472851 = r29472841 * r29472850;
        return r29472851;
}

double f(double x, double y, double z) {
        double r29472852 = y;
        double r29472853 = z;
        double r29472854 = r29472852 + r29472853;
        double r29472855 = x;
        double r29472856 = r29472854 * r29472855;
        double r29472857 = r29472853 * r29472852;
        double r29472858 = r29472856 + r29472857;
        double r29472859 = sqrt(r29472858);
        double r29472860 = 2.0;
        double r29472861 = r29472859 * r29472860;
        return r29472861;
}

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

Original19.2
Target18.3
Herbie19.2
\[\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 19.2

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

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

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

Reproduce

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