Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. float ln_series(int i, int max_i, float x){
  2. float a = (i == 0) ? 0 : 1 / i;
  3. if (i == max_i){
  4. return a;
  5. }
  6. return a + x*ln_series(i+1, max_i, x);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement