Floating point lassen implementations seems to be wrong endianness.
Closed this issue · 2 comments
Floating point numbers should have their fractional bits as their lsbs, and their sign bit as the msb.
@nikhilbhagdikarI I suspect you have done the opposite in your lassen implementation for most of the fp ops.
I have a branch called 'float-test' that contains your floating point changes along with some more parameterized tests.
on this branch, you can run:
>pytest -k get_mant
and you will see an assertion error.
@cdonovick, can you confirm that the test_get_mant (in test_pe.py) is a valid test?
@rdaly It looks like you are defining bfloat incorrectly. It should be FPVector[8, 7, ...]
. I'm also not sure how you are constructing from the fpdata tuple. I'm also not sure how it is being cast from FPVector to Bitvector. FGetMant looks correct to me.
Caveat I am trying to do this review on my phone while waiting in the security line at the airport so I might have missed something.
https://en.m.wikipedia.org/wiki/Bfloat16_floating-point_format