compound man page on OpenIndiana

Man page or keyword search:  
man Server   20441 pages
apropos Keyword Search (all sections)
Output format
OpenIndiana logo
[printable version]

annuity(3M)							   annuity(3M)

NAME
       annuity, annuityf, annuityl, compound, compoundf, compoundl - financial
       functions

SYNOPSIS
       cc [ flag ... ] file ...	 -lsunmath -lm [ library ... ]

       #include <sunmath.h>

       double annuity(double r, double n);

       float annuityf(float r, float n);

       long double annuityl(long double r, long double n);

       double compound(double r, double n);

       float compoundf(float r, float n);

       long double compoundl(long double r, long double n);

DESCRIPTION
       These functions are useful in financial computations of the  effect  of
       interest at periodic rate r over n periods.

       annuity(r,  n)  computes	 the  present  value  of  annuity factor, (1 -
       (1+r)**-n) / r.	compound(r, n) computes the compound interest  factor,
       (1+r)**n.  Both functions return NaN when r <= -1.  For sensible values
       of r and n, these functions are evaluated  carefully  so	 as  to	 yield
       accurate results and avoid spurious floating-point exceptions.  In this
       respect, they are superior to a literal evaluation of the corresponding
       expressions using the pow(3M) function.

EXAMPLES
       The value of an initial principal P0 after earning interest at periodic
       rate r for n periods is P = P0 *	 compound(r,  n).   Thus  a  principal
       amount  P0  placed  at  5%  annual interest compounded quarterly for 30
       years would yield

	    P = P0 * compound(.05 / 4, 30.0 * 4)

       Given an initial principal P0, the equivalent periodic payment is  p  =
       P0  / annuity(r, n).  So a conventional fixed-rate 30-year home loan of
       amount P0 at 10% annual interest would be amortized by monthly payments
       in the amount

	    p = P0 / annuity(.10 / 12, 30.0 * 12)

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌────────────────────┬─────────────────┐
       │  ATTRIBUTE TYPE    │ ATTRIBUTE VALUE │
       ├────────────────────┼─────────────────┤
       │Interface Stability │ Committed	      │
       │MT-Level	    │ MT-Safe	      │
       └────────────────────┴─────────────────┘
SEE ALSO
       pow(3M), attributes(5)

				  14 Mar 2009			   annuity(3M)
[top]

List of man pages available for OpenIndiana

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net