I am developing a C ++ application that runs on a linux environment. I need to store a lot of value with 6 decam places. I used a double for this. But after assignment, the double variable does not contain the exact value. It is rounded.
Example:
double dValue = 79447461534242.913072;
But after that, when I see the value in dValue, it is something like 79447461534242.906
Can someone let me know why this is happening and offer me the correct data type that can contain the exact value without losing accuracy.
source
share