I'm new to Mathematica and am not sure why I cannot show more decimal points in a variable. I am using Newton's Method to find the zero's of a function and I'm trying to print the x value of the zero.
f[x_] := Tan[x] - x/2; fp[x_] := -1/2 + Sec[x]^2; xn = 5.; convergence = False; \[Epsilon] = 1*^-6; fx = f[xn]; While[convergence == False, fpx = fp[xn]; d = fx/fpx; xn = xn - d; fx = f[xn]; If[Abs[d] < \[Epsilon], convergence = True]] N[xn, 10] N[5, 10]
the zero is at 39.219, but I believe there are more decimals in this, and wanted to just test the N function with 5 to make sure that it will just print 0's after the number if there are not more numbers. Why is it only showing 5 numbers for xn?