摘要:
publicclass Sqrt {publicstaticvoidmain(String[] args){// read in the command-line argumentdouble c = Double.parseDouble(args[0]);double epsilon =1e-15;// relative error tolerancedouble t = c;// estimate of the square root of c// repeatedly apply Newton update step until desired precision is achieved 阅读全文