Average Error: 15.0 → 2.8
Time: 11.2s
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 r575063 = x;
        double r575064 = y;
        double r575065 = r575063 * r575064;
        double r575066 = z;
        double r575067 = r575066 * r575066;
        double r575068 = 1.0;
        double r575069 = r575066 + r575068;
        double r575070 = r575067 * r575069;
        double r575071 = r575065 / r575070;
        return r575071;
}

double f(double x, double y, double z) {
        double r575072 = z;
        double r575073 = 2.1377599442065233e-181;
        bool r575074 = r575072 <= r575073;
        double r575075 = x;
        double r575076 = cbrt(r575075);
        double r575077 = 3.0;
        double r575078 = pow(r575076, r575077);
        double r575079 = r575078 / r575072;
        double r575080 = 1.0;
        double r575081 = r575072 + r575080;
        double r575082 = y;
        double r575083 = r575081 / r575082;
        double r575084 = r575079 / r575083;
        double r575085 = 1.0;
        double r575086 = r575085 / r575072;
        double r575087 = r575084 * r575086;
        double r575088 = r575076 * r575076;
        double r575089 = r575088 / r575081;
        double r575090 = r575076 / r575072;
        double r575091 = r575090 * r575082;
        double r575092 = r575091 / r575072;
        double r575093 = r575089 * r575092;
        double r575094 = r575074 ? r575087 : r575093;
        return r575094;
}

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))))