Skip to content

Fixes for Gamma.incompleteUpper#196

Merged
bvenn merged 2 commits intofslaborg:developerfrom
soerenhm:upper-gamma-patch
Apr 26, 2022
Merged

Fixes for Gamma.incompleteUpper#196
bvenn merged 2 commits intofslaborg:developerfrom
soerenhm:upper-gamma-patch

Conversation

@soerenhm
Copy link
Copy Markdown
Contributor

Please reference the issue(s) this PR is related to

The problem is described here

Fixes #195

Please list the changes introduced in this PR

  • When x is 0, upperGamma should output 1
  • When x is inf, upperGamma should output 0
  • When a >= ASWITCH, the output (call it y) was identical to that of lowerIncomplete; it should've instead be 1 - y
  • Test called "test_gammaincupperinf" now checks that upperGamma evaluates to 0 when the second argument is infinite (before the test wrongly asserted this result should be 1).

[Required] please make sure you checked that

  • The project builds without problems on your machine

[Optional]
I didn't add any new tests besides fixing the one mentioned above, but I checked that the results of upperGamma agree with an implementation in another language.

@bvenn
Copy link
Copy Markdown
Member

bvenn commented Apr 26, 2022

see #195 for details

@bvenn bvenn merged commit d297749 into fslaborg:developer Apr 26, 2022
@soerenhm soerenhm deleted the upper-gamma-patch branch April 26, 2022 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] wrong output from incomplete upper gamma function

2 participants