191,7 → 191,7 |
float64 divFloat64(float64 a, float64 b) |
{ |
float64 result; |
__s32 aexp, bexp, cexp; |
__s64 aexp, bexp, cexp; |
__u64 afrac, bfrac, cfrac; |
__u64 remlo, remhi; |
|
198,6 → 198,12 |
result.parts.sign = a.parts.sign ^ b.parts.sign; |
|
if (isFloat64NaN(a)) { |
|
if (isFloat64SigNaN(b)) { |
/*FIXME: SigNaN*/ |
return b; |
} |
|
if (isFloat64SigNaN(a)) { |
/*FIXME: SigNaN*/ |
} |
214,7 → 220,7 |
} |
|
if (isFloat64Infinity(a)) { |
if (isFloat64Infinity(b)) { |
if (isFloat64Infinity(b) || isFloat64Zero(b)) { |
/*FIXME: inf / inf */ |
result.binary = FLOAT64_NAN; |
return result; |
265,7 → 271,7 |
} |
/* normalize it*/ |
|
afrac <<= 1; |
aexp++; |
/* afrac is nonzero => it must stop */ |
while (! (afrac & FLOAT64_HIDDEN_BIT_MASK) ) { |
afrac <<= 1; |
274,7 → 280,7 |
} |
|
if (bexp == 0) { |
bfrac <<= 1; |
bexp++; |
/* bfrac is nonzero => it must stop */ |
while (! (bfrac & FLOAT64_HIDDEN_BIT_MASK) ) { |
bfrac <<= 1; |