stan-dev / stan-dev/math

Possible incorrect argument used in test of inc_beta_ddb

Open
#2,417 32 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
839
Forks
220
Avg merge
2d 4h
Merged PRs (30d)
14

Description

I think an incorrect argument is being passed to the function calls inc_beta_ddb_test:

https://github.com/stan-dev/math/blob/de404ccc3fd18a0ed3f12299b8698539098451bb/test/unit/math/prim/fun/inc_beta_ddb_test.cpp#L18-L21

Shouldn't the fourth argument be digamma(small_b) instead of digamma(small_a) (and similarly to the other tests)?

Obviously this does not mean anything for the function itself, but it makes it difficult to check independently what the expected value should have been.

Apologies if I misunderstood something :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in test/unit/math/prim/fun/inc_beta_ddb_test.cpp at lines 18–21 and review the inc_beta_ddb_test calls, including the analogous cases. Confirm whether the fourth argument should use digamma(small_b) rather than digamma(small_a), then update the incorrect test arguments so the expected values can be checked independently.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.