public static void main(String args[]) {
double latA=rad(36.6),lngA=rad(116.4);
double latB=rad(36.7),lngB=rad(116.4);
//double d=111.12*Math.cos(1/(Math.sin(latA)*Math.sin(latB)+Math.cos(latA)*Math.cos(latB)*Math.cos(lngB-lngA)));
double d=2*Math.asin(Math.sqrt(Math.pow(Math.sin((latA-latB)/2), 2)+Math.cos(latA)*Math.cos(latB)*Math.pow(Math.sin((lngA-lngB)/2), 2)))*6378.137;
System.out.println(d);
}
private static double rad(double d){
return d * Math.PI / 180.0;
}