Re: 男人发现儿子不是亲生的以后该怎么办? (转载)# Joke - 肚皮舞运动
l*y
1 楼
double mysqrt(double i)
{
if (i <= 0) return 0;
double low = 1, high = i;
if (i < 1) {
low = i;
high = 1;
}
int index = 0;
while (index < 64) {
double mid = low + (high - low) / 2;
if (mid * mid > i) {
high = mid;
} else {
low = mid;
}
index ++;
}
return low;
}
{
if (i <= 0) return 0;
double low = 1, high = i;
if (i < 1) {
low = i;
high = 1;
}
int index = 0;
while (index < 64) {
double mid = low + (high - low) / 2;
if (mid * mid > i) {
high = mid;
} else {
low = mid;
}
index ++;
}
return low;
}