Average Error: 6.2 → 6.2
Time: 11.2s
Precision: 64
\[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\]
\[\frac{\frac{1}{y}}{\left(1 + z \cdot z\right) \cdot x}\]
\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}
\frac{\frac{1}{y}}{\left(1 + z \cdot z\right) \cdot x}
double f(double x, double y, double z) {
        double r258202 = 1.0;
        double r258203 = x;
        double r258204 = r258202 / r258203;
        double r258205 = y;
        double r258206 = z;
        double r258207 = r258206 * r258206;
        double r258208 = r258202 + r258207;
        double r258209 = r258205 * r258208;
        double r258210 = r258204 / r258209;
        return r258210;
}

double f(double x, double y, double z) {
        double r258211 = 1.0;
        double r258212 = y;
        double r258213 = r258211 / r258212;
        double r258214 = z;
        double r258215 = r258214 * r258214;
        double r258216 = r258211 + r258215;
        double r258217 = x;
        double r258218 = r258216 * r258217;
        double r258219 = r258213 / r258218;
        return r258219;
}

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.2
Target5.5
Herbie6.2
\[\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.2

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

    \[\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*6.2

    \[\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-identity6.2

    \[\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 *-un-lft-identity6.2

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

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

    \[\leadsto \color{blue}{\frac{\frac{1}{1}}{y \cdot \sqrt{1 + z \cdot z}} \cdot \frac{\frac{1}{x}}{\sqrt{1 + z \cdot z}}}\]
  10. Simplified5.8

    \[\leadsto \color{blue}{\frac{1}{y \cdot \sqrt{1 + z \cdot z}}} \cdot \frac{\frac{1}{x}}{\sqrt{1 + z \cdot z}}\]
  11. Simplified5.9

    \[\leadsto \frac{1}{y \cdot \sqrt{1 + z \cdot z}} \cdot \color{blue}{\frac{1}{x \cdot \sqrt{1 + z \cdot z}}}\]
  12. Final simplification6.2

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

Reproduce

herbie shell --seed 2019291 
(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))) -inf.bf) (/ (/ 1 y) (* (+ 1 (* z z)) x)) (if (< (* y (+ 1 (* z z))) 8.68074325056725162e305) (/ (/ 1 x) (* (+ 1 (* z z)) y)) (/ (/ 1 y) (* (+ 1 (* z z)) x))))

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