Better HN
topnewbestaskshowjobs
Log inSign up

longlonguserna

4 karma · joined Aug 5, 2013 (13y ago) · 1 submissions

Submissions

comment 13y ago · link · parent

If you want a guaranteed 64-bit type, put in your code:

#include <stdint.h>

then, use uint64_t for unsigned and int64_t for signed. If you want 128 bits, in gcc you can use __uint128_t (it has two extra underscores at the beginning because that size is nonstandard), but I don't think there is support for 256 bit integers.

Try a big integer library: http://stackoverflow.com/questions/124332/c-handling-very-la...