Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The Shift-6 character in a calculation
Message
De
24/03/2003 06:59:52
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
22/03/2003 12:29:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00768921
Message ID:
00769164
Vues:
25
Bingo! Thanks Jos!

BTW, doesn't it matter regarding leap years? Whenever I've had to annualize something I needed to take that into consideration.

Renoir

>Renoir, the formula to calculate simple compound interest is:
>
>
>nCompVal = nStartVal * ( 1 + i ) ^ n where
>
>i=interest rate
>n=number of compounding periods
>
>
>So a start value of 100 compounded at 10% interest for 5 period (eg take $100 and invest at 10% per annum for 5 years) would be:
>
>
>nCompVal = 100 * ( 1 + 10/100 ) ^ 5
>? nCompVal  && returns 161.05
>
>
>
>Assuming my memory serves me correctly which is a big "if" :)
>
>
>What your original formula is trying to do (I think) is first convert an annual rate to a daily rate and then compounding the nOldValue for some type of pro-rata number of days. It would be simplified by:
>
>
>nNewValue = nOldValue * ( 1 + ( (nInterestRate/100) / 365 ) ) ^ nDays
>
>
>But I am not sure this will give the answer required as I am not sure you can convert an annual rate to a daily rate like this?
>
>
>>Jos,
>>
>>Y'know, I kind of thought that, but given this calculation:
>>
>>
>>nNewValue = (nOldValue * ((1 + nInterestRate/(365*100))^(365 * nDays / 365)))
>>
>>
>>I couldn't see what they were trying to do (other than incorrectly use 365 to annualize).
>>
>>Jay
>>
>>>Renoir, it is the "power to" function. Same as double asterisk **. i.e. 4^2 = 16 and 4**2 = 16
>>>
>>>
>>>>What would the "^" character do in a calculation? Can't seem to locate it anywhere.
>>>>
>>>>Renoir
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform