GerONSo

Untitled

Feb 24th, 2021
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. double hui(int x) {
  2. double ans = 1;
  3. double res = 1 / sqrt(x);
  4. double eps = 0.00001;
  5. while(abs(ans - res) > eps) {
  6. ans = 1.5 * ans - 0.5 * x * ans * ans * ans;
  7. }
  8. return ans;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment