Oh, thank you. I wasnt aware of it.
On Mar 22, 11:11 am, Mike Hansen wrote:
> On Mar 22, 3:03 am, Henryk Trappmann wrote:
>
> > sage: a = float(1-2**(-50))
> > sage: repr(a)
> > '0.99911'
> > sage: print(a)
> > 1.0
>
> > Is that intended?
>
> This is Python's default behavior. repr
On Mar 22, 3:03 am, Henryk Trappmann wrote:
> sage: a = float(1-2**(-50))
> sage: repr(a)
> '0.99911'
> sage: print(a)
> 1.0
>
> Is that intended?
This is Python's default behavior. repr uses 17 digits of precision
while str only uses 12. It is covered in the Python tutorial:
http: