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
rand(SymmetricAlphaStable(1.75, 1f0, 0f0)) sometimes generates infinite return value.
rand(SymmetricAlphaStable(1.75, 1f0, 0f0))
The text was updated successfully, but these errors were encountered:
I can reproduce the error using
julia> for _ ∈ 1:1000000000 x = rand(SymmetricAlphaStable(1.75f0, 1f0, 0f0)) isinf(x) && throw("Infinity") end ERROR: "Infinity" Stacktrace: [1] top-level scope @ ./REPL[19]:3
Sorry, something went wrong.
To simulate w, which is an independent exponential random variable with mean 1 (https://en.wikipedia.org/wiki/Stable_distribution#Simulation_of_stable_variates), x=rand(rng, T) is used to produce $x\in[0,1)$. This is not correct as $x$ should be uniform on $(0, 1)$.
w
x=rand(rng, T)
When x=0, w=-log(0)=Inf and (cos((one(T)-α)*ϕ) / w)^(one(T)/α - one(T)) yields Inf since (one(T)/α - one(T)) is a negative value.
x=0
w=-log(0)=Inf
(cos((one(T)-α)*ϕ) / w)^(one(T)/α - one(T))
Inf
(one(T)/α - one(T))
ymtoo
Successfully merging a pull request may close this issue.
rand(SymmetricAlphaStable(1.75, 1f0, 0f0))
sometimes generates infinite return value.The text was updated successfully, but these errors were encountered: