Unless otherwise indicated, when you create a number with a decimal point it will have machine precision (about 16 decimal digits). Since 16 digits is what you want, all you need to do is ask to see all significant digits. The front end typically shows only a few significant digits for machine precision number, but it "knows" all of them.
Sin[-1.002547] // FullForm
(* -0.8428444038954503` *)
So, any subsequent calculation with that value would use all the digits (i.e. many more than you see displayed). However, any subsequent arithmetic can only preserve or lose precision, it can't gain precision. So, if you need even more digits, you'll need to tell Mathematica to start with higher precision. Let's say you wanted that number to have 50 digits of precision. Then you could do this:
Sin[-1.002547`50]
(* -0.84284440389545029858668699605171893416627484058817 *)
Alternatively,
Sin[SetPrecision[-1.002547, 50]]
(* -0.84284440389545034001414581446602226926579398448717 *)
Side note, the function N
doesn't automatically add precision. It will try to give a result to the requested precision, but precision can't be gained, so if you start with machine precision, that's the max you can end up with.
N[Sin[-1.002547], 50] // FullForm
(* -0.8428444038954503` *)
I should add that precision is ultimately relative to the binary representation and only significant digits are counted. So when you say you want to "force Mathematica to display 16 digits after the decimal place" the above techniques might actually not always work if you literally need "16 digits after the decimal place". To control exactly how a number is displayed, you would need to use NumberForm
or one of the related *Form
functions.