Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

这个是我的迭代

Posted by frkstyc at 2005-07-06 01:41:22 on Problem 1905
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator