I have the following code...
ran_int = rand(); //check READ ME Citation B
if (input == 32){
//rand() with 2^31 as lower limit and 2^32 as its upper
long long int upper_limit = 4294967295;
long long int lower_limit = 2147483649
ran_32_64 = (rand() * 2) % (upper_limit - lower_limit);
ran_32_64 += lower_limit;
}
else if(input == 64){
//rand() x 4 with 2^63 as lower limit and 2^64 as its upper
unsigned long long int upper_limit = powl(2, 64);
long long int lower_limit = powl(2, 63);
ran_32_64 = (rand() * 4) % (upper_limit - lower_limit);
ran_32_64 += lower_limit;
}
else if(input == 128){
//rand() x 8 with 2^127 as lower limit
unsigned _int128 upper_limit =
}
and for the last block I need to represent a 128 bit binary number. I know I can use the type _int128 for 128 bit values, but that's not totally precise.
So I'm thinking to be totally precise I could use type double, but I can't find any literature on 128 bit double types.
Any ideas?