This is reproducible in Safari 4 beta on 10.4 (r41760) and on Windows XP (just 4b). May you have as much pleasure dealing with this as I did in (incorrectly) checking SpiderMonkey's behavior, because it would be the height of unfairness for me to hog all the fun. :-)
Cameron, see the Mozilla bug, it's all calculated by hand there -- just the problem of a flipped equality. But if you do feel like running it out by hand, by all means feel free, because you'll get an even better idea of how much fun can be had here.
See also: bug 16651, bug 16653.
Okay, I see our mistake. This will be a bit of work to fix. There may be similar problems in other places.
toFixed rounds, not floors !
bug 24711 is not a Bug !!
(1.95) . toFixed( 1 ) = 2.0
Math.round ( 1.95 * 10 ) / 10
Not a Bug.
All browsers before returns string value (IE, Opera, Konqueror, Chrome, Firefox) rounding a Number to defined scale.
For a simpler explanation of why this is a valid bug, try:
(but! this also doesn't work in ToT!) - the correct result should be 1.94999999999999995559.
Since the precise mathematical value passed to toFixed is closer to 1.9 than 2.0, 1.9 is the correct result.
This should be fixed by https://bugs.webkit.org/show_bug.cgi?id=44745
*** This bug has been marked as a duplicate of bug 44745 ***
*** Bug 31777 has been marked as a duplicate of this bug. ***