Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The Shift-6 character in a calculation
Message
De
22/03/2003 14:11:39
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
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:
00768945
Vues:
25
Assuming compount interest, I think the original formula is incorrect. You can't just divide the annual interest rate by 365.

The division is in the wrong place.

What needs to be clear is that the power function works for both integer and non-integer numbers. So, just as you put
>nCompVal = nStartVal * ( 1 + i ) ^ n where
>
>i=interest rate
>n=number of compounding periods
>
you can simply use:
nCompVal = nStartVal * (1 + i) ^ (days / 365)
assuming you want to calculate on the basis of 365 days per year.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform