473,320 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

algorithms

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
Nov 17 '05 #1
3 865

"Lembit" <Le****@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
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
Nov 17 '05 #2

"Fredrik Wahlgren" <fr****************@mailbox.swipnet.se> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...

"Lembit" <Le****@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
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

Forget my previous reply
Nov 17 '05 #3
Lembit wrote:
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
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Oplec | last post by:
Hello, I am learning the C++ programming language as a hobby. I have found some useful links such as the C++ FAQ Lite, Flipcode, Gamedev, and Gamasutra that are good for information/help. However,...
6
by: Fraser Ross | last post by:
Algorithms cannot be used with input stream iterators? Is copying the range to a temporary container before using the algorithm the usual thing to do? Fraser.
28
by: John McCabe | last post by:
Hi I'm looking for something equivalent to the Data Structures and Algorithms in Ada 95 books by Biedler and Feldman etc, but based towards efficient C++ implementations. Does anyone know of...
7
by: Anders Borum | last post by:
Hello! I'm starting to dive into algorithms in general (sorting, trees etc.) and am currently reading a book from Robert Sedgewick called "Algorithms in C++, 3rd. Edition" and would like other...
26
by: vlsidesign | last post by:
I am a newbie and going through "The C programming language" by Kernighan & Richie on my own time (I'm not a programmer but I want to learn because it can save me time in my normal job, and it is...
3
by: arnuld | last post by:
i am looking for "algorithms in C++" book. Knuth is FULL of Mathematics, not my kind of author. i checked ACCU and got these (listing only those that are available in my country: 1. Algorithms...
17
by: Happy Man | last post by:
Truth Seeker http://www.thisistruth.org/truth.php?f=TruthSeeker No one is compelled to accept the truth, but it is certainly a shame upon the human intellect when a man is not even...
2
by: =?Utf-8?B?Q3JtTmV3Ymll?= | last post by:
Hi, 1) I want to hone my problem solving skills and be good at logic. How do I achieve this? 2) Where can I find c# puzzles or c# algorithms. 3) How do I print the values of a N X N matrix...
53
by: Vicent Giner | last post by:
Hello. I am new to Python. It seems a very interesting language to me. Its simplicity is very attractive. However, it is usually said that Python is not a compiled but interpreted programming...
12
by: subramanian100in | last post by:
Below is my understanding about count algorithms. Return type of count and count_if algorithms is iterator_traits<InputIterator>::difference_type. If the container contains more than...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.