You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add sint<N>, the N-bit two's complement signed integer, with the int128 and int256 aliases. It converts to and from uint<M> of any width and gives access to its words. #368#483#484
Add smul(), the signed multiplication 64 x 64 → 128. #451
Add mac(), the 64-bit multiply-accumulate a + x * y + c. #445
Add the funnel shifts fshl() and fshr(), and the shifts shl() and shr() of word spans. #376
Add ++, -- and unary + to uint<N> and sint<N>. #488
Add <, <=, > and >= for uint<N> and builtin integers. #491
Add <<= and >>= for builtin integer shift amounts. #463
Add the INTX_ASSERTIONS CMake option, which keeps assert() and INTX_REQUIRE() in release builds. #493
Changed
A division by 0 gives 0 as the quotient and the remainder, as in the EVM: udivrem(), sdivrem(), / and %, and addmod() and mulmod() with the modulus 0. #435
A negative builtin integer shift amount fails an assertion and constant evaluation in debug builds. Release builds still give 0. #463
Optimize the division (udivrem(), /, %, addmod() and mulmod()):
With MSVC, force-inline unreachable() so that INTX_REQUIRE() is a hint in release builds, and compute the portable addc() and subc() without branches. #403#410
Fix the truncation of __int128 and unsigned __int128 values in the uint constructors, assignments and conversions. The other integer types wider than 64 bits, e.g. _BitInt(128), no longer convert to uint. #462
Fix the overflow check in from_string(), which missed most overflows of the decimal digits. Leading zeros no longer cause std::out_of_range. #432
Do not define __has_feature for the compilers without it. #450