Closed
Description
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 of a = 1.0
rather than any positive number.
The fix is to change
to:
return stdlib_base_pow( 1.0 - stdlib_base_pow( 2.0, -1.0 / b ), 1.0 / a );
Related Issues
None
Questions
No.
Demo
No response
Reproduction
- Run `make install-node-addons NODE_ADDONS_PATTERN="stats/base/dists/kumaraswamy/median"`
- Run `make test TESTS_FILTER=".*/stats/base/dists/kumaraswamy/median/test/test.native.js"`
Expected Results
total: 1009
passing: 1009
Actual Results
total: 1009
passing: 27
failing: 982
Version
No response
Environments
N/A
Browser Version
No response
Node.js / npm Version
No response
Platform
No response
Checklist
- Read and understood the Code of Conduct.Searched for existing issues and pull requests.
Activity
[-]C implementation for `stats/base/dists/kumaraswamy/median` has different results than the JavaScript implementation[/-][+][BUG]: C implementation for `stats/base/dists/kumaraswamy/median` has different results than the JavaScript implementation[/+]anandkaranubc commentedon Feb 3, 2025
@Neerajpathak07, do you want to proceed with a PR targeting this issue?
kgryte commentedon Feb 4, 2025
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.
cc @Planeshifter
kgryte commentedon Feb 4, 2025
Also, the tests in
test.native.js
still don't fully match what is intest.js
.anandkaranubc commentedon Feb 4, 2025
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.
Neerajpathak07 commentedon Feb 4, 2025
Ig @yuvi-mittal has started working upon it after I pointed out what was wrong.
yuvi-mittal commentedon Feb 4, 2025
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.
anandkaranubc commentedon Feb 17, 2025
@yuvi-mittal Any updates on this :)
yuvi-mittal commentedon Feb 17, 2025
@anandkaranubc , hey i have been swamped with some college work ,i will get it done before eow.
anandkaranubc commentedon Feb 17, 2025
No rush! Just wanted to check in to see if you needed any help. Good luck with your work!
Krishna-Sharma-g commentedon Feb 25, 2025
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
10 remaining items