10 |
|
|
11 |
|
#include <stdio.h> |
12 |
|
|
13 |
+ |
#ifndef frexp |
14 |
+ |
extern double frexp(); |
15 |
+ |
#endif |
16 |
+ |
#ifndef ldexp |
17 |
+ |
extern double ldexp(); |
18 |
+ |
#endif |
19 |
|
|
20 |
+ |
|
21 |
|
putstr(s, fp) /* write null-terminated string to fp */ |
22 |
|
register char *s; |
23 |
|
register FILE *fp; |
42 |
|
double f; |
43 |
|
FILE *fp; |
44 |
|
{ |
38 |
– |
extern double frexp(); |
45 |
|
int e; |
46 |
|
|
47 |
|
putint((long)(frexp(f,&e)*0x7fffffff), 4, fp); |
91 |
|
getflt(fp) /* get a floating point number */ |
92 |
|
FILE *fp; |
93 |
|
{ |
88 |
– |
extern double ldexp(); |
94 |
|
double d; |
95 |
|
|
96 |
|
d = (double)getint(4, fp)/0x7fffffff; |