Problems By Numbers

wxdqz

New Member
I have noticed that when multiplying decimals or subtrating a decimal from another ect. that it doesn't give the right answer, on any computer I use (all have some version of IE).
For example 11 * 11 = 121 and 1.1 * 1.1 = 1.21
However when the computer works out 1.1 * 1.1 it gives the answer 1.2100000...000001
Also everyone should agree that 0.8 - 1 = -0.2, fair enough, however the computer gets -0.199999...9999995
Why is this?
I am currently writing a bit of a monster of a script that will incorporate everything I know about javascript and it will work various things out depending on what information it is given and because it includes decimals at some oint or another some of my results are a little bit out, this is frustrating so can anyone help me solve this problem?
 
Back
Top