Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fermi Dirac fix #8

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

DanielHolleufer
Copy link
Contributor

Made a change such that FermiDiracIntegral(j, x) now agrees with https://npplus.readthedocs.io/en/latest/fermi.html and https://github.com/scott-maddox/fdint when j = -1/2 and x > 2.

Also improved performance. Comparison using BenchmarkTools.jl
Before:

@benchmark FewSpecialFunctions.FermiDiracIntegral(-1 / 2, 1.2)
BenchmarkTools.Trial: 10000 samples with 961 evaluations.
 Range (min … max):   87.409 ns …  27.228 μs  ┊ GC (min … max):  0.00% … 99.21%
 Time  (median):     104.162 ns               ┊ GC (median):     0.00%
 Time  (mean ± σ):   148.603 ns ± 311.127 ns  ┊ GC (mean ± σ):  10.69% ±  9.14%

After:

@benchmark FewSpecialFunctions.FermiDiracIntegral(-1 / 2, 1.2)
BenchmarkTools.Trial: 10000 samples with 1000 evaluations.
 Range (min … max):  0.900 ns … 7.800 ns  ┊ GC (min … max): 0.00% … 0.00%
 Time  (median):     1.000 ns             ┊ GC (median):    0.00%
 Time  (mean ± σ):   1.047 ns ± 0.314 ns  ┊ GC (mean ± σ):  0.00% ± 0.00%

  ▅    █     ▃     ▁                                 ▃    ▁ ▁
  █▁▁▁▁█▁▁▁▁▁█▁▁▁▁▁█▁▁▁▁▇▁▁▁▁▁▆▁▁▁▁▁▃▁▁▁▁▅▁▁▁▁▁█▁▁▁▁▁█▁▁▁▁█ █
  0.9 ns      Histogram: log(frequency) by time      1.9 ns <

 Memory estimate: 0 bytes, allocs estimate: 0.

Also changed Manifest.toml to a newer version and changed support from Documter.jl v0.x.x to v1.x.x.

Copy link
Owner

@MartinMikkelsen MartinMikkelsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice changes, thank you for your contribution!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good changes, looks good

@MartinMikkelsen MartinMikkelsen merged commit d0e37b1 into MartinMikkelsen:main Oct 15, 2024
1 of 2 checks passed
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