Average Error: 6.1 → 6.4
Time: 3.5s
Precision: 64
\[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\]
\[\frac{1}{y} \cdot \frac{\frac{1}{x}}{1 + z \cdot z}\]
\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}
\frac{1}{y} \cdot \frac{\frac{1}{x}}{1 + z \cdot z}
double f(double x, double y, double z) {
        double r293455 = 1.0;
        double r293456 = x;
        double r293457 = r293455 / r293456;
        double r293458 = y;
        double r293459 = z;
        double r293460 = r293459 * r293459;
        double r293461 = r293455 + r293460;
        double r293462 = r293458 * r293461;
        double r293463 = r293457 / r293462;
        return r293463;
}

double f(double x, double y, double z) {
        double r293464 = 1.0;
        double r293465 = y;
        double r293466 = r293464 / r293465;
        double r293467 = 1.0;
        double r293468 = x;
        double r293469 = r293467 / r293468;
        double r293470 = z;
        double r293471 = r293470 * r293470;
        double r293472 = r293464 + r293471;
        double r293473 = r293469 / r293472;
        double r293474 = r293466 * r293473;
        return r293474;
}

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.1
Target5.6
Herbie6.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.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.1

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

    \[\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. Final simplification6.4

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

Reproduce

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