Average Error: 6.5 → 5.8
Time: 18.0s
Precision: 64
\[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\]
\[\left(\frac{1}{y} \cdot \frac{\frac{1}{\sqrt[3]{x} \cdot \sqrt[3]{x}}}{\sqrt{1 + z \cdot z}}\right) \cdot \frac{\frac{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{\frac{1}{\sqrt[3]{x} \cdot \sqrt[3]{x}}}{\sqrt{1 + z \cdot z}}\right) \cdot \frac{\frac{1}{\sqrt[3]{x}}}{\sqrt{1 + z \cdot z}}
double f(double x, double y, double z) {
        double r23203797 = 1.0;
        double r23203798 = x;
        double r23203799 = r23203797 / r23203798;
        double r23203800 = y;
        double r23203801 = z;
        double r23203802 = r23203801 * r23203801;
        double r23203803 = r23203797 + r23203802;
        double r23203804 = r23203800 * r23203803;
        double r23203805 = r23203799 / r23203804;
        return r23203805;
}

double f(double x, double y, double z) {
        double r23203806 = 1.0;
        double r23203807 = y;
        double r23203808 = r23203806 / r23203807;
        double r23203809 = 1.0;
        double r23203810 = x;
        double r23203811 = cbrt(r23203810);
        double r23203812 = r23203811 * r23203811;
        double r23203813 = r23203809 / r23203812;
        double r23203814 = z;
        double r23203815 = r23203814 * r23203814;
        double r23203816 = r23203806 + r23203815;
        double r23203817 = sqrt(r23203816);
        double r23203818 = r23203813 / r23203817;
        double r23203819 = r23203808 * r23203818;
        double r23203820 = r23203809 / r23203811;
        double r23203821 = r23203820 / r23203817;
        double r23203822 = r23203819 * r23203821;
        return r23203822;
}

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.7
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.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. Initial program 6.5

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

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

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

    \[\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-cbrt7.0

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

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

    \[\leadsto \frac{1}{y} \cdot \frac{\color{blue}{\frac{\sqrt{1}}{\sqrt[3]{x} \cdot \sqrt[3]{x}} \cdot \frac{\sqrt{1}}{\sqrt[3]{x}}}}{\sqrt{1 + z \cdot z} \cdot \sqrt{1 + z \cdot z}}\]
  10. Applied times-frac7.0

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

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

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

Reproduce

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

  :herbie-target
  (if (< (* y (+ 1.0 (* z z))) -inf.0) (/ (/ 1.0 y) (* (+ 1.0 (* z z)) x)) (if (< (* y (+ 1.0 (* z z))) 8.680743250567252e+305) (/ (/ 1.0 x) (* (+ 1.0 (* z z)) y)) (/ (/ 1.0 y) (* (+ 1.0 (* z z)) x))))

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