Julia: BigFloat Normal Distribution
In Julia, has anyone implemented regular pdf or cdf distributions to support BigFloats arbitrary precision.
For example, this code returns 0.0 when in fact the values should be slightly different.
x = parse(BigFloat, "2.1")
x_small = float64(x)
pdf(Normal(), x) - pdf(Normal(), x_small)
+3
Rob donnelly
source
to share
1 answer
Not directly. My possible plan is to make the distribution parameters parametric, which will also allow arguments Float32
, but that is still a long way off.
At the same time, there is a non-exportable φ
one that gives the desired result:
Distributions.φ(x) - pdf(Normal(), x_small)
+4
Simon byrne
source
to share