« Reply #4 on: September 16, 2016, 11:15:02 pm »
@tMinusZero
Look in the Math unit. It has some basic financial functions that can help you with
capital budgeting calculations. You can use them to put together more complicated equations.
{ Financial functions }
function FutureValue(ARate: Float; NPeriods: Integer;
APayment, APresentValue: Float; APaymentTime: TPaymentTime): Float;
function InterestRate(NPeriods: Integer; APayment, APresentValue, AFutureValue: Float;
APaymentTime: TPaymentTime): Float;
function NumberOfPeriods(ARate, APayment, APresentValue, AFutureValue: Float;
APaymentTime: TPaymentTime): Float;
function Payment(ARate: Float; NPeriods: Integer;
APresentValue, AFutureValue: Float; APaymentTime: TPaymentTime): Float;
function PresentValue(ARate: Float; NPeriods: Integer;
APayment, AFutureValue: Float; APaymentTime: TPaymentTime): Float;
You are looking for the future value of y so use the FutureValue function OR the solution
lainz proposed above.
JD
« Last Edit: September 16, 2016, 11:20:15 pm by JD »

Logged
Windows (10), Linux Mint - Lazarus 2.1/FPC 3.2, Delphi
Indy 10.6 series; mORMot; Zeos 7.3; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1