4 ms·
Curiously, C actually has bignums. Now. In C23, they added a _BitInt(N) type (e.g., "_BitInt(1024)" for a 128-byte type). The compiler support for that is limi
by AndriyKunitsyn 2y ago
Curiously, C actually has bignums. Now. In C23, they added a _BitInt(N) type (e.g., "_BitInt(1024)" for a 128-byte type).
The compiler support for that is limited, though. To let N be >128 in Clang, -fexperimental-max-bitint-width=N flag can be provided. If N>128 and _BitInt(N) is divided by something, the compiler will just crash, but +, -, * all work as expected.
- petters 2y agoWith all the things the C standard lacks... I would not have expected this to be included!
- jcalvinowens 2y agoNeat. Maybe in ten years I'll actually be able rely on it existing in code I write!