This is indeed a bug. The logic was meant to handle the case '1.23' (a decimal in the middle of the mantissa) as having three significant figures.
https://github.com/sagemath/sage/pull/74 On Fri, Mar 31, 2017 at 8:02 AM, William Stein <wst...@gmail.com> wrote: > Ok I think I just made a remark this is irrelevant to your actual > question. > > CC'ing Robert Bradshaw who I think wrote the relevant code for choosing > precision... > > On Fri, Mar 31, 2017 at 8:00 AM William Stein <wst...@gmail.com> wrote: > >> On Fri, Mar 31, 2017 at 7:24 AM Travis Scrimshaw <tsc...@ucdavis.edu> >> wrote: >> >> I believe this comes from >> >> if '.' in mantissa and mantissa[:2] != '0.': >> sigfigs -= 1 >> >> is RealNumber. Now, as to why this was decided, this is outside of my >> knowledge. >> >> >> >> In sage (which just wraps mpdr) the precision of a real number is the >> number of bits of precision used to hold the mantissa (the part of the >> number that isn't the exponent in scientific notation). It has nothing >> whatever a priori with where the decimal point happens to be. >> >> >> Best, >> Travis >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-devel" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to sage-devel+unsubscr...@googlegroups.com. >> To post to this group, send email to sage-devel@googlegroups.com. >> Visit this group at https://groups.google.com/group/sage-devel. >> For more options, visit https://groups.google.com/d/optout. >> >> -- >> Sent from my massive iPhone 6 plus. >> > -- > Sent from my massive iPhone 6 plus. > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.