libcg / bfp

Beyond Floating Point - Posit C/C++ implementation
MIT License
289 stars 25 forks source link

Add a way to extend and shrink posits #3

Closed libcg closed 5 years ago

libcg commented 7 years ago

It would be nice to be able to convert a {nbits=32, es=2} posit to {nbits=5, es=1}, for example.

libcg commented 7 years ago

Changing nbits should be trivial since it only requires bit shifting. Haven't considered es yet.

libcg commented 5 years ago

This is possible since commit a394dbe4, using pack/unpack.