adapted for changed floating point package

This commit is contained in:
ceriel
1989-07-31 14:54:53 +00:00
parent ed19a3d568
commit d12053873a
5 changed files with 22 additions and 34 deletions

View File

@@ -1,26 +1,13 @@
/* unfortunately, we cannot just do an atof and convert result to float
is neccessary, because that might result in over/underflow at an
if neccessary, because that might result in over/underflow at an
unexpected moment. For the time being, overflow in floating point
constants goes undetected
*/
con_float(argval, str, res)
#include <con_float>
con_float(str, argval, res)
char *str, *res;
{
double f;
double atof();
int i;
double frexp(), ldexp();
int j;
float fl;
char *p;
f = atof(str);
if (f == 0 || argval == 8) {
p = (char *) &f;
while (argval--) *res++ = *p++;
return;
}
fl = f;
p = (char *) &fl;
while (argval--) *res++ = *p++;
float_cst(str, argval, res);
}