Math problem (6.0-4.2=1.79)
hi,
i have spent day troubleshooting issue calculations ending wrong , figured out this:
6-4.2 (six minus 4 point two) evaluates 1.7999999999999998
no matter how evaluate it...here how checked
trace(6-4.2);
the results funny when numbers fetched via parsefloat
6-parsefloat(4.2000000000000000000000) evaluates 1.8000000000000007
6-parsefloat(4.20000000000000000000000) evaluates 1.7999999999999998
can 1 clarify please?
i have spent day troubleshooting issue calculations ending wrong , figured out this:
6-4.2 (six minus 4 point two) evaluates 1.7999999999999998
no matter how evaluate it...here how checked
trace(6-4.2);
the results funny when numbers fetched via parsefloat
6-parsefloat(4.2000000000000000000000) evaluates 1.8000000000000007
6-parsefloat(4.20000000000000000000000) evaluates 1.7999999999999998
can 1 clarify please?
yeah, known issue as, due way computers store data.
google , you'll find explanations , work arounds.
tracy
google , you'll find explanations , work arounds.
tracy
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment