Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float ln_series(int i, int max_i, float x){
- float a = (i == 0) ? 0 : 1 / i;
- if (i == max_i){
- return a;
- }
- return a + x*ln_series(i+1, max_i, x);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement