# How to include zeros at the end of an approximation [closed]

I want to make a table for my calculus 1 class learning limits. I am calculating $\lim_{x\to 0} \frac{sin(x)}{x}$. I am using the approximation given by N. The problem is with the expression up to 15 (or however many) digits. For example, calculating this with $x=.5$, I type

N[Sin[.5]/(.5),15]


The output is

.958851077208


which only has 12 decimal places. I assume this is because the last 3 (and the forever) are just zero. (Either that or Mathematica cannot calculate it to more than 12 digits, which I doubt). How can I get it to show it with all 15 digits and not just the 12 non-zero ones?

• Look at SetAccuracy and SetPrecision. – corey979 Jan 9 '17 at 21:56
• Replace .5 with 1/2. – Chip Hurst Jan 9 '17 at 22:04
• Thanks @ChipHurst! Why did this work? – user46348 Jan 9 '17 at 23:12
• The expression Sin[.5]/.5 is evaluated first, hence you've computed a machine number first, which has a limited number of digits. If you use 1/2 instead, you'll have an exact value to take an arbitrary amount of digits from. – Chip Hurst Jan 9 '17 at 23:17
• This is also mentioned in the third example in the docs for N – Michael E2 Jan 9 '17 at 23:45

In:= ndigits = 20;