Hey guys,
I am bit confused with the Precision in Mathematica. I first set Precision at 50. Then I set up two tables one starts from 0.5 with gap 1/2 until 9 and the other starts from 1/2 with gap 1/2 until 9 too. However, the first table stops at 8.5 while the second one stops at 9. The key part focus on the difference between 8.5 with precision 51.23044892137827 and 8.5 with precision 50, the 17th item in each table. If you simply check by "==" then the answer is True. So I am wondering how to check their difference.
Please see my attachment. Commend are pasted in the following.
$PreRead = (# /.
s_String /;
StringMatchQ[s, NumberString] &&
Precision@ToExpression@s == MachinePrecision :> s <> "`50." &);
T1 = Table[z, {z, 0.5, 9, 1/2}]
% // FullForm
T2 = Table[z, {z, 1/2, 9, 1/2}]
T1[[17]] == T2[[17]]
Thanks in advance.
Attachments: