Noisy numerical finite difference calculated by NDSolve`FiniteDifferenceDer

I met a problem when playing with the numerical difference provided by mathematica. My aim is to test the accuracy of the high-order numerical derivative. The code is below

Nx = 512; u0 = 0; uN = 5.0; du = (uN - u0)/Nx; ugrid = du Range[0, Nx];
C0 = Sin[Pi #/uN] & /@ ugrid;
order = 3;
der = 6;
exact1 = D[Sin[u Pi/uN], {u, der}];
exact2 = Table[
   exact1, {u, ugrid[[1]], ugrid[[-1]], ugrid[[2]] - ugrid[[1]]}];
num = NDSolve`FiniteDifferenceDerivative[Derivative[der], ugrid, C0, 
   "DifferenceOrder" -> order];
ListPlot[{Transpose[{ugrid, exact2}], Transpose[{ugrid, num}]}]

The result looks like this
enter image description here

However, when I place the code in a dynamic module to play with the order of derivatives and number of points

Manipulate[Nx=2^pow;u0=0;uN=5;du=(uN-u0)/Nx;
ugrid=du Range[0,Nx];
C0=Sin[Pi #/uN]& /@ugrid;
exact1=D[Sin[Pi u/uN],{u,der}];
exact2=Table[exact1,{u,ugrid[[1]],ugrid[[-1]],ugrid[[2]]-ugrid[[1]]}];
num=NDSolve`FiniteDifferenceDerivative[Derivative[der],ugrid,C0,"DifferenceOrder"->order];
ListPlot[{Transpose[{ugrid,exact2}],Transpose[{ugrid,num}]}],{{pow,9,Dynamic["Points: "<>ToString[2^pow]]},4,15,1},{{order,3,Dynamic["Order: "<>ToString[order]]},1,15,1},{{der,6,Dynamic["Deriv: "<>ToString[der]]},1,18,1},ContinuousAction->False,LabelStyle->"Text"]

The result looks pretty good
enter image description here

I’m not sure what the dynamic module does such that they generate different results with the normal one.

I got an answer from stackexchange. The difference lies on the fact that uN = 5.0 in the first example while uN = 5 in the second. I didn’t exepct 5.0 and 5 make such a big difference in the numerics. I wonder if there is a way to improve the results for uN = 5.0.

I got an answer from stackexchange. The results can be imrpoved by changing uN = 5.0 to uN = 5`10. I didn’t know that the nuemrical digits can make a such a big difference!