[futurebasic] Re: [FB] Financial calculations in FB^3

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2001 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Sun, 3 Jun 2001 12:57:32 -0400
>The formula for the future value of an investment is:
>
>FV = P*(1 + r)n
>
>where
>
>FV is the future value
>P is the principal, i.e. the initial investment
>r is interest rate, and
>n is the number of years since initial investment.
>
>Example:
>
>Suppose we invest $1500 at an annual interest rate of
>5% compounded annually for n = 20 years. The value of this
>investment 20 years from now will be:
>
>FV = $1500 *(1 + 0.05)20 = $3975.94
>
>There is only one problem: This does not equate properly in FB^3, nor does:
>
>FV = P*(1 + r)^n
>
>Does anyone have an idea of how to properly perform these calculations?
>
>Thanks,
>
>Ken


Ken,

in Release 4 running the below in Console mode I get

DIM FV as double
DIM n as int
DIM r as double
DIM P as INT

'FV = $1500 *(1 + 0.05)20 = $3975.94

P = 1500
r = .05
n = 20

'There is only one problem: This does not equate properly in FB^3, nor does:

FV = P*(1 + r)^n


Print FV  // = 3979.9465577


is that not right?

Robert