IMSL C Math Library
depreciation_sln
Evaluates the depreciation of an asset using the straight-line method.
Synopsis
#include <imsl.h>
float imsl_f_depreciation_sln (float cost, float salvage, int life)
The type double function is imsl_d_depreciation_sln.
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.
Return Value
The straight line depreciation of an asset for its life. If no result can be computed, NaN is returned.
Description
Function imsl_f_depreciation_sln computes the straight line depreciation of an asset for its life.
It is computed using the following:
Example
In this example, imsl_f_depreciation_sln computes the depreciation of an asset, which costs $2,500 initially, lasts 24 periods and a salvage value of $500.
 
#include <stdio.h>
#include <imsl.h>
 
int main()
{
float cost = 2500;
float salvage = 500;
int life = 24;
float depreciation_sln;
 
depreciation_sln = imsl_f_depreciation_sln (cost, salvage, life);
printf ("The straight line depreciation of the asset for one ");
printf ("period is $%.2f.\n", depreciation_sln);
}
Output
 
The straight line depreciation of the asset for one period is $83.33.