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

implement significand in native Julia #10176

Merged
merged 1 commit into from Mar 12, 2015

Conversation

simonbyrne
Copy link
Contributor

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) to x==0: LLVM now optimises these away (see #9030); this change is purely for notational convenience)

@kmsquire
Copy link
Member

Any reason not to also add a version for Float16?

@simonbyrne
Copy link
Contributor Author

@kmsquire No, only because we didn't have them before. Now done.

@quinnj
Copy link
Member

quinnj commented Feb 13, 2015

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.

@jiahao
Copy link
Member

jiahao commented Feb 19, 2015

bump

+1

@simonbyrne
Copy link
Contributor Author

Updated.

@ViralBShah
Copy link
Member

Should we be adding more tests to ensure full coverage - especially since we have our own implementation (even though it is pretty simple)?

@simonbyrne
Copy link
Contributor Author

Probably, I'll see what I can do.

@simonbyrne
Copy link
Contributor Author

I got a bit carried away, and implemented general methods for significand, exponent and frexp across the different types. I also added some more tests.

@StefanKarpinski
Copy link
Sponsor Member

wow! very cool. feel free to merge whenever you feel confident that this is correct and passing tests.

@quinnj
Copy link
Member

quinnj commented Mar 11, 2015

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.

@simonbyrne simonbyrne force-pushed the significand branch 3 times, most recently from ba81b2d to 80e63c9 Compare March 11, 2015 16:19
@simonbyrne
Copy link
Contributor Author

I can't get the osx build to pass, but this doesn't seem to be related.

simonbyrne added a commit that referenced this pull request Mar 12, 2015
implement significand, exponent and frexp in native Julia
@simonbyrne simonbyrne merged commit 7e8b10c into JuliaLang:master Mar 12, 2015
@simonbyrne simonbyrne deleted the significand branch March 12, 2015 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants