Lombiq / Hastlayer-SDK

Turning .NET software into FPGA hardware for faster execution and lower power usage.

Home Page:https://hastlayer.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Posit floating point support (HAST-136)

Piedone opened this issue · comments

Posit is a floating point number type that's better than the usual IEEE floats but can be easily used as a drop-in replacement still. Let's see this instead of Unum.

See the sources below here: https://github.com/libcg/bfp

Let's create a generally usable .NET library which is transformable with Hastlayer.

Posit work ongoing in this repo, on this branch: https://github.com/Lombiq/Arithmetics/tree/issue/HAST-136

I don't think it's worth the efforts at this point.
Feels like a rabbit hole: exciting, but maybe less critical from the POV of product adoption rates. Most of the now-realistic scenarios could be managed using basic fixed-point math.

Since it's also a good thorough test of Hastlayer itself we've mostly completed it (the results including a lot of bugs fixed in Hastlayer, and support for method inlining added).

Nevertheless fixed-point will indeed be the most efficient choice every time (with floating point only to be used if you specifically need floating point, not just the ability to use fractions) and apart from handling this with integers you can also do this with the built-in Fix64 type.