Sunday 11 August 2019

__int128_t and __float128 in GNU

Usage of __int128_t:
  • supports really big intermediate numbers, from -2^128 + 1 to 2^128 - 1
  • it has 128 bits
Usage of __float128 :
  • can go up to 20 (or 30, if I remember correctly) decimal places
  • it has 128 bits
Problems of __int128_t and __float128:
  • can not print a integer of __int128_t
  • can not read a integer of __int128_t
Comparing __int128_t and long long
  • __int128_t consumes 3 - 5 times more memory and time then long long
  • __int128_t consumes 3 - 5 times more time and time then long long
Comparing __float128 and long double :
  • __float128 consumes 3 - 5 times more memory and time then long double
  • __float128 consumes 3 - 5 times more time and time then long double
A little exercice before the end :

What is the difference __m128d and __int128 ?

Comment below and thanks for reading !

No comments:

Post a Comment

std::next_permutation(arr.begin(),arr.end());

What is next_permutation(a.begin(),a.end()) ? Next permutation is like what its name says, finds the next permutation of a and assigns ...