Average Error: 6.5 → 5.9
Time: 11.5s
Precision: 64
\[\frac{\frac{1.0}{x}}{y \cdot \left(1.0 + z \cdot z\right)}\]
\[\frac{\sqrt[3]{\frac{1}{x}}}{\sqrt{1.0 + z \cdot z}} \cdot \left(\frac{1.0}{y} \cdot \frac{\sqrt[3]{\frac{1}{x}} \cdot \sqrt[3]{\frac{1}{x}}}{\sqrt{1.0 + z \cdot z}}\right)\]
\frac{\frac{1.0}{x}}{y \cdot \left(1.0 + z \cdot z\right)}
\frac{\sqrt[3]{\frac{1}{x}}}{\sqrt{1.0 + z \cdot z}} \cdot \left(\frac{1.0}{y} \cdot \frac{\sqrt[3]{\frac{1}{x}} \cdot \sqrt[3]{\frac{1}{x}}}{\sqrt{1.0 + z \cdot z}}\right)
double f(double x, double y, double z) {
        double r18663481 = 1.0;
        double r18663482 = x;
        double r18663483 = r18663481 / r18663482;
        double r18663484 = y;
        double r18663485 = z;
        double r18663486 = r18663485 * r18663485;
        double r18663487 = r18663481 + r18663486;
        double r18663488 = r18663484 * r18663487;
        double r18663489 = r18663483 / r18663488;
        return r18663489;
}

double f(double x, double y, double z) {
        double r18663490 = 1.0;
        double r18663491 = x;
        double r18663492 = r18663490 / r18663491;
        double r18663493 = cbrt(r18663492);
        double r18663494 = 1.0;
        double r18663495 = z;
        double r18663496 = r18663495 * r18663495;
        double r18663497 = r18663494 + r18663496;
        double r18663498 = sqrt(r18663497);
        double r18663499 = r18663493 / r18663498;
        double r18663500 = y;
        double r18663501 = r18663494 / r18663500;
        double r18663502 = r18663493 * r18663493;
        double r18663503 = r18663502 / r18663498;
        double r18663504 = r18663501 * r18663503;
        double r18663505 = r18663499 * r18663504;
        return r18663505;
}

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.9
Herbie5.9
\[\begin{array}{l} \mathbf{if}\;y \cdot \left(1.0 + z \cdot z\right) \lt -\infty:\\ \;\;\;\;\frac{\frac{1.0}{y}}{\left(1.0 + z \cdot z\right) \cdot x}\\ \mathbf{elif}\;y \cdot \left(1.0 + z \cdot z\right) \lt 8.680743250567252 \cdot 10^{+305}:\\ \;\;\;\;\frac{\frac{1.0}{x}}{\left(1.0 + z \cdot z\right) \cdot y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{1.0}{y}}{\left(1.0 + z \cdot z\right) \cdot x}\\ \end{array}\]

Derivation

  1. Initial program 6.5

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

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

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

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

    \[\leadsto \frac{1.0}{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.0 + z \cdot z} \cdot \sqrt{1.0 + z \cdot z}}\]
  8. Applied times-frac7.0

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

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

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

Reproduce

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