This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Demonstrate JavaScript floating point math bugs by showing | |
| * which two-decimal-place numbers between 0.00 and 1.00 inclusive | |
| * have fractional parts after being multiplied by one hundred. | |
| */ | |
| var i = 0.00; | |
| for (n = 0; n <= 100; ++n) { | |
| j = i * 100; | |
| if (Math.round(j) != j) { |