1: /* Copyright (c) 1979 Regents of the University of California */
2:
3: static char sccsid[] = "@(#)EXPO.c 1.2 3/7/81";
4:
5: long
6: EXPO(value)
7:
8: double value;
9: {
10: register int retval;
11: register char *cp;
12: char sign, buf[30];
13: extern char *index();
14:
15: if (value == 0.0)
16: return 0;
17: sprintf(buf, "%.1e", value);
18: cp = index(buf, 'e') + 1;
19: sign = *cp++;
20: retval = 0;
21: while (*cp)
22: retval = retval * 10 + *cp++ - '0';
23: return sign == '-' ? -retval : retval;
24: }
Defined functions
EXPO
defined in line
5; used 2 times
Defined variables
sccsid
defined in line
3;
never used