How to properly work with changing precision in ArbNumerics

I do not understand how I should properly work with ArbNumerics.

I tried setting the number of digits at the beginning of my code, so that later I easily change the number of digits for all of my variables.

digits = 200
a = ArbReal(1.0, bits=digits)

However, when I later use functions in Roots.jl using some other ArbFloat variables I get errors that regard the number of bits, because the default value of generating ArbFloat is 128.

This is an example of something that I do not understand:

digits = 104
a = ArbReal(0.2, bits=digits)
b = ArbReal(0.0008173251288155428, digits=digits)
typeof(a) # ArbReal{128}
typeof(b) # ArbReal{372}

Why is the type different?

On the phone, and I dont know anything about that package, but just noted that in one case you use the bits keyword and the other you use digits, is that intentional?

1 Like

My bad. thanks! I got so confused…