campo-sirio/gfm/simp360.c
alex ba237a9d91 Patch level : no patch
Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
Aggiunti i sorgenti per Greenleaf Math Library (gfm.dll)


git-svn-id: svn://10.65.10.50/trunk@10079 c028cbd2-c16b-5b4b-a496-9718f37d4682
2002-02-26 12:19:02 +00:00

54 lines
1.2 KiB
C
Executable File

/* 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 <stdio.h>
#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);
}