The module below performs Newton's Method (NM) on single-valued functions of a single real variable.   The input to newton are:                                                                                               
      
      q, the function whose roots are sought,  
      z, the initial guess,   
      n, the desired number of iterations.
    
    Examples follow the code below.

\(\(\(newton[q_, z_, n_] := 
      Module[{values, thing}, 
        values = Table[0, {j, n}]; 
values[\([0]\)] = 
          z; 
dq = D[q, x]; 
For[i = 1, 
          i < n + 1, \(i++\), 
          thing = q/dq /. 
              x -> 
                values[\([i - 1]\)]; 
values[\([i]\)] = 
            values[\([i - 1]\)] - thing;]; 
values]\)\(
\)
    \)\)

newton[x^2 - 34,  6,  5]

The module will do exact arithmetic unless you tell it otherwise,which you can do by giving it any piece of input with a decimal point.  Exact arithmetic can be slow.  I wouldn't, for example, ask it to compute 100 iterations exactly unless you're very patient.

newton[x^2 - 34,  6.0,  5]

A quick and dirty way to get more digits, is to give more digits.  Note you pretty clearly see the quadratic convergence in this example.

newton[x^2 - 34,  6.0000000000000000000000,  5]