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

need a function to increase the precision of a mpfr number #23

Closed
michalkonecny opened this issue Mar 23, 2015 · 2 comments
Closed

need a function to increase the precision of a mpfr number #23

michalkonecny opened this issue Mar 23, 2015 · 2 comments

Comments

@michalkonecny
Copy link
Collaborator

I think it would be useful to have a function like:
differentPrecision :: (Rounded m1 p1) -> (Rounded m2 p2)

Rationale: It is sometimes wasteful to use the same very high precision in all sub-expressions of an expression. I would like to calculate some sub-expressions using a lower precision and then combine it with higher precision calculations. For example, when using interval Newton iterations, computing the first estimate can be usually done with a much lower precision than is required for the final result. I think it would also be beneficial to increase precision during Newton iterations.

@ekmett
Copy link
Owner

ekmett commented Mar 23, 2015

Makes sense.

With 7.10, we can drastically simplify the internals of this package as we no longer need to try to bundle a custom, patched mpfr.

Consequently, I'll probably be spending some time cleaning this package up soon, and see if we can throw this in.

@claudeha
Copy link
Collaborator

fixed by #27 merge

Numeric.Rounded.precRound
  :: (Precision p2, Precision p1, Rounding r) =>
     Rounded r p1 -> Rounded r p2

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

3 participants