-
-
Notifications
You must be signed in to change notification settings - Fork 848
Closed
Labels
BugSomething isn't working.Something isn't working.MathIssue or pull request specific to math functionality.Issue or pull request specific to math functionality.Numerical AccuracyIssue or pull request concerns numerical accuracy.Issue or pull request concerns numerical accuracy.StatisticsIssue or pull request related to statistical functionality.Issue or pull request related to statistical functionality.
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
return 1.0 - stdlib_base_pow( 0.5, 1.0 / b ); |
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.
Metadata
Metadata
Assignees
Labels
BugSomething isn't working.Something isn't working.MathIssue or pull request specific to math functionality.Issue or pull request specific to math functionality.Numerical AccuracyIssue or pull request concerns numerical accuracy.Issue or pull request concerns numerical accuracy.StatisticsIssue or pull request related to statistical functionality.Issue or pull request related to statistical functionality.