\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\begin{array}{l}
\mathbf{if}\;z - 1 \le -2.27131261465393877 \cdot 10^{110} \lor \neg \left(z - 1 \le 2.7111376646142364 \cdot 10^{104}\right):\\
\;\;\;\;\left(\sqrt[3]{\mathsf{fma}\left(\log y, x - 1, \left(z - 1\right) \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right) - t\right)} \cdot \sqrt[3]{\mathsf{fma}\left(\log y, x - 1, \left(z - 1\right) \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right) - t\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(\log y, x - 1, \left(z - 1\right) \cdot \left(\log 1 - \left(1 \cdot y + \frac{1}{2} \cdot \frac{{y}^{2}}{{1}^{2}}\right)\right) - t\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log y, x - 1, \left(z - 1\right) \cdot \left(\log \left(\sqrt{1} + \sqrt{y}\right) + \log \left(\sqrt{1} - \sqrt{y}\right)\right) - t\right)\\
\end{array}double code(double x, double y, double z, double t) {
return ((((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t);
}
double code(double x, double y, double z, double t) {
double temp;
if ((((z - 1.0) <= -2.2713126146539388e+110) || !((z - 1.0) <= 2.7111376646142364e+104))) {
temp = ((cbrt(fma(log(y), (x - 1.0), (((z - 1.0) * (log(1.0) - ((1.0 * y) + (0.5 * (pow(y, 2.0) / pow(1.0, 2.0)))))) - t))) * cbrt(fma(log(y), (x - 1.0), (((z - 1.0) * (log(1.0) - ((1.0 * y) + (0.5 * (pow(y, 2.0) / pow(1.0, 2.0)))))) - t)))) * cbrt(fma(log(y), (x - 1.0), (((z - 1.0) * (log(1.0) - ((1.0 * y) + (0.5 * (pow(y, 2.0) / pow(1.0, 2.0)))))) - t))));
} else {
temp = fma(log(y), (x - 1.0), (((z - 1.0) * (log((sqrt(1.0) + sqrt(y))) + log((sqrt(1.0) - sqrt(y))))) - t));
}
return temp;
}



Bits error versus x



Bits error versus y



Bits error versus z



Bits error versus t
Results
if (- z 1.0) < -2.2713126146539388e+110 or 2.7111376646142364e+104 < (- z 1.0) Initial program 19.7
Simplified19.7
Taylor expanded around 0 0.7
rmApplied add-cube-cbrt1.8
if -2.2713126146539388e+110 < (- z 1.0) < 2.7111376646142364e+104Initial program 0.9
Simplified0.9
rmApplied add-sqr-sqrt0.9
Applied add-sqr-sqrt0.9
Applied difference-of-squares0.9
Applied log-prod0.8
Final simplification1.1
herbie shell --seed 2020066 +o rules:numerics
(FPCore (x y z t)
:name "Statistics.Distribution.Beta:$cdensity from math-functions-0.1.5.2"
:precision binary64
(- (+ (* (- x 1) (log y)) (* (- z 1) (log (- 1 y)))) t))