-
Notifications
You must be signed in to change notification settings - Fork 104
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 newlib cbrtf #177
Add newlib cbrtf #177
Conversation
I honestly don't know why it failed. And I need some review! |
Thanks for the PR! I have the same questions as #169 for this though. Why is this change being made relative to what's currently already implemented? |
This implementation does not use |
Ok that makes sense to me, although does Rust run on any architectures that are like that? (are there examples today of platforms that would benefit?) Review-wise there's no need to keep the musl code around, we only need one implementation of this function in-tree. If the purpose here as well is to avoid |
I don't understand what you mean. This PR doesn't have any relations |
Ok. I rebased on master and add your commit in #169. |
@lzutao I'm sorry, what I meant was that we only want one implementation in the tree, we don't want to have a musl module or a newlib module. The benchmark suite is to give a rough estimate, ideally this should be tested on hardware. |
@Schultzer Do you know what wrong with this PR? |
The errors here are properly expected, I think the system on the ci uses musl and, as far as I know given the different implementation in newlib, we properly want to test this function against newlib or, increase the ULP for this case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this passes an exhaustive check against musl (testing all f32 bit patterns), and the benchmarks say this is faster. I see no reasons against making this change.
I don't expect the ported newlib functions could be faster than old one. The reason |
@lzutao so will this be a performance regression on systems that do have support for double precision floats ? |
At least in x86_64, it doesn't have regression:
Master:
|
It looks like this doesn't change the performance, so is this still necessary? |
It should be tested on different platform, especially on embedded. With/without f32/f64 FPU. |
Seems like we don't agree the merge this. Closing then. |
Ported from https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=newlib/libm/common/sf_cbrt.c;hb=HEAD
Block on #173
Closes #134