libcg / bfp

Beyond Floating Point - Posit C/C++ implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Convert from and to float

libcg opened this issue · comments

That would be a nice first step.

  • convert from float
  • convert from double
  • convert to float
  • convert to double
  • support subnormals

Conversion to int, float, double and string are implemented with d2e3b98. It's a naive implementation that uses the math library. Eventually we'll need a more efficient implementation that is also more precise.

Integer conversion dropped with ccac566. It will be easier to cast from float.

Conversion from float and double implemented with 4a47f74. Subnormals and rounding not supported yet.

I'm reworking the conversion to float and double so that I only use bit operations.

Denormals packing and unpacking should be working with 03182c1. Closing.