CNLMath : Special Functions : depreciation_amorlinc
depreciation_amorlinc
Evaluates the depreciation for each accounting period. This function is similar to depreciation_amordegrc, except that depreciation_amordegrc has a depreciation coefficient that is applied during the evaluation that is based on the asset life.
Synopsis
#include <imsl.h>
float imsl_f_depreciation_amorlinc (float cost, struct tm issue, struct tm first_period, float salvage, int period, float rate, int basis)
The type double function is imsl_d_depreciation_amordegrc.
Required Arguments
float cost (Input)
Initial value of the asset.
struct tm issue (Input)
The date on which interest starts accruing. For a more detailed discussion on dates see the Usage Notes section of this chapter.
struct tm first_period (Input)
Date of the end of the first period. For a more detailed discussion on dates see the Usage Notes section of this chapter.
float salvage (Input)
The value of an asset at the end of its depreciation period.
int period (Input)
Depreciation for the accounting period to be computed.
float rate (Input)
Depreciation rate.
int basis (Input)
The method for computing the number of days between two dates. It should be one of IMSL_DAY_CNT_BASIS_ACTUALACTUAL, IMSL_DAY_CNT_BASIS_NASD, IMSL_DAY_CNT_BASIS_ACTUAL360, IMSL_DAY_CNT_BASIS_ACTUAL365, or IMSL_DAY_CNT_BASIS_30E36. For a more detailed discussion see the Usage Notes section of this chapter.
Return Value
The depreciation for each accounting period. If no result can be computed, NaN is returned.
Description
Function imsl_f_depreciation_amorlinc computes the depreciation for each accounting period.
Example
In this example, imsl_f_depreciation_amorlinc computes the depreciation for the second accounting period using the US (NASD) 30/360 day count method. The security has the issue date of November 1, 1999, end of first period of November 30, 2000, cost of $2,400, salvage value of $300, depreciation rate of 15%.
 
#include <stdio.h>
#include <imsl.h>
 
int main()
{
struct tm issue, first_period;
float cost = 2400.;
float salvage = 300.;
int period = 2;
float rate = .15;
int basis = IMSL_DAY_CNT_BASIS_NASD;
float amorlinc;
 
issue.tm_year = 99;
issue.tm_mon = 10;
issue.tm_mday = 1;
 
first_period.tm_year = 100;
first_period.tm_mon = 10;
first_period.tm_mday = 30;
 
amorlinc = imsl_f_depreciation_amorlinc (cost, issue, first_period,
salvage, period, rate, basis);
printf ("The depreciation for the second accounting period ");
printf ("is $%.2f.\n", amorlinc);
}
Output
 
The depreciation for the second accounting period is $360.00.