Skip to content

Instantly share code, notes, and snippets.

Created November 13, 2012 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4066403 to your computer and use it in GitHub Desktop.
Save anonymous/4066403 to your computer and use it in GitHub Desktop.
MSVC10 bug
#include <stdio.h>
#include <stdint.h>
int main()
{
uint64_t value = ~0ULL;
uint64_t x = (value == ~0ULL ? ~0ULL : (value / 2.0 + .5));
printf("x=%llx\n", x);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment