Average Error: 14.4 → 3.6
Time: 9.9s
Precision: 64
\[\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\]
\[\frac{{\left(\sqrt[3]{x}\right)}^{3}}{z} \cdot \frac{\frac{y}{z + 1}}{z}\]
\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}
\frac{{\left(\sqrt[3]{x}\right)}^{3}}{z} \cdot \frac{\frac{y}{z + 1}}{z}
double f(double x, double y, double z) {
        double r192719 = x;
        double r192720 = y;
        double r192721 = r192719 * r192720;
        double r192722 = z;
        double r192723 = r192722 * r192722;
        double r192724 = 1.0;
        double r192725 = r192722 + r192724;
        double r192726 = r192723 * r192725;
        double r192727 = r192721 / r192726;
        return r192727;
}

double f(double x, double y, double z) {
        double r192728 = x;
        double r192729 = cbrt(r192728);
        double r192730 = 3.0;
        double r192731 = pow(r192729, r192730);
        double r192732 = z;
        double r192733 = r192731 / r192732;
        double r192734 = y;
        double r192735 = 1.0;
        double r192736 = r192732 + r192735;
        double r192737 = r192734 / r192736;
        double r192738 = r192737 / r192732;
        double r192739 = r192733 * r192738;
        return r192739;
}

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

Original14.4
Target3.9
Herbie3.6
\[\begin{array}{l} \mathbf{if}\;z \lt 249.6182814532307077115547144785523414612:\\ \;\;\;\;\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. Initial program 14.4

    \[\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\]
  2. Using strategy rm
  3. Applied times-frac11.0

    \[\leadsto \color{blue}{\frac{x}{z \cdot z} \cdot \frac{y}{z + 1}}\]
  4. Using strategy rm
  5. Applied add-cube-cbrt11.4

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

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

    \[\leadsto \color{blue}{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{z} \cdot \left(\frac{\sqrt[3]{x}}{z} \cdot \frac{y}{z + 1}\right)}\]
  8. Using strategy rm
  9. Applied div-inv1.3

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

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

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

Reproduce

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

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

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