algorithms

G

Guest

I need help!!!
What should i do if i want to get out r from this function where i already
have a and b.

(1-(1/(1+r))^b)/r=a is there any logarithm and if there is in what library
do i find it
 
F

Fredrik Wahlgren

Lembit said:
I need help!!!
What should i do if i want to get out r from this function where i already
have a and b.

(1-(1/(1+r))^b)/r=a is there any logarithm and if there is in what library
do i find it

I think this is correct. Check it.

(1-(1/(1+r))^b)/r=a
(1-(1/(1+r))^b)=a*r
1-(1/(1+r)) = (a*r)^(1/b)
-1/(1+r) = (a*r)^(1/b)-1
1/(1+r) = -((a*r)^(1/b)-1)
1+r = 1/(-((a*r)^(1/b)-1))
r = 1/(-((a*r)^(1/b)-1))-1

/Fredrik
 
C

Carl Daniel [VC++ MVP]

Lembit said:
I need help!!!
What should i do if i want to get out r from this function where i
already have a and b.

(1-(1/(1+r))^b)/r=a is there any logarithm and if there is in what
library do i find it

I'm too lazy to attempt the algebra at the moment, but looking at it, I'd
say no, there is no formula for that value - you'll have to use numerical
methods to search for a suitable r for a given a and b. For example, you
might use "Newton's Method" to solve this. You'll likely have to look it up
in a numerical methods book or a calculus book.

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top