-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
implement significand in native Julia #10176
Conversation
Any reason not to also add a version for Float16? |
732a334
to
75b22e2
Compare
@kmsquire No, only because we didn't have them before. Now done. |
75b22e2
to
e45ed0a
Compare
This is great to have for the grisu code as well. We currently promote Float16s up because there wasn't a significand defined. I'll have to dig back into that code soon and do another pass. |
bump +1 |
Updated. |
Should we be adding more tests to ensure full coverage - especially since we have our own implementation (even though it is pretty simple)? |
Probably, I'll see what I can do. |
I got a bit carried away, and implemented general methods for |
wow! very cool. feel free to merge whenever you feel confident that this is correct and passing tests. |
Awesome work as usual @simonbyrne. With all three defined for our float types, I can probably cut about 250 lines out of the grisu code. I'll have to do another pass to work that out once this gets merged. |
ba81b2d
to
80e63c9
Compare
I can't get the osx build to pass, but this doesn't seem to be related. |
…tent functions across all types.
implement significand, exponent and frexp in native Julia
significand
utilised non-standard libm functions, which will be removed from the next release of Openlibm (JuliaMath/openlibm#85). This implements them in native Julia.(I also changed some comparisons from
x==zero(x)
tox==0
: LLVM now optimises these away (see #9030); this change is purely for notational convenience)