\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\mathsf{fma}\left(-1, x \cdot \log \left(\frac{1}{y}\right), \mathsf{fma}\left(\mathsf{log1p}\left(-y\right), -1 + z, -\log y\right)\right) - t
(FPCore (x y z t) :precision binary64 (- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))
(FPCore (x y z t) :precision binary64 (- (fma -1.0 (* x (log (/ 1.0 y))) (fma (log1p (- y)) (+ -1.0 z) (- (log y)))) t))
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) {
return fma(-1.0, (x * log(1.0 / y)), fma(log1p(-y), (-1.0 + z), -log(y))) - t;
}



Bits error versus x



Bits error versus y



Bits error versus z



Bits error versus t
Initial program 6.7
Simplified0.1
Taylor expanded in x around 0 6.7
Simplified0.1
Taylor expanded in y around inf 0.1
Applied fma-def_binary640.1
Final simplification0.1
herbie shell --seed 2022068
(FPCore (x y z t)
:name "Statistics.Distribution.Beta:$cdensity from math-functions-0.1.5.2"
:precision binary64
(- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))