daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. double inf(int n, double s, double x = 0.5) {
  2.     s += pow(-1, n + 1) * ( pow(x, n) / n);
  3.  
  4.     if ((s - log(1 + x)) < pow(10, -3))
  5.         inf(x, ++n, s);
  6.     return s;
  7. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top