Decompression implementation. \param arg number to decompress \param exp address to store exponent at \return normalized significant
| 1686 | /// \param exp address to store exponent at |
| 1687 | /// \return normalized significant |
| 1688 | static half frexp(half arg, int *exp) |
| 1689 | { |
| 1690 | int m = arg.data_ & 0x7FFF, e = -14; |
| 1691 | if(m >= 0x7C00 || !m) |
| 1692 | return *exp = 0, arg; |
| 1693 | for(; m<0x400; m<<=1,--e) ; |
| 1694 | return *exp = e+(m>>10), half(binary, (arg.data_&0x8000)|0x3800|(m&0x3FF)); |
| 1695 | } |
| 1696 | |
| 1697 | /// Decompression implementation. |
| 1698 | /// \param arg number to decompress |