I have a little problem. Essentially, the code:
uint64_t myInteger = 98930 * 98930;
NSLog(@"%qu", myInteger);
...just gets it wrong. I get '1197210308' as the output, which is evidently incorrect. Why is this happening? It can't be that a uint64_t is too small, as they apparently go up to 18 and a half quintillion. Anyone have any idea?
Try casting the first number so the operation is made using that type:
uint64_t myInteger = (uint64_t)98930 *98930;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With