Thanks for the suggestion. I understand it now.

Just curious, so what exactly does SAGE do when I type 0.6**2 then?
I tried a quick search with SAGE tutorial this time, but didn't seem
to find what I'm looking for.

Thanks in advance

On Nov 14, 10:06 am, William Stein <[email protected]> wrote:
> On Sat, Nov 14, 2009 at 9:17 AM, pong <[email protected]> wrote:
>
> > I apologize in advance that this is essentially a question about
> > python instead of sage.
>
> > When I type 0.6**2 in python, it returns
> > 0.35999999999999999
>
> > When I do the same in SAGE
> > 0.360000000000000
>
> > It gives the correct answer. Why so? And can I make python gives the
> > "correct" answer as well?
>
> I highly recommend that you read
>
>      http://docs.python.org/tutorial/floatingpoint.html
>
> to understand why Python does what it does.
>
> William
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to