The number will be unchanged when passed to the function.
Either the debugger is showing an abbreviated value rather than the full number, or you may have used a lower-precision type such as a float instead of a double somewhere in the chain.
You can insert temporary cout messages in the function (or log your diagnostic messages to a file) in order to see what the full precision values really are, just in case the debugger is showing misleading information.
edit:I just checked my own debugger, it seems to display the double values correctly, but the longdouble is displayed inaccurately. Your environment may behave differently of course.
Ok guys thank you everyone for your help but I found out that there was no problem with my compiler.
It was just the debugger that showed only the first 6 digits but it actually stored all of them.
I don't know why in the first place my function didn't work.