\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -1.2195050503600045 \cdot 10^{225}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{\frac{y}{z + 1}}{z}\\
\mathbf{elif}\;x \cdot y \le -2.6832295035694302 \cdot 10^{-93}:\\
\;\;\;\;\frac{\frac{x \cdot y}{{z}^{2}}}{z + 1}\\
\mathbf{elif}\;x \cdot y \le 2.652005496261341 \cdot 10^{-197}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{\frac{y}{z + 1}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{x \cdot \frac{y}{z + 1}}{z}\\
\end{array}double f(double x, double y, double z) {
double r296446 = x;
double r296447 = y;
double r296448 = r296446 * r296447;
double r296449 = z;
double r296450 = r296449 * r296449;
double r296451 = 1.0;
double r296452 = r296449 + r296451;
double r296453 = r296450 * r296452;
double r296454 = r296448 / r296453;
return r296454;
}
double f(double x, double y, double z) {
double r296455 = x;
double r296456 = y;
double r296457 = r296455 * r296456;
double r296458 = -1.2195050503600045e+225;
bool r296459 = r296457 <= r296458;
double r296460 = z;
double r296461 = r296455 / r296460;
double r296462 = 1.0;
double r296463 = r296460 + r296462;
double r296464 = r296456 / r296463;
double r296465 = r296464 / r296460;
double r296466 = r296461 * r296465;
double r296467 = -2.6832295035694302e-93;
bool r296468 = r296457 <= r296467;
double r296469 = 2.0;
double r296470 = pow(r296460, r296469);
double r296471 = r296457 / r296470;
double r296472 = r296471 / r296463;
double r296473 = 2.652005496261341e-197;
bool r296474 = r296457 <= r296473;
double r296475 = 1.0;
double r296476 = r296475 / r296460;
double r296477 = r296455 * r296464;
double r296478 = r296477 / r296460;
double r296479 = r296476 * r296478;
double r296480 = r296474 ? r296466 : r296479;
double r296481 = r296468 ? r296472 : r296480;
double r296482 = r296459 ? r296466 : r296481;
return r296482;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.6 |
|---|---|
| Target | 4.2 |
| Herbie | 1.5 |
if (* x y) < -1.2195050503600045e+225 or -2.6832295035694302e-93 < (* x y) < 2.652005496261341e-197Initial program 20.5
rmApplied times-frac13.3
rmApplied *-un-lft-identity13.3
Applied times-frac5.3
Applied associate-*l*2.3
rmApplied div-inv2.4
Applied associate-*l*2.6
Simplified2.5
rmApplied associate-*r*0.8
Simplified0.7
if -1.2195050503600045e+225 < (* x y) < -2.6832295035694302e-93Initial program 4.4
rmApplied times-frac7.5
rmApplied *-un-lft-identity7.5
Applied times-frac6.8
Applied associate-*l*2.9
rmApplied associate-*r/2.5
Applied associate-*r/2.5
Simplified1.6
if 2.652005496261341e-197 < (* x y) Initial program 13.1
rmApplied times-frac9.5
rmApplied *-un-lft-identity9.5
Applied times-frac6.0
Applied associate-*l*2.8
rmApplied associate-*l/2.4
Final simplification1.5
herbie shell --seed 2020034
(FPCore (x y z)
:name "Statistics.Distribution.Beta:$cvariance from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< z 249.6182814532307) (/ (* y (/ x z)) (+ z (* z z))) (/ (* (/ (/ y z) (+ 1 z)) x) z))
(/ (* x y) (* (* z z) (+ z 1))))