Commit 6248e398 authored by leongs's avatar leongs

Fix bug of p32_div (1/10=0.125) problem.

parent 72c12dbf
......@@ -108,7 +108,7 @@ posit32_t p32_div( posit32_t pA, posit32_t pB )
}
expA = tmp>>29; //to get 2 bits
fracA = ((tmp<<1) | 0x40000000) & 0x7FFFFFFF;
frac64A = fracA << 30;
frac64A = (uint64_t)fracA << 30;
tmp = (uiB<<2)&0xFFFFFFFF;
if (regSB){
......
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