do not call frexp with 0.0; the SUN4 cannot stand it

This commit is contained in:
ceriel
1988-04-20 10:01:35 +00:00
parent 865e5b607a
commit 06c28ad222
7 changed files with 128 additions and 59 deletions

View File

@@ -92,16 +92,16 @@ con_float() {
fprintf(codefile,",0%o", *p++ & 0377);
}
#else OWNFLOAT
f = frexp(f, &i);
if (f < 0) {
f = -f;
sign = 1;
}
if (f == 0) {
if (argval == 8) fprintf(codefile, ".data2 0, 0\n");
fprintf(codefile, ".data2 0, 0\n");
return;
}
f = frexp(f, &i);
if (f < 0) {
f = -f;
sign = 1;
}
while (f < 0.5) {
f += f;
i --;