Skip to main content

Minesweeper Fail!

I'm pretty sure that if I've played 100 games and won exactly 1 of them, my winning percentage should be 1%. I might be wrong, though.  There is no rounding error when you do 1/100 * 100%.  Single-precision floating point number rounding error?  For some reason, I doubt it...


Weird... and stupid...

EDIT: Wrote a C program to make sure that Microsoft's Minesweeper has a bug.

$ cat main.c
#include <stdio.h>
int main()
{
        float x = 1.0 / 100 * 100;
        printf("%f\n", x);
        return 0;
}
$ gcc main.c; ./a.out
1.000000
... Yep... sure does.

Comments