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

mpmath.workprec and bigfloat.precision #73

Open
singularitti opened this issue Jun 13, 2019 · 0 comments
Open

mpmath.workprec and bigfloat.precision #73

singularitti opened this issue Jun 13, 2019 · 0 comments
Labels
docs Something todo with documents

Comments

@singularitti
Copy link
Member

singularitti commented Jun 13, 2019

I just found that what we used before, i.e., bigfloat.precision(self.precision), equivalent to bigfloat.Context(precision=self.precision), is

Precision of the floating-point format, given in bits.

To keep the modified code functioning as the old code, I also use mpmath.workprec(self.precision), also in bits. However, mpmath does provide mpmath.workdps, using decimal precision.

In general, the number of bits can be converted to decimal digits by multiplying it by ln(2)/ln(10) ~= 0.3. I think we should notice the users in doc, to let them know what precision we are using.

@singularitti singularitti added the docs Something todo with documents label Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Something todo with documents
Projects
None yet
Development

No branches or pull requests

1 participant