Average Error: 6.3 → 2.4
Time: 8.0s
Precision: 64
\[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\]
\[\begin{array}{l} \mathbf{if}\;\frac{1}{x} \le -237562455431070744576 \lor \neg \left(\frac{1}{x} \le 2.344126945452436231818170630862504221596 \cdot 10^{59}\right):\\ \;\;\;\;\frac{\sqrt[3]{1}}{\left(\left(x \cdot z\right) \cdot z + 1 \cdot x\right) \cdot y} \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \left(\frac{\sqrt[3]{\sqrt[3]{1}} \cdot \sqrt[3]{\sqrt[3]{1}}}{{z}^{2} + 1} \cdot \frac{\frac{\sqrt[3]{\sqrt[3]{1}}}{y}}{x}\right)\\ \end{array}\]
\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}
\begin{array}{l}
\mathbf{if}\;\frac{1}{x} \le -237562455431070744576 \lor \neg \left(\frac{1}{x} \le 2.344126945452436231818170630862504221596 \cdot 10^{59}\right):\\
\;\;\;\;\frac{\sqrt[3]{1}}{\left(\left(x \cdot z\right) \cdot z + 1 \cdot x\right) \cdot y} \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)\\

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

\end{array}
double f(double x, double y, double z) {
        double r259436 = 1.0;
        double r259437 = x;
        double r259438 = r259436 / r259437;
        double r259439 = y;
        double r259440 = z;
        double r259441 = r259440 * r259440;
        double r259442 = r259436 + r259441;
        double r259443 = r259439 * r259442;
        double r259444 = r259438 / r259443;
        return r259444;
}

double f(double x, double y, double z) {
        double r259445 = 1.0;
        double r259446 = x;
        double r259447 = r259445 / r259446;
        double r259448 = -2.3756245543107074e+20;
        bool r259449 = r259447 <= r259448;
        double r259450 = 2.3441269454524362e+59;
        bool r259451 = r259447 <= r259450;
        double r259452 = !r259451;
        bool r259453 = r259449 || r259452;
        double r259454 = cbrt(r259445);
        double r259455 = z;
        double r259456 = r259446 * r259455;
        double r259457 = r259456 * r259455;
        double r259458 = r259445 * r259446;
        double r259459 = r259457 + r259458;
        double r259460 = y;
        double r259461 = r259459 * r259460;
        double r259462 = r259454 / r259461;
        double r259463 = r259454 * r259454;
        double r259464 = r259462 * r259463;
        double r259465 = cbrt(r259454);
        double r259466 = r259465 * r259465;
        double r259467 = 2.0;
        double r259468 = pow(r259455, r259467);
        double r259469 = r259468 + r259445;
        double r259470 = r259466 / r259469;
        double r259471 = r259465 / r259460;
        double r259472 = r259471 / r259446;
        double r259473 = r259470 * r259472;
        double r259474 = r259463 * r259473;
        double r259475 = r259453 ? r259464 : r259474;
        return r259475;
}

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.3
Target5.6
Herbie2.4
\[\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.680743250567251617010582226806563373013 \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 2 regimes
  2. if (/ 1.0 x) < -2.3756245543107074e+20 or 2.3441269454524362e+59 < (/ 1.0 x)

    1. Initial program 13.1

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1} \cdot \frac{\sqrt[3]{1}}{\color{blue}{\left(x \cdot \left({z}^{2} + 1\right)\right) \cdot y}}\]
    15. Using strategy rm
    16. Applied distribute-lft-in10.2

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

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

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

    if -2.3756245543107074e+20 < (/ 1.0 x) < 2.3441269454524362e+59

    1. Initial program 1.9

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

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

      \[\leadsto \color{blue}{\frac{1}{y} \cdot \frac{\frac{1}{x}}{1 + z \cdot z}}\]
    5. Using strategy rm
    6. Applied *-un-lft-identity3.6

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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