Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double hui(int x) {
- double ans = 1;
- double res = 1 / sqrt(x);
- double eps = 0.00001;
- while(abs(ans - res) > eps) {
- ans = 1.5 * ans - 0.5 * x * ans * ans * ans;
- }
- return ans;
- }
Advertisement
Add Comment
Please, Sign In to add comment