bigdecimal-rs icon indicating copy to clipboard operation
bigdecimal-rs copied to clipboard

Set precision to more than 100

Open frostblooded opened this issue 5 years ago • 4 comments

If i understand correctly, the maximum allowed precision is 100 even if I try to use with_prec. This is a very low number. I am trying to make a program that calculates Pi. Isn't there a way to increase the precision to something like 1,000,000?

frostblooded avatar Mar 15 '20 08:03 frostblooded

Well... you can clone and change the hard-coded value until the feature/simple-context branch is finally merged.

I think there are a few places that fix that precision to 100, like let max_precision = 100;

akubera avatar Mar 15 '20 18:03 akubera

If you want something a little less disappointing, maybe the rug crate would be better in the meantime. It wraps the standard GNU MPFR library, so it will be as efficient and accurate as you want.

akubera avatar Mar 15 '20 20:03 akubera

Nah, mate. I never meant to imply this crate is disappointing. I just wondered if I have missed something. Keep up the good work! :)

frostblooded avatar Mar 15 '20 21:03 frostblooded

Is there an issue or PR tracking the simple-context branch? Anything blocking the merge? I have a similar problem as OP and I think this would work for me. I'll look at rug though.

BlinkyStitt avatar Apr 15 '20 01:04 BlinkyStitt