newton f f' = g 1.0
    where g x = if abs(x'-x) < 1.0e-6 then x' else g x'
	      where x'  = x + f x / f' x
	  
test = newton f1 f2
    where f1 x = x*x + 2*x + 1
	  f2 x = 2*x + 2