This is a floating point bug. See Gordon's response to "Is this a bug? About Number type" on Aug 30 for full details. I'll quote the important parts:
"getting 23.700000000000003 isn't a bug; you'd get the same answer in other languages like Java and C++. The imprecision is because Number in ActionScript (like float in Java and C++) stores a floating-point value as a binary fraction, not as a decimal fraction. These datatypes use binary fractions because that's how current microprocessors store and manipulate floating-point values...Perhaps you can simply round your results to the precision you need? Take a look at the toFixed() method of the Number class." - Dan On 12/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Wow, the description says that this number will be rounded up to the next decimal point: trace (NumberUtilities.round(3.75,.1)); .1, being the flag to round up, so the result should be 3.8. It's not it's: 3.8000000000000003! I know I'm using this method correctly, any tips or suggestions. Thanks, Patrick