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

Use IrrationalConstants and LogExpFunctions.log1mexp #345

Merged
merged 9 commits into from
Sep 23, 2021

Conversation

devmotion
Copy link
Member

This PR uses IrrationalConstants, which is already an indirect dependency of SpecialFunctions through LogExpFunctions 0.3, for values such as sqrt(pi) or pi/2 and removes the definition of log1mexp in favour of LogExpFunctions.log1mexp.

Moreover, I noticed three occurrences of log(1-...) and replaced them with log1p(-...).

src/beta_inc.jl Outdated Show resolved Hide resolved
src/SpecialFunctions.jl Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 21, 2021

Codecov Report

Merging #345 (5963cf1) into master (d4f6d7e) will decrease coverage by 0.45%.
The diff coverage is 88.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #345      +/-   ##
==========================================
- Coverage   92.90%   92.45%   -0.46%     
==========================================
  Files          12       12              
  Lines        2722     2717       -5     
==========================================
- Hits         2529     2512      -17     
- Misses        193      205      +12     
Flag Coverage Δ
unittests 92.45% <88.46%> (-0.46%) ⬇️

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

Impacted Files Coverage Δ
src/SpecialFunctions.jl 100.00% <ø> (ø)
src/gamma_inc.jl 92.62% <66.66%> (ø)
src/gamma.jl 94.55% <80.00%> (-0.03%) ⬇️
src/beta_inc.jl 89.77% <100.00%> (-1.81%) ⬇️
src/betanc.jl 90.19% <100.00%> (ø)
src/ellip.jl 100.00% <100.00%> (ø)
src/erf.jl 97.95% <100.00%> (-0.05%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d4f6d7e...5963cf1. Read the comment docs.

@stevengj
Copy link
Member

(Aren't a bunch of these constants also used in chainrules.jl?)

@stevengj stevengj merged commit 1b7a377 into JuliaMath:master Sep 23, 2021
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