Skip to content

[BUG]: C implementation for stats/base/dists/triangular/mgf has different results than the JavaScript implementation #4704

Closed
@kgryte

Description

@kgryte

Description

For context, see the commit message for c88e9f5.

In short, when testing the C implementation, we need to increase test tolerances by many orders of magnitude in order to get tests to pass. It would be great to figure out why and track down this bug. In my investigations, I was not able to ascertain the cause of the divergence.

Related Issues

None.

Questions

No.

Demo

No response

Reproduction

- Reduce the test tolerances for the native tests to the same as the JavaScript tests.
- Run `make install-node-addons NODE_ADDONS_PATTERN="stats/base/dists/triangular/mgf"`
- Run `make test TESTS_FILTER=".*/stats/base/dists/triangular/mgf/.*"`

Expected Results

I would expect that the JavaScript and C results would be approximately the same.

Actual Results

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

No one assigned

    Labels

    BugSomething isn't working.Help WantedExtra attention is needed.MathIssue or pull request specific to math functionality.Numerical AccuracyIssue or pull request concerns numerical accuracy.StatisticsIssue or pull request related to statistical functionality.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions