Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating point lassen implementations seems to be wrong endianness. #84

Closed
rdaly525 opened this issue May 21, 2019 · 2 comments
Closed
Assignees

Comments

@rdaly525
Copy link
Contributor

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.

@rdaly525
Copy link
Contributor Author

@cdonovick, can you confirm that the test_get_mant (in test_pe.py) is a valid test?

@cdonovick
Copy link
Contributor

cdonovick commented May 21, 2019

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants