-
Notifications
You must be signed in to change notification settings - Fork 17
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
Refactor with_interval_precision -> setprecision etc. #102
Conversation
I'll consider the last two commits, since the rest is contained in #100. |
import Base: rounding, setrounding, setprecision | ||
else | ||
import Compat: rounding, setrounding, setprecision | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite understand why this is written like this.
Isn't it enough to add @compat
when it is needed, avoiding this if
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we could use @compat
, but since these commands, in particular setprecision
, occur a lot, I would not like to do so.
This is certainly ugly, but I'm not sure if there's a simple way to improve it.
Probably a good idea to rebase before merging (once #100 is merged). |
4346192
to
83301ca
Compare
83301ca
to
d425b5f
Compare
3393e54
to
700516d
Compare
700516d
to
1c804e3
Compare
The problem with the tests (0.5) may be solved by rebasing... |
Changes:
set_interval_precision(x)
->setprecision(Interval, x)
.get_interval_precision()
->precision(Interval)
set_interval_rounding(x)
->setrounding(Interval, x)
get_interval_rounding()
->rounding(Interval)
in accordance with JuliaLang/julia#13232
i.e. don't invent a new function, just add methods to the (now) standard functions.