/*
 * 5799-WZQ (C) COPYRIGHT = NONE
 * LICENSED MATERIALS - PROPERTY OF IBM
 */
/* $Header:EXPO.c 12.0$ */
/* $ACIS:EXPO.c 12.0$ */
/* $Source: /ibm/acis/usr/src/usr.lib/libpc/RCS/EXPO.c,v $ */

#ifndef lint
static char *rcsid = "$Header:EXPO.c 12.0$";
#endif

/* Copyright (c) 1979 Regents of the University of California */

static char sccsid[] = "@(#)EXPO.c 1.2 3/7/81";

long
EXPO(value)

	double	value;
{
	register int retval;
	register char *cp;
	char sign, buf[30];
	extern char *index();

	if (value == 0.0)
		return 0;
	sprintf(buf, "%.1e", value);
	cp = index(buf, 'e') + 1;
	sign = *cp++;
	retval = 0;
	while (*cp)
		retval = retval * 10 + *cp++ - '0';
	return sign == '-' ? -retval : retval;
}
