Skip to content

kernelBetainc incorrect documentation #302

@jackschmidt

Description

@jackschmidt

Checklist

Please ensure the following tasks are completed before filing a bug report.

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.

Description

Description of the issue.

The documentation and the source code disagree on the order of the boolean arguments to kernelBetainc.

docs last arguments are: regularized, upper

code last arguments are: invert, normalized
code documentation that invert means upper, and normalized means regularized

Additionally, the code for the case where storage is newly allocated drops the last argument.

The numerical cases code agrees with the main.js code and disagrees with the website documentation.

The non-kernel function is documented as regularized, upper.

The non-kernel function's code correctly reverses the arguments to match kernelBetainc's code. Additionally it statically allocates storage, so the bug in the "allocate new storage" is not seen.

The name "invert" for "upper" may also cause confusion with inverse distribution. "upper" and "regularized" seem like fine names to use consistently in both the documentation and the code.

Related Issues

Does this issue have any related issues?

I did not see any.

Questions

Any questions for reviewers?

No.

Other

Any other information relevant to this issue? This may include screenshots, references, stack traces, sample output, and/or implementation notes.

No

Demo

If relevant, provide a link to a live demo.

No.

Reproduction

What steps are required to reproduce the unexpected output?

out1=[0,0];
out1 = kernelBetainc( out1, 0.2, 1.0, 2.0, true, true );
out2 = kernelBetainc( 0.2, 1.0, 2.0, true, true );

Expected Results

What are the expected results?

out1 and out2 should be (exactly) equal.

Actual Results

What are the actual results?

Not equal (Equal, typo in my code, not yours!)

Environments

What environments are affected (e.g., Node v0.4.x, Chrome, IE 11)? If Node.js, include the npm version, operating system, and any other potentially relevant platform information.

all environments where the code can run

Metadata

Metadata

Assignees

Labels

BugSomething isn't working.DocumentationImprovements, additions, or changes to documentation.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions