depreciation_vdb
Evaluates the depreciation of an asset for any given period using the variable-declining balance method.
Synopsis
#include <imsl.h>
float imsl_f_depreciation_vdb (float cost, float salvage, int life, int start, int end, float factor, int sln)
The type double function is imsl_d_depreciation_vdb.
Required Arguments
float cost (Input)
Initial value of the asset.
float salvage (Input)
The value of an asset at the end of its depreciation period.
int life (Input)
Number of periods over which the asset is being depreciated.
int start (Input)
Starting period in the calculation. start cannot be less than 1; or greater than end.
int end (Input)
Final period for the calculation. end cannot be greater than life.
float factor (Input)
Rate at which the balance declines. factor must be positive.
int sln (Input)
If equal to zero, do not switch to straight-line depreciation even when the depreciation is greater than the declining balance calculation.
Return Value
The depreciation of an asset for any given period, including partial periods, using the variable-declining balance method. If no result can be computed, NaN is returned.
Description
Function imsl_f_depreciation_vdb computes the depreciation of an asset for any given period using the variable-declining balance method using the following:
If sln =0
If sln ≠ 0
where ddbi is computed from imsl_f_depreciation_ddb for the i-th period. k =the first period where straight line depreciation is greater than the depreciation using the double-declining balance method .
Example
In this example, imsl_f_depreciation_vdb computes the depreciation of an asset between the 10th and 15th year, which costs $25,000 initially, lasts 15 years and has a salvage value of $5,000.
#include <stdio.h>
#include <imsl.h>
int main()
{
float cost = 25000;
float salvage = 5000;
int life = 15;
int start = 10;
int end = 15;
float factor = 2.;
int sln = 0;
float vdb;
vdb = imsl_f_depreciation_vdb (cost, salvage, life, start,
end, factor, sln);
printf ("The depreciation allowance between the 10th and 15th ");
printf ("year is $%.2f.\n", vdb);
}
Output
The depreciation allowance between the 10th and 15th year is $976.69.