Average Error: 6.4 → 5.7
Time: 4.0s
Precision: 64
\[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\]
\[\left(\frac{1}{y} \cdot \frac{\sqrt[3]{\frac{1}{x}} \cdot \sqrt[3]{\frac{1}{x}}}{\sqrt{1 + z \cdot z}}\right) \cdot \frac{\frac{\sqrt[3]{1}}{\sqrt[3]{x}}}{\sqrt{1 + z \cdot z}}\]
\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}
\left(\frac{1}{y} \cdot \frac{\sqrt[3]{\frac{1}{x}} \cdot \sqrt[3]{\frac{1}{x}}}{\sqrt{1 + z \cdot z}}\right) \cdot \frac{\frac{\sqrt[3]{1}}{\sqrt[3]{x}}}{\sqrt{1 + z \cdot z}}
double f(double x, double y, double z) {
        double r332843 = 1.0;
        double r332844 = x;
        double r332845 = r332843 / r332844;
        double r332846 = y;
        double r332847 = z;
        double r332848 = r332847 * r332847;
        double r332849 = r332843 + r332848;
        double r332850 = r332846 * r332849;
        double r332851 = r332845 / r332850;
        return r332851;
}

double f(double x, double y, double z) {
        double r332852 = 1.0;
        double r332853 = y;
        double r332854 = r332852 / r332853;
        double r332855 = 1.0;
        double r332856 = x;
        double r332857 = r332855 / r332856;
        double r332858 = cbrt(r332857);
        double r332859 = r332858 * r332858;
        double r332860 = z;
        double r332861 = r332860 * r332860;
        double r332862 = r332852 + r332861;
        double r332863 = sqrt(r332862);
        double r332864 = r332859 / r332863;
        double r332865 = r332854 * r332864;
        double r332866 = cbrt(r332855);
        double r332867 = cbrt(r332856);
        double r332868 = r332866 / r332867;
        double r332869 = r332868 / r332863;
        double r332870 = r332865 * r332869;
        return r332870;
}

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

Original6.4
Target5.7
Herbie5.7
\[\begin{array}{l} \mathbf{if}\;y \cdot \left(1 + z \cdot z\right) \lt -\infty:\\ \;\;\;\;\frac{\frac{1}{y}}{\left(1 + z \cdot z\right) \cdot x}\\ \mathbf{elif}\;y \cdot \left(1 + z \cdot z\right) \lt 8.68074325056725162 \cdot 10^{305}:\\ \;\;\;\;\frac{\frac{1}{x}}{\left(1 + z \cdot z\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1}{y}}{\left(1 + z \cdot z\right) \cdot x}\\ \end{array}\]

Derivation

  1. Initial program 6.4

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

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

    \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{\frac{1}{x}}{1 + z \cdot z}}\]
  5. Using strategy rm
  6. Applied add-sqr-sqrt6.2

    \[\leadsto \frac{1}{y} \cdot \frac{\frac{1}{x}}{\color{blue}{\sqrt{1 + z \cdot z} \cdot \sqrt{1 + z \cdot z}}}\]
  7. Applied add-cube-cbrt6.8

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

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

    \[\leadsto \color{blue}{\left(\frac{1}{y} \cdot \frac{\sqrt[3]{\frac{1}{x}} \cdot \sqrt[3]{\frac{1}{x}}}{\sqrt{1 + z \cdot z}}\right) \cdot \frac{\sqrt[3]{\frac{1}{x}}}{\sqrt{1 + z \cdot z}}}\]
  10. Using strategy rm
  11. Applied cbrt-div5.7

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

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

Reproduce

herbie shell --seed 2020020 
(FPCore (x y z)
  :name "Statistics.Distribution.CauchyLorentz:$cdensity from math-functions-0.1.5.2"
  :precision binary64

  :herbie-target
  (if (< (* y (+ 1 (* z z))) #f) (/ (/ 1 y) (* (+ 1 (* z z)) x)) (if (< (* y (+ 1 (* z z))) 8.680743250567252e+305) (/ (/ 1 x) (* (+ 1 (* z z)) y)) (/ (/ 1 y) (* (+ 1 (* z z)) x))))

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