Average Error: 15.0 → 2.8
Time: 10.6s
Precision: 64
\[\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\]
\[\begin{array}{l} \mathbf{if}\;z \le 2.13775994420652332 \cdot 10^{-181}:\\ \;\;\;\;\frac{\frac{{\left(\sqrt[3]{x}\right)}^{3}}{z}}{\frac{z + 1}{y}} \cdot \frac{1}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z + 1} \cdot \frac{\frac{\sqrt[3]{x}}{z} \cdot y}{z}\\ \end{array}\]
\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}
\begin{array}{l}
\mathbf{if}\;z \le 2.13775994420652332 \cdot 10^{-181}:\\
\;\;\;\;\frac{\frac{{\left(\sqrt[3]{x}\right)}^{3}}{z}}{\frac{z + 1}{y}} \cdot \frac{1}{z}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z + 1} \cdot \frac{\frac{\sqrt[3]{x}}{z} \cdot y}{z}\\

\end{array}
double f(double x, double y, double z) {
        double r365135 = x;
        double r365136 = y;
        double r365137 = r365135 * r365136;
        double r365138 = z;
        double r365139 = r365138 * r365138;
        double r365140 = 1.0;
        double r365141 = r365138 + r365140;
        double r365142 = r365139 * r365141;
        double r365143 = r365137 / r365142;
        return r365143;
}

double f(double x, double y, double z) {
        double r365144 = z;
        double r365145 = 2.1377599442065233e-181;
        bool r365146 = r365144 <= r365145;
        double r365147 = x;
        double r365148 = cbrt(r365147);
        double r365149 = 3.0;
        double r365150 = pow(r365148, r365149);
        double r365151 = r365150 / r365144;
        double r365152 = 1.0;
        double r365153 = r365144 + r365152;
        double r365154 = y;
        double r365155 = r365153 / r365154;
        double r365156 = r365151 / r365155;
        double r365157 = 1.0;
        double r365158 = r365157 / r365144;
        double r365159 = r365156 * r365158;
        double r365160 = r365148 * r365148;
        double r365161 = r365160 / r365153;
        double r365162 = r365148 / r365144;
        double r365163 = r365162 * r365154;
        double r365164 = r365163 / r365144;
        double r365165 = r365161 * r365164;
        double r365166 = r365146 ? r365159 : r365165;
        return r365166;
}

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

Original15.0
Target4.1
Herbie2.8
\[\begin{array}{l} \mathbf{if}\;z \lt 249.618281453230708:\\ \;\;\;\;\frac{y \cdot \frac{x}{z}}{z + z \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{y}{z}}{1 + z} \cdot x}{z}\\ \end{array}\]

Derivation

  1. Split input into 2 regimes
  2. if z < 2.1377599442065233e-181

    1. Initial program 18.2

      \[\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\]
    2. Using strategy rm
    3. Applied associate-/l*16.7

      \[\leadsto \color{blue}{\frac{x}{\frac{\left(z \cdot z\right) \cdot \left(z + 1\right)}{y}}}\]
    4. Simplified15.1

      \[\leadsto \frac{x}{\color{blue}{\left(z + 1\right) \cdot \frac{z \cdot z}{y}}}\]
    5. Using strategy rm
    6. Applied associate-/l*9.1

      \[\leadsto \frac{x}{\left(z + 1\right) \cdot \color{blue}{\frac{z}{\frac{y}{z}}}}\]
    7. Using strategy rm
    8. Applied add-cube-cbrt9.6

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(z + 1\right) \cdot \frac{z}{\frac{y}{z}}}\]
    9. Applied times-frac7.4

      \[\leadsto \color{blue}{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z + 1} \cdot \frac{\sqrt[3]{x}}{\frac{z}{\frac{y}{z}}}}\]
    10. Simplified4.5

      \[\leadsto \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z + 1} \cdot \color{blue}{\frac{\frac{\sqrt[3]{x}}{z} \cdot y}{z}}\]
    11. Using strategy rm
    12. Applied div-inv4.5

      \[\leadsto \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z + 1} \cdot \color{blue}{\left(\left(\frac{\sqrt[3]{x}}{z} \cdot y\right) \cdot \frac{1}{z}\right)}\]
    13. Applied associate-*r*1.8

      \[\leadsto \color{blue}{\left(\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z + 1} \cdot \left(\frac{\sqrt[3]{x}}{z} \cdot y\right)\right) \cdot \frac{1}{z}}\]
    14. Simplified3.4

      \[\leadsto \color{blue}{\frac{\frac{{\left(\sqrt[3]{x}\right)}^{3}}{z}}{\frac{z + 1}{y}}} \cdot \frac{1}{z}\]

    if 2.1377599442065233e-181 < z

    1. Initial program 11.3

      \[\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\]
    2. Using strategy rm
    3. Applied associate-/l*9.3

      \[\leadsto \color{blue}{\frac{x}{\frac{\left(z \cdot z\right) \cdot \left(z + 1\right)}{y}}}\]
    4. Simplified7.5

      \[\leadsto \frac{x}{\color{blue}{\left(z + 1\right) \cdot \frac{z \cdot z}{y}}}\]
    5. Using strategy rm
    6. Applied associate-/l*5.8

      \[\leadsto \frac{x}{\left(z + 1\right) \cdot \color{blue}{\frac{z}{\frac{y}{z}}}}\]
    7. Using strategy rm
    8. Applied add-cube-cbrt6.2

      \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(z + 1\right) \cdot \frac{z}{\frac{y}{z}}}\]
    9. Applied times-frac3.7

      \[\leadsto \color{blue}{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z + 1} \cdot \frac{\sqrt[3]{x}}{\frac{z}{\frac{y}{z}}}}\]
    10. Simplified2.2

      \[\leadsto \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z + 1} \cdot \color{blue}{\frac{\frac{\sqrt[3]{x}}{z} \cdot y}{z}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification2.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le 2.13775994420652332 \cdot 10^{-181}:\\ \;\;\;\;\frac{\frac{{\left(\sqrt[3]{x}\right)}^{3}}{z}}{\frac{z + 1}{y}} \cdot \frac{1}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z + 1} \cdot \frac{\frac{\sqrt[3]{x}}{z} \cdot y}{z}\\ \end{array}\]

Reproduce

herbie shell --seed 2020042 
(FPCore (x y z)
  :name "Statistics.Distribution.Beta:$cvariance from math-functions-0.1.5.2"
  :precision binary64

  :herbie-target
  (if (< z 249.6182814532307) (/ (* y (/ x z)) (+ z (* z z))) (/ (* (/ (/ y z) (+ 1 z)) x) z))

  (/ (* x y) (* (* z z) (+ z 1))))