Average Error: 6.3 → 3.7
Time: 3.5s
Precision: 64
\[\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\]
\[\frac{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}}{\frac{\left(\left(y \cdot z\right) \cdot z + y \cdot 1\right) \cdot x}{\sqrt[3]{1}}}\]
\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}
\frac{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}}{\frac{\left(\left(y \cdot z\right) \cdot z + y \cdot 1\right) \cdot x}{\sqrt[3]{1}}}
double f(double x, double y, double z) {
        double r303961 = 1.0;
        double r303962 = x;
        double r303963 = r303961 / r303962;
        double r303964 = y;
        double r303965 = z;
        double r303966 = r303965 * r303965;
        double r303967 = r303961 + r303966;
        double r303968 = r303964 * r303967;
        double r303969 = r303963 / r303968;
        return r303969;
}

double f(double x, double y, double z) {
        double r303970 = 1.0;
        double r303971 = cbrt(r303970);
        double r303972 = r303971 * r303971;
        double r303973 = 1.0;
        double r303974 = r303972 / r303973;
        double r303975 = y;
        double r303976 = z;
        double r303977 = r303975 * r303976;
        double r303978 = r303977 * r303976;
        double r303979 = r303975 * r303970;
        double r303980 = r303978 + r303979;
        double r303981 = x;
        double r303982 = r303980 * r303981;
        double r303983 = r303982 / r303971;
        double r303984 = r303974 / r303983;
        return r303984;
}

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.3
Target5.8
Herbie3.7
\[\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.3

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

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

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

    \[\leadsto \frac{\color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1} \cdot \frac{\sqrt[3]{1}}{x}}}{y \cdot \left(1 + z \cdot z\right)}\]
  6. Applied associate-/l*6.6

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

    \[\leadsto \frac{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}}{\color{blue}{\frac{\left(y \cdot \mathsf{fma}\left(z, z, 1\right)\right) \cdot x}{\sqrt[3]{1}}}}\]
  8. Using strategy rm
  9. Applied fma-udef6.5

    \[\leadsto \frac{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}}{\frac{\left(y \cdot \color{blue}{\left(z \cdot z + 1\right)}\right) \cdot x}{\sqrt[3]{1}}}\]
  10. Applied distribute-lft-in6.5

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

    \[\leadsto \frac{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}}{\frac{\left(\color{blue}{\left(y \cdot z\right) \cdot z} + y \cdot 1\right) \cdot x}{\sqrt[3]{1}}}\]
  13. Final simplification3.7

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

Reproduce

herbie shell --seed 2020065 +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)))))