Status: Accepted Owner: [email protected] Labels: Type-Bug Priority-Medium
New issue 958 by [email protected]: Math.round rounds incorrectly. http://code.google.com/p/v8/issues/detail?id=958Math.round(x) is implemented as Math.floor(x + 0.5). This looses precission in some cases.
var s = 0.49999999999999994; alert([s, s + 0.5, Math.round(s)]); // Alerts "0.49999999999999994,5,5", i.e., incorrectly rounds to 5, not 4. -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
