48 lines
792 B
C
48 lines
792 B
C
|
/* DEC *ArcTangentDecimal(pDst,pSrc)
|
||
|
*
|
||
|
* ARGUMENT
|
||
|
* DEC *pDst;
|
||
|
* DEC *pSrc;
|
||
|
*
|
||
|
* DESCRIPTION
|
||
|
* Sets pDst = the arctangent (in radians) of pSrc,
|
||
|
* which always lies between -pi/2 and pi/2.
|
||
|
*
|
||
|
* RETURNS
|
||
|
* Returns pointer to pDst if successful, otherwise a GM_NULL.
|
||
|
*
|
||
|
* POSSIBLE ERROR CODES
|
||
|
*
|
||
|
* GM_NULLPOINTER
|
||
|
* GM_NOMEMORY
|
||
|
*
|
||
|
* AUTHOR
|
||
|
* Jared Levy Aug 7, 1987
|
||
|
* Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved.
|
||
|
*
|
||
|
* MODIFICATIONS
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#include <stdio.h>
|
||
|
#include "gm.h"
|
||
|
#include "gmsystem.h"
|
||
|
|
||
|
DEC *ArcTangentDecimal(pDst,pSrc)
|
||
|
DEC *pDst;
|
||
|
DEC *pSrc;
|
||
|
{
|
||
|
|
||
|
_MacStart(GM_DATAN);
|
||
|
|
||
|
_MacInVar(pSrc,GM_NULL);
|
||
|
_MacOutVar(pDst,GM_NULL);
|
||
|
|
||
|
_ATanDec80Bit(pDst, pSrc);
|
||
|
|
||
|
/* reduce from 80-bit back to 64-bit */
|
||
|
(void) _Sq5UnsTo4Uns(pDst);
|
||
|
|
||
|
_MacRet(pDst);
|
||
|
}
|