CNLMath : Special Functions : depreciation_ddb
depreciation_ddb
Evaluates the depreciation of an asset using the double-declining balance method.
Synopsis
#include <imsl.h>
float imsl_f_depreciation_ddb (float cost, float salvage, int life, int period, float factor)
The type double function is imsl_d_depreciation_ddb.
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 period (Input)
Period for which the depreciation is to be computed. period cannot be greater than life.
float factor (Input)
Rate at which the balance declines. factor must be positive.
Return Value
The depreciation of an asset using the double-declining balance method for a period specified by the user. If no result can be computed, NaN is returned.
Description
Function imsl_f_depreciation_ddb computes the depreciation of an asset using the double-declining balance method for a specified period.
It is computed using the following:
Example
In this example, imsl_f_depreciation_ddb computes the depreciation of an asset, which costs $2,500 initially, lasts 24 periods and a salvage value of $500, for each period.
 
#include <stdio.h>
#include <imsl.h>
 
int main()
{
float cost = 2500;
float salvage = 500;
float factor = 2;
int life = 24;
int period;
float ddb;
 
for (period = 1; period <= life; period++)
{
ddb = imsl_f_depreciation_ddb (cost, salvage, life, period, factor);
printf ("For period %i, ddb = $%.2f.\n", period, ddb);
}
}
Output
 
For period 1, ddb = $208.33.
For period 2, ddb = $190.97.
For period 3, ddb = $175.06.
For period 4, ddb = $160.47.
For period 5, ddb = $147.10.
For period 6, ddb = $134.84.
For period 7, ddb = $123.60.
For period 8, ddb = $113.30.
For period 9, ddb = $103.86.
For period 10, ddb = $95.21.
For period 11, ddb = $87.27.
For period 12, ddb = $80.00.
For period 13, ddb = $73.33.
For period 14, ddb = $67.22.
For period 15, ddb = $61.62.
For period 16, ddb = $56.48.
For period 17, ddb = $51.78.
For period 18, ddb = $47.46.
For period 19, ddb = $22.09.
For period 20, ddb = $0.00.
For period 21, ddb = $0.00.
For period 22, ddb = $0.00.
For period 23, ddb = $0.00.
For period 24, ddb = $0.00.