-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
Add templates for ieee754 types #301
base: master
Are you sure you want to change the base?
Conversation
Some progress notes:
|
I am aware this is just a draft but there are some details that may have been overlooked. This post is only to attract attention to those details.
Yes there is. Check for example the tests for the tiff format. There are a lot more issues(eg inf,nan) but seeing that this is untested draft they may be addressed as work continues. |
Thought it would be better to kick things off as a draft PR, than for me to forget entirely
Started writing these with the initial intention to only display, but started experimenting with transform in ieee754_binary to try to improve their usability as a numeric type. Wouldn't be surprised if things like inf / nan weren't translated well with that change. Also, only very minor optimizations were done (primarily the bit shifts and some ternaries), to try to keep things readable while decoding the IEEE standard |
Thanks a lot! Would love to have these merged if everything's ready |
* Remove unseal, and make default not sealed * Merge namespace
Adds binary floating point and decimal (both binary and decimal encoding) floating point types specified by IEEE 754 2019
Designed as templates, to allow various parameters to be modified (exponent bit length, significand bit length, exponent bias), enabling the creation of types that may not be explicitly defined but are otherwise compatible