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

Refactor with_interval_precision -> setprecision etc. #102

Merged
merged 5 commits into from
Apr 8, 2016

Conversation

dpsanders
Copy link
Member

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.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 93.923% when pulling 4346192 on refactor_precision_names into 6b531a7 on master.

@lbenet
Copy link
Member

lbenet commented Apr 7, 2016

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
Copy link
Member

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?

Copy link
Member Author

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.

@lbenet
Copy link
Member

lbenet commented Apr 7, 2016

Probably a good idea to rebase before merging (once #100 is merged).

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.7%) to 93.923% when pulling 83301ca on refactor_precision_names into bafad67 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 93.923% when pulling 3393e54 on refactor_precision_names into d1905e8 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 93.923% when pulling 3393e54 on refactor_precision_names into d1905e8 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 93.577% when pulling 1c804e3 on refactor_precision_names into c23970c on master.

@lbenet
Copy link
Member

lbenet commented Apr 7, 2016

The problem with the tests (0.5) may be solved by rebasing...

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 93.913% when pulling e073fa5 on refactor_precision_names into c23970c on master.

@dpsanders dpsanders merged commit 42bd337 into master Apr 8, 2016
@dpsanders dpsanders deleted the refactor_precision_names branch April 8, 2016 04:18
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

Successfully merging this pull request may close these issues.

None yet

3 participants