Metropoli BBS
VIEWER: precisn.c MODE: TEXT (ASCII)
/*Copyright (C) 1996 by Thomas Glen Smith.  All Rights Reserved.*/
/* precisn APL2 V1.0.0 **************************************************
* Called from formatx.                                                  *
* Returns respectively in and array of two ints, the places to the left *
* and right of the decimal point in the double argument.                *
***********************************************************************/
#define INCLUDES 0
#include "includes.h"
void precisn(val, ret)
double val;	/* Value to evaluate. */
int *ret;		/* *(ret+0) == digits left, *(ret+1) == places right. */
{
	Digits; Places;
	extern double pp;
	int digs;

	*ret = digs = digits(val);
	*(ret+1) = places(val,digs,pp);
}
[ RETURN TO DIRECTORY ]