codethesaur.us
codethesaur.us copied to clipboard
Number types are not useful for all languages
Expected Behavior
Add data types for Javascript (and derivatives) with 56 bit floats
Actual Behavior
No relevant category to match against.
Specifications
We chatted about this on my Twitch stream, but I'll write out a little bit, and it's described a bit in https://docs.codethesaur.us/thesaurus/ .
To add new types to the thesaurus, you'll need to go into _meta/data_types.json
and add the new types within the right categories section, then implement the section in the spot below it. Try to maintain similar formatting to what's already there, and keep them in some sort of logical order. PR those changes on their own. I'll get an email with the PR to review.
After that, you can then implement the same part in the language itself (in your case, JavaScript). Since you'd add in JS, just make one PR for the whole thing.
And thanks for taking this on! I'd love it if you added a comment onto issue #87 as it sounds like what you're trying to do anyway and I can let you claim it as yours!
As far as I can tell all standardized versions of Javascript use 64bit IEEE 754 double precision floating points for Number
s so I don't think we need this specific variant.
I wonder if @salmonmoose's original thought was that 64-bit floats have 56 bits of coefficient and 8 bits of exponent?