Skip to content

Optimize loggamma(::Union{Float32,Float64}) and simplify code slightly#9

Open
oscardssmith wants to merge 2 commits intomainfrom
os/optimize-real-and-simplify
Open

Optimize loggamma(::Union{Float32,Float64}) and simplify code slightly#9
oscardssmith wants to merge 2 commits intomainfrom
os/optimize-real-and-simplify

Conversation

@oscardssmith
Copy link
Copy Markdown
Member

Replaces a few uses of _loggamma with _loggamma_unsafe_pos when we know that the argument is greater than 0, optimizes the stirling coeficients for real numbers.

While I was at it, I also cleaned up the Float32 coefficients to make them less long (we had way more digits than necessary)

@oscardssmith oscardssmith requested a review from TSGut April 18, 2026 03:23
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (fcf2692) to head (7d7b075).

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #9   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          303       299    -4     
=========================================
- Hits           303       299    -4     

☔ 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.

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.

1 participant