* Eviatar <eviatarb...@gmail.com> [2011-12-16 20:22:37 -0800]:
> sage: n(pi - 3).n(prec=2)
> 0.12
This approximates n(pi - 3) using two bits of precision so this should
not be too surprising:
sage: n(pi - 3)
0.141592653589793
sage: n(_, prec=2)
0.12

> sage: n(pi - 3, prec=2)
> 0.00
This approximates both pi and 3 with two bits of precision and then
computes their difference:
sage: n(pi,prec=2),n(3,prec=2)
(3.0, 3.0)

There's already a ticket #12120 which tries to improve the documentation
of n() to make this behaviour more clearly documented.
(I see that by now you've already found that ticket yourself)

julian

Attachment: pgpK3M6k7rSZT.pgp
Description: PGP signature

Reply via email to