quick Java programme to do Newton-Rafson iteration