I want a 128 bit integer because I want to store results of multiplication of two 64 bit numbers. Is there any such thing in gcc 4.4 and above?
Ah, big integers are not C's forte.
GCC does have an unsigned __int128
/__int128
type, starting from version 4.something (not sure here). I do seem to recall, however, that there was a __int128_t
def before that.
These are only available on 64-bit targets.
(Editor's note: this answer used to claim that gcc defined uint128_t
and int128_t
. None of the versions I tested on the Godbolt compiler explorer define those types without leading __
, from gcc4.1 to 8.2 , or clang or ICC.)