-
-
Notifications
You must be signed in to change notification settings - Fork 804
[BUG]: C implementation for stats/base/dists/kumaraswamy/median
has different results than the JavaScript implementation
#5047
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
Comments
stats/base/dists/kumaraswamy/median
has different results than the JavaScript implementationstats/base/dists/kumaraswamy/median
has different results than the JavaScript implementation
@Neerajpathak07, do you want to proceed with a PR targeting this issue? |
There were a lot of issues with the PR adding the C implementation which were missed during code review. See fc5df17. Someone should take a close look at that package to determine whether everything is correct. |
Also, the tests in |
I will take a detailed look and update this issue. If it turns out to be a major change, I will likely create a PR to address it. |
Ig @yuvi-mittal has started working upon it after I pointed out what was wrong. |
I have already started working on it , and i have been checking rest of the distributions too , there are few test cases more that are failing , will raise a PR soon. |
@yuvi-mittal Any updates on this :) |
@anandkaranubc , hey i have been swamped with some college work ,i will get it done before eow. |
No rush! Just wanted to check in to see if you needed any help. Good luck with your work! |
i changed the return statement and all test cases got passed so wanted to making a pr on it @anandkaranubc can i still pr on it |
Hey @Krishna-Sharma-g, thanks for working on this and getting all test cases to pass! @yuvi-mittal, just checking in—are you still working on this? If not, he can open a PR. |
okay @anandkaranubc |
@Krishna-Sharma-g , You can open a PR , no worries . The goal is to get work done as fast as possible. |
@Krishna-Sharma-g, when creating a PR, please also consider the points mentioned by Athan in the discussions here and here. Here is a reference PR to confirm whether you are on the right track: #3354 |
hello @anandkaranubc as mentioned by @kgryte that test.native.js not fully matches the test.js so there are the mismatched things in it 1.there is incorrectly named test that was referring to "gamma" instead of "a" by completely replacing it with the proper test for 3.Added the missing test for nonpositive "b" parameter, copying the test cases from test.js. 4.Ensured all edge cases are properly tested with the same combinations of parameter values as in test.js. please tell me that is that what @kgryte is talking about |
Awesome! As long as Feel free to submit a PR addressing all of this, and then I believe @Neerajpathak07 and @yuvi-mittal can also join the discussion. |
Description
Pointed out by @Neerajpathak07 and @yuvi-mittal
For context, see comment
When running native tests for
stats/base/dists/kumaraswamy/median
, the majority of tests fail because the C implementation is generalized for a single value ofa = 1.0
rather than any positive number.The fix is to change
stdlib/lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/median/src/main.c
Line 42 in 367ec2c
to:
Related Issues
None
Questions
No.
Demo
No response
Reproduction
Expected Results
Actual Results
Version
No response
Environments
N/A
Browser Version
No response
Node.js / npm Version
No response
Platform
No response
Checklist
The text was updated successfully, but these errors were encountered: