I have some natural big number in double. I need to get 30 rightmost bits of it (of integral part). If it was integer the operation was:
var & 0x3FFFFFFF
I can implement some functions for the purpose, but I need some simple solution. Is there one?
*edit:
All the answers doesn't work for me. I'll try to explain: for example I have double x = 9362446620820194.0000, 30 rightmost bits of integral part of that number is the number 957350626.
I could use uint64_t instead of double, but I need support for 32 bit systems.
p.s. I mean simple binary number representation, not the machine (memory)