Skip to content

Poisson rand InexactError for extremely large parameter valuesΒ #821

@simonbyrne

Description

@simonbyrne
julia> rand(Poisson(1e20))
ERROR: InexactError: Int64(Int64, 9.999999997262139e19)
Stacktrace:
 [1] Type at ./float.jl:700 [inlined]
 [2] convert at ./number.jl:7 [inlined]
 [3] rand(::Poisson{Float64}) at /Users/simon/.julia/packages/Distributions/WHjOk/src/univariate/discrete/poisson.jl:89
 [4] top-level scope at none:0

Note that the underlying Rmath library actually works in terms of Float64s (see JuliaStats/Rmath-julia#11).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions