log formula

hay every one
how can i find n in this equation to c++ :-
S = C(1 - d)pow n

or
how to convert this equation to c++ :-

n= log v to the base of m

closed account (D80DSL3A)
From another thread on this page:
http://www.cplusplus.com/forum/beginner/55951/#msg301257
so in this

#include <cmath>

int main()
{
float S, C, d, n;
//Initialize S, C, D here

n = (log(S) - log(C))/log(1-d);

return 0;
}

i can find the log to the base of any thing ?
There is only functions with base e and base 10.

But I found this that I think can help you http://cboard.cprogramming.com/c-programming/89402-there-log-base-2-function.html
Topic archived. No new replies allowed.