只需一步,快速开始
手机号码,快捷登录
巡抚
1万
1223
4万
public double SquareRoot(double x)
{
if (x < 0.0)
throw new ArgumentOutOfRangeException();
}
double estimate=x;
double diff=x;
while (diff > estimate / 1000)
double previousEstimate=estimate;
estimate=estimate - (estimate * estimate - x) / (2 * estimate);
diff=Math.Abs(previousEstimate - estimate);
return estimate;
在测试资源管理器中,选择“全部运行”以测试已纠正的方法,并确保您未引入回归测试。所有测试都将通过。
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
给能够长期敏锐提供优质的网络资源资讯者。授予方式及标准:人工授予,在信息交流专区发布有用的一线最新资讯的帖子≥20次,能为大家所学所用,并且需要获得一致的好评,至少有5个帖子后面有“火”字,由信息交流区版主提名颁发。
手机版|小黑屋|富贵论坛 ( 琼ICP备2022019866号-1 )
GMT+8, 2024-7-27 13:46 , Processed in 0.154346 second(s), 32 queries .
Powered by Discuz! X3.4
© 2001-2023 Discuz! Team.