Skip to content

Conversation

@mschauer
Copy link
Member

The documentation for stirlings1 and stirlings2 indicates that they can use BigInts if provided with such as argument. However the existing functions specify n and k arguments to be Int. This patch allows support for BigInt integers without breaking type consistency of return types, and also provides for some memoization, since otherwise the functions, since they are recursive, can be slow when handling very large integers. (@wherrera10 in #84)

> The documentation for stirlings1 and stirlings2 indicates that they can use BigInts if provided with such as argument. However the existing functions specify n and k arguments to be Int. This patch allows support for BigInt integers without breaking type consistency of return types, and also provides for some memoization, since otherwise the functions, since they are recursive, can be slow when handling very large integers.

(credit https://github.com/wherrera10)
@codecov
Copy link

codecov bot commented Nov 11, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.25%. Comparing base (e005ee0) to head (1edd903).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #126      +/-   ##
==========================================
+ Coverage   97.22%   97.25%   +0.02%     
==========================================
  Files           8        8              
  Lines         829      837       +8     
==========================================
+ Hits          806      814       +8     
  Misses         23       23              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mschauer mschauer mentioned this pull request Nov 11, 2022
@inkydragon inkydragon changed the title Reviving #84 Expand stirlings1 and stirlings2 to accept Integer May 10, 2025
@oameye
Copy link

oameye commented Jun 1, 2025

can this be closed due to #193?

@inkydragon inkydragon closed this Jun 7, 2025
@inkydragon inkydragon deleted the mschauer-stirling branch November 20, 2025 13:06
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.

4 participants