double sqrt1(double x){ double low = 0.0; double high = x; const double EPSILON = 0.001; // e 精度 double mid = (high + low) / 2; while (high - low > EPSILON){ if (mid * mid > x){ high = mid; } else low = mid; mid = (high + low) / 2; } return mid; }
点赞 评论

相关推荐

不愿透露姓名的神秘牛友
2025-12-19 16:50
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务