Hi all i am working for quite a while now with c++, and this is a problem that's bothering me.
I try to evaluate pow(2,30), but the answer comes like this 1.07374e+009, instead of the expected integer form 1073741824. I tried casting it to int or long, but the thing is, then its sometimes truncates it to a lower value. For example, 1073741824 sometimes gets truncated to 1073741823. What should i do? Also if the number is not 2, how should one make sure to get the answer in right format.