The Number data type, when including a decimal point is a binary floating point
number and binary floating point math can result in rounding errors like yours.
Adobe says this about Number:
"The Number data type uses the 64-bit double-precision format as specified by
the IEEE Standard for Binary Floating-Point Arithmetic (IEEE-754) which means
rounding errors can occur... The Number data type uses 52 bits to store the
significand, with the result that numbers that require more than 52 bits to
represent precisely, such as the fraction 1/3, are only approximations. If your
application requires absolute precision with decimal numbers, you need to use
software that implements decimal floating-point arithmetic as opposed to binary
On Feb 2, 2018, at 7:22 AM, Σπύρος Αγγελόπουλος <aggelopou...@novusnet.gr>
Can anyone verify the results of calculation below ?
var n3:Number=n1*n2; //1889.9999999999998
is it bug ?