On 12/12/11 7:11 AM, v...@ukr.net wrote:
On Mon, 12 Dec 2011 04:42:19 -0800 (PST)
Volker Braun<vbraun.n...@gmail.com> wrote:
A good read is "What Every Computer Scientist Should Know About
Floating-Point Arithmetic":
http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
Thank your for the advice. I'll take a look at it.
On Mon, 12 Dec 2011 13:51:54 +0100
Laurent<moky.m...@gmail.com> wrote:
Hope it somewhat answer the question
Yes, I understood your point. Actually, I knew that the
floating-point numbers in computer representation have a limited
precision, but for some reason I just didn't take the trouble to count
the digits, that is why it looked surprisingly big. :)
Still, I'm curious whether there is a way to "round" the float
numbers to a certain digit?
For -0.0280000000000200 "looked and felt" like -0.028, for instance.
sage: round(-0.0280000000000200,12)
-0.028
See
http://www.sagemath.org/doc/reference/sage/misc/functional.html?#sage.misc.functional.round
Jason
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org