Commit 89f651fa by Thomas Daede

Clamp large exponents in float32_unpack.

parent 018ca26d
......@@ -62,7 +62,15 @@ float _float32_unpack(long val){
int sign=val&0x80000000;
long exp =(val&0x7fe00000L)>>VQ_FMAN;
if(sign)mant= -mant;
return(ldexp(mant,exp-(VQ_FMAN-1)-VQ_FEXP_BIAS));
exp=exp-(VQ_FMAN-1)-VQ_FEXP_BIAS;
/* clamp excessive exponent values */
if (exp>63){
exp=63;
}
if (exp<-63){
exp-63;
}
return(ldexp(mant,exp));
}
/* given a list of word lengths, generate a list of codewords. Works
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment