Evaluates the depreciation of an asset using the straight-line method.
#include <imsl.h>
float imsl_f_depreciation_sln (float cost, float salvage, int life)
The type double function is imsl_d_depreciation_sln.
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.
The straight line depreciation of an asset for its life. If no result can be computed, NaN is returned.
Function imsl_f_depreciation_sln computes the straight line depreciation of an asset for its life.
It is computed using the following:

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"
void 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);
}
The straight line depreciation of the asset for one period is $83.33.
|
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |