odd math in actionscript 3? [duplicate]
问题 This question already has answers here : Closed 10 years ago . Duplicate: Why do I see a double variable initialized to some value like 21.4 as 21.399999618530273? Is JavaScript’s math broken? many, many other questions, for every language and platform, all with the same answer. trace( ">> " + (399.6-(Math.floor(399.6))) ); prints out >> 0.6000000000000227 why? 回答1: Floating Point rounding errors. Floating point numbers can't represent some values exactly, so what you are seeing is the