Below is my code:
n = 15;
roots = Table[Sqrt[Prime[i]], {i, n}];
q = 10^125;
error = N[Abs[q*roots - Round[q* roots]], 12]
Here I have a large number q = 10^125. It is okay for other calculations (which I did not show). But because of it, I get
So, where did it go wrong? My OS is windows 7 and my version is 11. I am actually often confused by the operation N. When should I use it? Before any other operation or after all other operators?
error = Block[{$MaxExtraPrecision = 400}, N[Abs[q*roots - Round[q*roots]], 12]]
$\endgroup$