I want to implement functionality in PHP similar to what is available as Goal Seek in Microsoft Excel.
Is such a thing possible to implement in PHP?
Here is the story in detail
We are writing a Personal Loan Management application for a financial company. They are at present using Excel sheets to do all kind of load, EMI, etc. calculations. Now they want to implement this online so that their staff can access it from any where.
In this we have to program interest calculation. This interest calculation is very complicated but suffice it to be said that to Interest is calculated in reducing method but, in such a way that it is always a bit less then flat interest.
Say for example someone takes a loan of 10000 at the rate of 10% for 12 months (1 year).
In this case Flat interest will be 1000 (10000 * (10/100)).
We have to show borrower interest calculations in reducing method and the total interest in reducing method should always be a bit less then Flat Interest.
For this we have to calculate a rate of interest which is actually higher than 10%. To arrive at the exact value they(client) are currently using Goal Seek functionality as this is very quick.
In the online software we are developing we have already implement a logic for performing this calculations but it is taking a very very long time as we have to execute a loop which at time iterates more than 100000 time to arrive at an acceptable value.
I hope I have explained the whole situation properly.