Skip to content

fix common parameter cancelation - #101

Merged
MikaelSlevinsky merged 3 commits into
masterfrom
feat-fix-common-parameter-cancelation
Jul 29, 2026
Merged

fix common parameter cancelation#101
MikaelSlevinsky merged 3 commits into
masterfrom
feat-fix-common-parameter-cancelation

Conversation

@MikaelSlevinsky

@MikaelSlevinsky MikaelSlevinsky commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

add terminating check
add generalized euler transformation (in conformal rational approximation)

Before, with @TSGut 's common parameter cancelation:

julia> using HypergeometricFunctions, BenchmarkTools

julia> α = (3,4,5)
(3, 4, 5)

julia> β = (2,6,7)
(2, 6, 7)

julia> z = 0.123
0.123

julia> @time pFq(α, β, z)
  0.253318 seconds (363.21 k allocations: 22.849 MiB, 10.90% gc time, 99.98% compilation time)
1.091834662493663

julia> @btime pFq($α, $β, $z)
  1.605 μs (25 allocations: 624 bytes)
1.091834662493663

julia> α = (1,1,1,1,1,3,4,5)
(1, 1, 1, 1, 1, 3, 4, 5)

julia> β = (1,1,1,1,1,2,6,7)
(1, 1, 1, 1, 1, 2, 6, 7)

julia> @btime pFq($α, $β, $z)
  3.035 μs (50 allocations: 1.22 KiB)
1.091834662493663

After this PR, performance is somewhat restored:

julia> using HypergeometricFunctions, BenchmarkTools

julia> α = (3,4,5)
(3, 4, 5)

julia> β = (2,6,7)
(2, 6, 7)

julia> z = 0.123
0.123

julia> @time pFq(α, β, z)
  0.463688 seconds (1.07 M allocations: 68.306 MiB, 5.75% gc time, 99.99% compilation time)
1.091834662493663

julia> @btime pFq($α, $β, $z)
  76.297 ns (0 allocations: 0 bytes)
1.091834662493663

julia> α = (1,1,1,1,1,3,4,5)
(1, 1, 1, 1, 1, 3, 4, 5)

julia> β = (1,1,1,1,1,2,6,7)
(1, 1, 1, 1, 1, 2, 6, 7)

julia> @btime pFq($α, $β, $z)
  317.771 ns (32 allocations: 1.19 KiB)
1.091834662493663

add terminating check
add generalized euler transformation (in conformal rational approximation)
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 44.44444% with 105 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.61%. Comparing base (958bae6) to head (6a76550).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/conformal.jl 0.00% 96 Missing ⚠️
src/specialfunctions.jl 86.88% 8 Missing ⚠️
src/generalized.jl 96.42% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #101      +/-   ##
==========================================
- Coverage   87.30%   80.61%   -6.69%     
==========================================
  Files           8        8              
  Lines        1796     1945     +149     
==========================================
  Hits         1568     1568              
- Misses        228      377     +149     

☔ 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 Jul 29, 2026

Copy link
Copy Markdown
Contributor

Nice way around the tuple instability!

@MikaelSlevinsky
MikaelSlevinsky merged commit 9a40a7a into master Jul 29, 2026
15 checks passed
@MikaelSlevinsky
MikaelSlevinsky deleted the feat-fix-common-parameter-cancelation branch July 29, 2026 17: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.

2 participants