(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 (log1p (- y)) (- 1.0 z) (+ (* (log y) (- 1.0 x)) 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(log1p(-y), (1.0 - z), ((log(y) * (1.0 - x)) + t));
}
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(Float64(z - 1.0) * log(Float64(1.0 - y)))) - t) end
function code(x, y, z, t) return Float64(-fma(log1p(Float64(-y)), Float64(1.0 - z), Float64(Float64(log(y) * Float64(1.0 - x)) + t))) end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z - 1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
code[x_, y_, z_, t_] := (-N[(N[Log[1 + (-y)], $MachinePrecision] * N[(1.0 - z), $MachinePrecision] + N[(N[(N[Log[y], $MachinePrecision] * N[(1.0 - x), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision])
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
-\mathsf{fma}\left(\mathsf{log1p}\left(-y\right), 1 - z, \log y \cdot \left(1 - x\right) + t\right)



Bits error versus x



Bits error versus y



Bits error versus z



Bits error versus t
Initial program 6.9
Simplified0.1
Applied egg-rr0.1
Final simplification0.1
herbie shell --seed 2022150
(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))