Average Error: 15.0 → 1.9
Time: 12.2s
Precision: 64
\[\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\]
\[\begin{array}{l} \mathbf{if}\;z \le -1.544292488324377 \cdot 10^{-131}:\\ \;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z + 1} \cdot \left(\frac{\sqrt[3]{x}}{z} \cdot \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt{z + 1}}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{\frac{\frac{\sqrt[3]{x}}{\sqrt{z + 1}}}{\sqrt[3]{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 -1.544292488324377 \cdot 10^{-131}:\\
\;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z + 1} \cdot \left(\frac{\sqrt[3]{x}}{z} \cdot \frac{y}{z}\right)\\

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

\end{array}
double f(double x, double y, double z) {
        double r414663 = x;
        double r414664 = y;
        double r414665 = r414663 * r414664;
        double r414666 = z;
        double r414667 = r414666 * r414666;
        double r414668 = 1.0;
        double r414669 = r414666 + r414668;
        double r414670 = r414667 * r414669;
        double r414671 = r414665 / r414670;
        return r414671;
}

double f(double x, double y, double z) {
        double r414672 = z;
        double r414673 = -1.544292488324377e-131;
        bool r414674 = r414672 <= r414673;
        double r414675 = x;
        double r414676 = cbrt(r414675);
        double r414677 = r414676 * r414676;
        double r414678 = 1.0;
        double r414679 = r414672 + r414678;
        double r414680 = r414677 / r414679;
        double r414681 = r414676 / r414672;
        double r414682 = y;
        double r414683 = r414682 / r414672;
        double r414684 = r414681 * r414683;
        double r414685 = r414680 * r414684;
        double r414686 = sqrt(r414679);
        double r414687 = r414677 / r414686;
        double r414688 = cbrt(r414672);
        double r414689 = r414688 * r414688;
        double r414690 = r414687 / r414689;
        double r414691 = r414676 / r414686;
        double r414692 = r414691 / r414688;
        double r414693 = r414692 * r414682;
        double r414694 = r414693 / r414672;
        double r414695 = r414690 * r414694;
        double r414696 = r414674 ? r414685 : r414695;
        return r414696;
}

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
Herbie1.9
\[\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 < -1.544292488324377e-131

    1. Initial program 10.1

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

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

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

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

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

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

    if -1.544292488324377e-131 < z

    1. Initial program 18.8

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

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

      \[\leadsto \frac{x}{\color{blue}{\left(z + 1\right) \cdot \frac{{z}^{2}}{y}}}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt15.9

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

      \[\leadsto \color{blue}{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z + 1} \cdot \frac{\sqrt[3]{x}}{\frac{{z}^{2}}{y}}}\]
    8. Simplified4.9

      \[\leadsto \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z + 1} \cdot \color{blue}{\left(\frac{\sqrt[3]{x}}{z} \cdot \frac{y}{z}\right)}\]
    9. Using strategy rm
    10. Applied associate-*r*4.1

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

      \[\leadsto \color{blue}{\frac{\frac{{\left(\sqrt[3]{x}\right)}^{3}}{z + 1}}{z}} \cdot \frac{y}{z}\]
    12. Using strategy rm
    13. Applied add-cube-cbrt4.2

      \[\leadsto \frac{\frac{{\left(\sqrt[3]{x}\right)}^{3}}{z + 1}}{\color{blue}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}} \cdot \frac{y}{z}\]
    14. Applied add-sqr-sqrt4.2

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

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

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

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

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

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

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

Reproduce

herbie shell --seed 2020042 +o rules:numerics
(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))))