\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\left(\left(y + \left(0.5 \cdot {y}^{2} + \log y \cdot x\right)\right) - \left(0.5 \cdot \left({y}^{2} \cdot z\right) + \left(t + \left(y \cdot z + \log y\right)\right)\right)\right) + \mathsf{fma}\left(-1, t, t\right)
(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 (+ (- (+ y (+ (* 0.5 (pow y 2.0)) (* (log y) x))) (+ (* 0.5 (* (pow y 2.0) z)) (+ t (+ (* y z) (log y))))) (fma -1.0 t 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 ((y + ((0.5 * pow(y, 2.0)) + (log(y) * x))) - ((0.5 * (pow(y, 2.0) * z)) + (t + ((y * z) + log(y))))) + fma(-1.0, t, t);
}



Bits error versus x



Bits error versus y



Bits error versus z



Bits error versus t
Initial program 7.0
Simplified7.0
Taylor expanded in y around 0 0.3
Applied egg-rr0.4
Applied egg-rr0.4
Taylor expanded in z around inf 0.3
Final simplification0.3
herbie shell --seed 2022127
(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))