Average Error: 6.7 → 6.0
Time: 5.2s
Precision: 64
\[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\]
\[\frac{\sqrt[3]{\frac{1}{y}}}{\frac{\sqrt{1 + z \cdot z}}{\sqrt[3]{\frac{1}{y}}}} \cdot \frac{\frac{\sqrt[3]{\frac{1}{y}}}{\sqrt{1 + z \cdot z}}}{x}\]
\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}
\frac{\sqrt[3]{\frac{1}{y}}}{\frac{\sqrt{1 + z \cdot z}}{\sqrt[3]{\frac{1}{y}}}} \cdot \frac{\frac{\sqrt[3]{\frac{1}{y}}}{\sqrt{1 + z \cdot z}}}{x}
double f(double x, double y, double z) {
        double r288231 = 1.0;
        double r288232 = x;
        double r288233 = r288231 / r288232;
        double r288234 = y;
        double r288235 = z;
        double r288236 = r288235 * r288235;
        double r288237 = r288231 + r288236;
        double r288238 = r288234 * r288237;
        double r288239 = r288233 / r288238;
        return r288239;
}

double f(double x, double y, double z) {
        double r288240 = 1.0;
        double r288241 = y;
        double r288242 = r288240 / r288241;
        double r288243 = cbrt(r288242);
        double r288244 = z;
        double r288245 = r288244 * r288244;
        double r288246 = r288240 + r288245;
        double r288247 = sqrt(r288246);
        double r288248 = r288247 / r288243;
        double r288249 = r288243 / r288248;
        double r288250 = r288243 / r288247;
        double r288251 = x;
        double r288252 = r288250 / r288251;
        double r288253 = r288249 * r288252;
        return r288253;
}

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.7
Target6.1
Herbie6.0
\[\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.7

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

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

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

    \[\leadsto \frac{\frac{\frac{1}{y}}{x}}{\color{blue}{\sqrt{1 + z \cdot z} \cdot \sqrt{1 + z \cdot z}}}\]
  7. Applied div-inv6.9

    \[\leadsto \frac{\color{blue}{\frac{1}{y} \cdot \frac{1}{x}}}{\sqrt{1 + z \cdot z} \cdot \sqrt{1 + z \cdot z}}\]
  8. Applied times-frac6.2

    \[\leadsto \color{blue}{\frac{\frac{1}{y}}{\sqrt{1 + z \cdot z}} \cdot \frac{\frac{1}{x}}{\sqrt{1 + z \cdot z}}}\]
  9. Using strategy rm
  10. Applied pow16.2

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

    \[\leadsto \color{blue}{{\left(\frac{\frac{1}{y}}{\sqrt{1 + z \cdot z}}\right)}^{1}} \cdot {\left(\frac{\frac{1}{x}}{\sqrt{1 + z \cdot z}}\right)}^{1}\]
  12. Applied pow-prod-down6.2

    \[\leadsto \color{blue}{{\left(\frac{\frac{1}{y}}{\sqrt{1 + z \cdot z}} \cdot \frac{\frac{1}{x}}{\sqrt{1 + z \cdot z}}\right)}^{1}}\]
  13. Simplified6.2

    \[\leadsto {\color{blue}{\left(\frac{\frac{\frac{1}{y}}{\sqrt{1 + z \cdot z}}}{\sqrt{1 + z \cdot z} \cdot x}\right)}}^{1}\]
  14. Using strategy rm
  15. Applied *-un-lft-identity6.2

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

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

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

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

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

    \[\leadsto {\left(\color{blue}{\frac{\sqrt[3]{\frac{1}{y}}}{\frac{\sqrt{1 + z \cdot z}}{\sqrt[3]{\frac{1}{y}}}}} \cdot \frac{\frac{\sqrt[3]{\frac{1}{y}}}{\sqrt{1 + z \cdot z}}}{x}\right)}^{1}\]
  21. Final simplification6.0

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

Reproduce

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