To whom this may concern,

First, let me apologize if this has reached the wrong mailbox. I'm still new to programming and actually dis covered this error as part of my studies.
Secondly, if this has reached you in error, please let me know where this message should be directed.
I can be reached by email at: clpauto@sbcglobal.net
Now for the reason for this message:
I have discovered a mathematical error in javascript.
This error occurs when adding any number in the following ranges:
-5.1999999 thru -4.999900011,
-4.199999998 thru -3.999999917,
-3.69999999 thru -2.60000001,
-2.599999999 thru -1.999999999,
-1.099001955 thru -0.9990989,
0.999999999 thru 1.000000001,
1.999999999 thru 2.0000000010009,
2.999999999 thru 3.000000009,
3.999999999 thru 4.099999992
to a second number in the range:
3.139 thru 3.140000001
using the method:

var a;
a = 3;
var b;
b = 3.14;
var c;
c = a + b;
alert(c);
The resulting sum has an error which is displayed as follows:
6.140000000000001
This error produces similar results when this method is applied to any of the numbers included in the ranges listed above.
Numbers outside these ranges seem to be added normally.

I was performing this exercise from within an HTML5 document with the above scripting included in the head of the document, as follows:




HTML Document



HTML Document





Please understand that I submit this message in the hope of providing a better web experience, and not for any personal gratification.

Thank you.


Sent from Yahoo! Mail for Windows 8