Wrong arithmetic results. June 11, 2010 08:46PM | Registered: 15 years ago Posts: 98 |
printf("%llX", 0xC8*0x1000000); //prints 100000000, must be C8000000 printf("%llX", 0xC8*0x100000000); //prints C800000000
var = (0xC8/2)*0x1000000; var += (0xC8/2)*0x1000000;I know this can be solved with some minor computing but my question is not how to solve it, I want to know why does this happen. Anyone?
Re: Wrong arithmetic results. June 11, 2010 09:57PM | Registered: 16 years ago Posts: 43 |