Open singularitti opened 5 years ago
I just found that what we used before, i.e., bigfloat.precision(self.precision), equivalent to bigfloat.Context(precision=self.precision), is
bigfloat.precision(self.precision)
bigfloat.Context(precision=self.precision)
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.
mpmath.workprec(self.precision)
mpmath
mpmath.workdps
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.
ln(2)/ln(10) ~= 0.3
I just found that what we used before, i.e.,
bigfloat.precision(self.precision)
, equivalent tobigfloat.Context(precision=self.precision)
, isTo keep the modified code functioning as the old code, I also use
mpmath.workprec(self.precision)
, also in bits. However,mpmath
does providempmath.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.