Distributions.jl icon indicating copy to clipboard operation
Distributions.jl copied to clipboard

`rand(Beta(1.0f0, 1.0f0))` returns `Float64`

Open limarta opened this issue 4 months ago • 2 comments

Hi.

Samples from Beta(1.0f0, 1.0f0) are Float64 rather than the expected Float32. ~~This behavior seems to happen only for alpha=beta=1 and no other case~~. This behavior occurs when this condition is satisfied. For example

Beta(1.0f0, 1.0f0)::Float64
Beta(0.8f0, 0.8f0)::Float64
Beta(1.0f0, 2.0f0)::Float32
Beta(2.0f0, 1.0f0)::Float32

limarta avatar Oct 01 '24 22:10 limarta