kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

i128_03_add_sub_carry.c (344B)


      1 typedef unsigned __int128 u128;
      2 
      3 int test_main(void) {
      4   u128 x = (((u128)1 << 64) - 1) + 3;
      5   if ((unsigned long long)x != 2ULL) return 11;
      6   if ((unsigned long long)(x >> 64) != 1ULL) return 12;
      7 
      8   x -= 3;
      9   if ((unsigned long long)x != 0xffffffffffffffffULL) return 13;
     10   if ((unsigned long long)(x >> 64) != 0ULL) return 14;
     11   return 29;
     12 }