Average Error: 6.5 → 5.8
Time: 5.2s
Precision: 64
\[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\]
\[\begin{array}{l} \mathbf{if}\;\frac{1}{x} \le -2.8963162947031292 \cdot 10^{-71}:\\ \;\;\;\;\frac{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{y}}{\sqrt{1 + z \cdot z}} \cdot \frac{\frac{\sqrt[3]{1}}{x}}{\sqrt{1 + z \cdot z}}\\ \mathbf{elif}\;\frac{1}{x} \le 1.4134354570333115 \cdot 10^{231}:\\ \;\;\;\;\frac{\frac{\frac{1}{y}}{x}}{1 + z \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{y}}{\sqrt{1 + z \cdot z}} \cdot \sqrt{\frac{\frac{\sqrt[3]{1}}{x}}{\sqrt{1 + z \cdot z}}}\right) \cdot \sqrt{\frac{\frac{\sqrt[3]{1}}{x}}{\sqrt{1 + z \cdot z}}}\\ \end{array}\]
\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}
\begin{array}{l}
\mathbf{if}\;\frac{1}{x} \le -2.8963162947031292 \cdot 10^{-71}:\\
\;\;\;\;\frac{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{y}}{\sqrt{1 + z \cdot z}} \cdot \frac{\frac{\sqrt[3]{1}}{x}}{\sqrt{1 + z \cdot z}}\\

\mathbf{elif}\;\frac{1}{x} \le 1.4134354570333115 \cdot 10^{231}:\\
\;\;\;\;\frac{\frac{\frac{1}{y}}{x}}{1 + z \cdot z}\\

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

\end{array}
double f(double x, double y, double z) {
        double r351055 = 1.0;
        double r351056 = x;
        double r351057 = r351055 / r351056;
        double r351058 = y;
        double r351059 = z;
        double r351060 = r351059 * r351059;
        double r351061 = r351055 + r351060;
        double r351062 = r351058 * r351061;
        double r351063 = r351057 / r351062;
        return r351063;
}

double f(double x, double y, double z) {
        double r351064 = 1.0;
        double r351065 = x;
        double r351066 = r351064 / r351065;
        double r351067 = -2.896316294703129e-71;
        bool r351068 = r351066 <= r351067;
        double r351069 = cbrt(r351064);
        double r351070 = r351069 * r351069;
        double r351071 = y;
        double r351072 = r351070 / r351071;
        double r351073 = z;
        double r351074 = r351073 * r351073;
        double r351075 = r351064 + r351074;
        double r351076 = sqrt(r351075);
        double r351077 = r351072 / r351076;
        double r351078 = r351069 / r351065;
        double r351079 = r351078 / r351076;
        double r351080 = r351077 * r351079;
        double r351081 = 1.4134354570333115e+231;
        bool r351082 = r351066 <= r351081;
        double r351083 = r351064 / r351071;
        double r351084 = r351083 / r351065;
        double r351085 = r351084 / r351075;
        double r351086 = sqrt(r351079);
        double r351087 = r351077 * r351086;
        double r351088 = r351087 * r351086;
        double r351089 = r351082 ? r351085 : r351088;
        double r351090 = r351068 ? r351080 : r351089;
        return r351090;
}

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.5
Target5.8
Herbie5.8
\[\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. Split input into 3 regimes
  2. if (/ 1.0 x) < -2.896316294703129e-71

    1. Initial program 10.1

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

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

      \[\leadsto \frac{\frac{1}{x}}{\color{blue}{\left(y \cdot \sqrt{1 + z \cdot z}\right) \cdot \sqrt{1 + z \cdot z}}}\]
    5. Using strategy rm
    6. Applied *-un-lft-identity10.1

      \[\leadsto \frac{\frac{1}{\color{blue}{1 \cdot x}}}{\left(y \cdot \sqrt{1 + z \cdot z}\right) \cdot \sqrt{1 + z \cdot z}}\]
    7. Applied add-cube-cbrt10.1

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

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

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

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

    if -2.896316294703129e-71 < (/ 1.0 x) < 1.4134354570333115e+231

    1. Initial program 4.0

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

      \[\leadsto \color{blue}{\frac{\frac{\frac{1}{x}}{y}}{1 + z \cdot z}}\]
    4. Simplified3.7

      \[\leadsto \frac{\color{blue}{\frac{\frac{1}{y}}{x}}}{1 + z \cdot z}\]

    if 1.4134354570333115e+231 < (/ 1.0 x)

    1. Initial program 19.5

      \[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\]
    2. Using strategy rm
    3. Applied add-sqr-sqrt19.5

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

      \[\leadsto \frac{\frac{1}{x}}{\color{blue}{\left(y \cdot \sqrt{1 + z \cdot z}\right) \cdot \sqrt{1 + z \cdot z}}}\]
    5. Using strategy rm
    6. Applied *-un-lft-identity19.5

      \[\leadsto \frac{\frac{1}{\color{blue}{1 \cdot x}}}{\left(y \cdot \sqrt{1 + z \cdot z}\right) \cdot \sqrt{1 + z \cdot z}}\]
    7. Applied add-cube-cbrt19.5

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{y}}{\sqrt{1 + z \cdot z}}} \cdot \frac{\frac{\sqrt[3]{1}}{x}}{\sqrt{1 + z \cdot z}}\]
    11. Using strategy rm
    12. Applied add-sqr-sqrt16.8

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

      \[\leadsto \color{blue}{\left(\frac{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{y}}{\sqrt{1 + z \cdot z}} \cdot \sqrt{\frac{\frac{\sqrt[3]{1}}{x}}{\sqrt{1 + z \cdot z}}}\right) \cdot \sqrt{\frac{\frac{\sqrt[3]{1}}{x}}{\sqrt{1 + z \cdot z}}}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification5.8

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

Reproduce

herbie shell --seed 2020035 
(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)))))