/* DEC *SimpleInterest360(ndays,intr,princ,intamt,opt) * * ARGUMENT * int *ndays; number of days * DEC *intr; annual interest rate * DEC *princ; principal amount * DEC *intamt accrued interest amount * int opt; variable to solve for * * DESCRIPTION * Give three of the above variables, solves for the fourth. opt is * either GM_N, GM_I, GM_PV, or GM_INTR according to the variable to solve * for. Three source pointers are inputs, the fourth is the destination * pointer. princ and intamt are rounded to 2 decimal places, ndays is * rounded up to an integer, and intr is calculated to maximum precision. * * SIDE EFFECTS * If successful, the output pointer is modified, otherwise none. * * RETURNS * The destination pointer if successful and opt is not GM_N, otherwise * GM_NULL. * * POSSIBLE ERRORS * GM_NULLPOINTER * GM_ARGVAL * * AUTHOR * Jared Levy * Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved. * * MODIFICATIONS * * */ #include #include "gmsystem.h" DEC *SimpleInterest360(ndays,intr,princ,intamt,opt) int *ndays; DEC *intr; DEC *princ; DEC *intamt; int opt; { DEC *p; _MacStart(GM_SIMP360); p = _SimpleAux(ndays,intr,princ,intamt,opt,360); _MacRet(p); }