Guest User

Untitled

a guest
May 20th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. float coth(float x, float epsilon)
  2. {
  3.    float last_n = x/3;
  4.    float sum = last_n;
  5.    float n = 0;
  6.    
  7.    for(int i = 2; i<=12, i++)
  8.    {
  9.        n = ((-1)^(i+1)*2^(2i))/faculty(2*n) * bernoulli[i] * x^(2*n-1)
  10.        sum += n;
  11.        if((n - last_n) > epsilon))
  12.            return sum;
  13.      
  14.    }
  15.    return sum;
  16. }
Add Comment
Please, Sign In to add comment