We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using "e" notation for large numbers, I notice that the Poisson distribution fails for orders of magnitude greater than 18.
For example look at the following code and output
using Distributions println(rand(Poisson(1.0e10))) println(rand(Poisson(1.0e11))) println(rand(Poisson(1.0e12))) println(rand(Poisson(1.0e13))) println(rand(Poisson(1.0e14))) println(rand(Poisson(1.0e15))) println(rand(Poisson(1.0e16))) println(rand(Poisson(1.0e17))) println(rand(Poisson(1.0e18))) println(rand(Poisson(1.0e19))) # <---- Fails println(rand(Poisson(1.0e20)))
9999837095 99999767161 1000000268447 10000002717295 100000005394573 1000000029583672 9999999992683622 99999999934764640 1000000000632877824 ERROR: InexactError: trunc(Int64, 1.0e19) Stacktrace: [1] trunc @ ./float.jl:805 [inlined] [2] floor @ ./float.jl:367 [inlined] [3] PoissonADSampler @ ~/.julia/packages/Distributions/DiPwc/src/samplers/poisson.jl:54 [inlined] [4] PoissonADSampler @ ~/.julia/packages/Distributions/DiPwc/src/samplers/poisson.jl:49 [inlined] [5] sampler @ ~/.julia/packages/Distributions/DiPwc/src/univariate/discrete/poisson.jl:143 [inlined] [6] rand(rng::Random._GLOBAL_RNG, d::Poisson{Float64}) @ Distributions ~/.julia/packages/Distributions/DiPwc/src/univariate/discrete/poisson.jl:147 [7] rand(::Poisson{Float64}) @ Distributions ~/.julia/packages/Distributions/DiPwc/src/genericrand.jl:22 [8] top-level scope @ ~/Desktop/Projects/StructuredIlluminationInference/examples/scratch.jl:14
The text was updated successfully, but these errors were encountered:
I'll close the issue since it is a duplicate of #821.
Sorry, something went wrong.
No branches or pull requests
When using "e" notation for large numbers, I notice that the Poisson distribution fails for orders of magnitude greater than 18.
For example look at the following code and output
The text was updated successfully, but these errors were encountered: