Zero and one do not respect precision of BigFloat

I would have hoped that zero and one would generate a BigFloat with the same precision as its argument.

julia> precision(zero(BigFloat(1, 1000))) 
256
julia> precision(one(BigFloat(1, 1000)))  
256

Is this a bug?

Moreover, even basic operations do not respect the precision:

julia> b = BigFloat(1, 1000); precision(b)
1000
julia> precision(3*b)
256
julia> precision(b/3)
256
1 Like

See https://github.com/JuliaLang/julia/issues/10040

1 Like