Skip to content
New issue

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

prec / precision asymmetry #34

Open
saschatimme opened this issue Aug 12, 2020 · 1 comment
Open

prec / precision asymmetry #34

saschatimme opened this issue Aug 12, 2020 · 1 comment

Comments

@saschatimme
Copy link
Collaborator

This annoys me on a purely aesthetic level:

a = Arb(2; prec = 128)
b = Arb(prec = 2 * precision(a))

This should either be both prec or both precision. I know there is precision in Base but I think nobody writes generic code using precision anyways.

@Joel-Dahne
Copy link
Collaborator

That's true! Maybe there's not many people using precision in base now, but I really like that they have it and wouldn't want to move away from it. One solution could be to allow both prec and precision as keyword arguments? Not sure if there is a good way to do that.

From Julia 1.5 there is also some reason to want them to be different. The you could do something like

prec = 64
for i in 1:N
    Arb(2; prec)
    # Computations...
    prec *= 2
end

If they where called the same thing you would overwrite the precision method with the precision variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants