Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
这个是我的迭代In Reply To:谢谢styc,凭感觉写了牛顿法,感觉自己太差了,用什么方法都WA,郁闷。 Posted by:sunmoonstar_love at 2005-07-06 01:39:30 lp = (1 + n * c) * l; r = lp * lp * 0.25 / sqrt(lp * lp - l * l); do { double temp = lp / (2 * r); rp = r; r += r * (l - 2 * r * sin(temp)) / (l - lp * cos(temp)); } while(fabs(r - rp) > r * FLT_EPSILON); printf("%.3lf\n", r - sqrt(r * r - l * l * 0.25)); Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator