Skip to content

Improve Complex{BigFloat} loggamma - #575

Open
TSGut wants to merge 1 commit into
JuliaMath:masterfrom
TSGut:master
Open

TSGut wants to merge 1 commit into
JuliaMath:masterfrom
TSGut:master

Conversation

@TSGut

@TSGut TSGut commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

This improves the accuracy and performance of the Complex{BigFloat} variant of loggamma that I added earlier this year in line with improvements I recently made over in Gamma.jl. The relevant PR there contains some more info: JuliaMath/Gamma.jl#23

In brief, roughly 6% of bits of precision were lost with the current implementation at very high precisions and along with fixing that the performance also got an upgrade:

loggamma(::Complex{BigFloat}), z ∈ {0.625+0.375i, −2.75+1.5i, 3+40i, 0.5+300i}

precision this PR SpecialFunctions (current)
128 0 · 91 µs 0 · 187 µs
256 0 · 181 µs 0 · 490 µs
512 0 · 383 µs 35 bits · 1.6 ms
1024 0 · 1.1 ms 89 bits · 7.0 ms
2048 0 · 1.8 ms 163 bits · 36 ms

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.87%. Comparing base (3feec01) to head (0df939a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #575   +/-   ##
=======================================
  Coverage   94.86%   94.87%           
=======================================
  Files          14       14           
  Lines        3000     3004    +4     
=======================================
+ Hits         2846     2850    +4     
  Misses        154      154           
Flag Coverage Δ
unittests 94.87% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@TSGut

TSGut commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

I'm not sure why that test failed, seems like a run fail rather than code related to me.

@andreasnoack

Copy link
Copy Markdown
Member

I'm not sure why that test failed

See JuliaStats/Distributions.jl#2110

@devmotion

Copy link
Copy Markdown
Member

I opened #576

@TSGut

TSGut commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Looks like that was merged could you retrigger the tests on this PR? Pretty sure they're good.

@TSGut

TSGut commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Cheers. Happy for this to be reviewed as a candidate to be merged. It only touches the complex bigfloat gamma that I added earlier this year so it shouldn't step on anyone's toes. :)

This branch has not been deployed

No deployments
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.

3 participants