interest Effective
Finance namespace
Controller: CodeCogs
Interface
C++
InterestEffective
doubleinterestEffective( | double | rate | |
int | npery | ) |
- rate is the nominal interest rate, and
- npery is the number of compounding periods per year,
Example 1
#include <stdio.h> #include <codecogs/finance/banking/interesteffective.h> int main() { int i; float f = 4.25; printf(" Rate NPery Effective\n"); for (i=3;i<10;++i) { printf(" %f %d %f\n",f,i,Finance::Banking::interestEffective(f,i)); ++f; } return 0; }
OutputRate NPery Effective 4.250000 3 0.043105 5.250000 4 0.053542 6.250000 5 0.064083 7.250000 6 0.074726 8.250000 7 0.085475 9.250000 8 0.096331 10.250000 9 0.107296
If less than or equal to 0, effect will return -1
Note
- It is assumed that no withdrawls are made on the sum.
James Warren (August 2005)
Parameters
rate is the nominal interest rate, expressed as a double type.
Authors
- Alwyn Tan (Mar 2005)
Source Code
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.