compare exponent directly for determining NaN

This commit is contained in:
Jeff Wang 2019-05-01 01:40:23 -04:00
parent 58a162fe4d
commit 60ed369c47

View File

@ -357,11 +357,7 @@ static uint8_t decn_is_zero(const dec80* x){
uint8_t decn_is_nan(const dec80* x){
uint8_t i;
#ifdef EXP16
if ((x->exponent & 0x7fff) != DEC80_NAN_EXP){
#else
if ((x->exponent & 0x7f) != DEC80_NAN_EXP){
#endif
if (x->exponent != DEC80_NAN_EXP){
return 0;
}
for (i = 0; i < DEC80_NUM_LSU; i++){