Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My computer got stupid. 0 + 20 = 19.921875!!! Help me!

Tags:

You know it's bugger-all when your computer can't get a sum right!

I have not the slightest idea why this is happening:

_root.attachMovie("clippy","aClip",_root.getNextHighestDepth());

trace("alpha 1 = "+aClip._alpha);
aClip._alpha = 0;
trace("alpha 2 = "+aClip._alpha);
aClip._alpha += 20;
trace("alpha 3 = "+aClip._alpha);
aClip._alpha = 20;
trace("alpha 4 = "+aClip._alpha);

Output is:

alpha 1 = 100
alpha 2 = 0
alpha 3 = 19.921875
alpha 4 = 19.921875

19.921875 should be 20! :(

I'm going to cry. Does my processor have cancer? Alzheimer? Who said computers don't make mistakes?

P.S. I also used aClip._alpha=Math.round(aClip._alpha) but the trace was the same!