Hi, I was surprised to notice the following behavior:
sage: r = .123456789123456789 sage: r.parent() Real Field with 57 bits of precision sage: r = 0.123456789123456789 sage: r.parent() Real Field with 60 bits of precision sage: r = 00.123456789123456789 sage: r.parent() Real Field with 57 bits of precision sage: r =00000.123456789123456789 sage: r.parent() Real Field with 57 bits of precision sage: s = ".123456789123456789" sage: RealNumber(s).parent() Real Field with 57 bits of precision sage: s = "0.123456789123456789" sage: RealNumber(s).parent() Real Field with 60 bits of precision sage: s = "00.123456789123456789" sage: RealNumber(s).parent() Real Field with 57 bits of precision Is this intended behavior or should it provide the same result for all of the three kinds of input? I don't quite understand how the precision for the parent of a RealNumber is determined. I guess the line mpfr_init2(self.value, p.__prec) in real_mpfr.pyx initializes mpfr and later mpfr_set_str(self.value, s, base, parent.rnd) is called. But where in the process is the precision of the parent "p" defined? Cheers, Moritz -- 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.