L
lorlarz
Contrary to what one authority in the JavaScript field says:
JavaScript does make errors when dealing with just with integers.
This authority (Douglas Crockford.) says:
"integer arithmetic in floating point [as JS uses] is exact"
Well, I can prove this is incorrect with this program:
http://mynichecomputing.com/digitallearning/yourOwn.htm
This a program that uses only integers, yet comes up short in its
addition or count
when used. HERE IS HOW TO DO THE EXPERIMENT AND SEE:
Without adding on an arbitrary decimal number less than one (I believe
I use .9) ,
this program will come up short in its count(addition).
So, omit that .9 from the program so the program is relying on the
pure exact
JavaScript addition. NOW, as a step 2: Set up the program
for "inventory scoring" by using some sample answers set using the
procedure
described for doing so for an inventory (see link on the web page I
gave you
the code for, for the directions) -- where an item may count on more
than
one scale and several items score each scale up (set up to do some of
each).
THEN: Use that scoring system
in several runs on sets of client answers (samples you also make
yourself)
and you will find the count coming up SHORT if you omit my + .9 from
the code.
You will find the count short. This would be disasterous in a voting
machine.
JavaScript does make errors when dealing with just with integers.
This authority (Douglas Crockford.) says:
"integer arithmetic in floating point [as JS uses] is exact"
Well, I can prove this is incorrect with this program:
http://mynichecomputing.com/digitallearning/yourOwn.htm
This a program that uses only integers, yet comes up short in its
addition or count
when used. HERE IS HOW TO DO THE EXPERIMENT AND SEE:
Without adding on an arbitrary decimal number less than one (I believe
I use .9) ,
this program will come up short in its count(addition).
So, omit that .9 from the program so the program is relying on the
pure exact
JavaScript addition. NOW, as a step 2: Set up the program
for "inventory scoring" by using some sample answers set using the
procedure
described for doing so for an inventory (see link on the web page I
gave you
the code for, for the directions) -- where an item may count on more
than
one scale and several items score each scale up (set up to do some of
each).
THEN: Use that scoring system
in several runs on sets of client answers (samples you also make
yourself)
and you will find the count coming up SHORT if you omit my + .9 from
the code.
You will find the count short. This would be disasterous in a voting
machine.