Here you can find the source of sqrt(double d)
public static double sqrt(double d)
//package com.java2s; //License from project: Open Source License public class Main { public static double sqrt(double d) { if (d == 0D) return 0D; else if (d == 1D) return 1D; else/*from ww w. j a va 2 s .c om*/ return Math.sqrt(d); } }