Concerning the first method: is there any way to see the digits I need without changing the global preferences? I mean that in one line of the notebook I may need 6 digits after the point, and in another one - 12.
Concerning the second method: I cannot catch the logic. Let us define two variables:
In[1]:= x = 1/7.0
Out[1]= 0.142857
In[3]:= Precision[x] // N
Out[3]= 15.9546
In[7]:= y = N[1/7, $MachinePrecision]
Out[7]= 0.1428571428571429
In[8]:= Precision[y] // N
Out[8]= 15.9546
One can see that x and y have the same value and same precision. However, from the viewpoint of Mathematica they are different. How it makes the difference?
It seems to me that in older than 6 versions of Mathematica there was no such problem. I was able to write something like
gives you all the digits. Also, if you copy a number from the notebook (which looks like it has 6 digits) and paste it elsewhere, you will see all of them.
I go back to your original question: “How can I see more digits of x?”
So, the issue is not concerned with the actual number x, but rather with the value displayed (i.e., what you see) which by default is 6. The question, I insist, is not about precision, but about the number of digits displayed. I think (in my humble opinion) that you shouldn’t bother about precision, which is an altogether different thing. If your number is exact (such as 1/7) then you can use N[1/7, n] to display n digits. Otherwise, why not use NumberForm? (check the online Help)