Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Python is displaying 15 decimal places. Why?
Closed Thread
Old 02-08-2007, 10:24 PM   #1 (permalink)
 
Newb Techie

Join Date: Oct 2006

Posts: 26

yobrojas

Default Python is displaying 15 decimal places. Why?

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
yobrojas is offline  
 
Closed Thread

« GUI Toolkit | Alice »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On