[Python is displaying 15 decimal places. Why?] - Computers



Search Tech-Forums - link takes you to our Forum's search page.

Note: The following is only a text archive!


To view the actual forum discussion, please visit our website at http://www.tech-forums.net

Pages:1



Python is displaying 15 decimal places. Why?

(Click here to view the original thread with full colors/images)



Posted by: yobrojas

Hi,

In python this is happen to me when I recall myVariable. Why is it displaying it with extra decimal places followed by a 2?

>>> myVariable = 2.45
>>> myVariable
2.450000000000002

1. Why is there extra decimal places?
2. Why is there a 2 on the end?

Any help would be great

YoBroJas





vBulletin Copyright ©2000 - 2003, Jelsoft Enterprises Limited.


PPC Management
vB Easy Archive Final - Created by Xenon