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

Generalized binomial coefficient #293

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

PaulXiCao
Copy link
Contributor

This is a pr wrt to issue #282 .
Binomial coefficient is generalized for real/complex arguments using the beta function.

@PaulXiCao
Copy link
Contributor Author

The make.jl documentation script throws tons of errors. Some are regarding the newly implemented function binomial.

Excerpts from the warnings:

$ cd docs && julia make.jl
...
 Warning: no docs found for 'SpecialFunctions.binomial' in `@docs` block in src/functions_list.md:7-73
...
┌ Warning: no doc found for reference '[`binomial`](@ref)' in src/functions_list.md.
└ @ Documenter.CrossReferences ~/.julia/packages/Documenter/FuXcO/src/CrossReferences.jl:160
...
┌ Warning: no doc found for reference '[`SpecialFunctions.binomial`](@ref)' in src/functions_overview.md.
└ @ Documenter.CrossReferences ~/.julia/packages/Documenter/FuXcO/src/CrossReferences.jl:160
...
┌ Warning: invalid local link: unresolved path in functions_list.md
│   link.text =
│    1-element Array{Any,1}:
│     Markdown.Code("", "binomial")
│   link.url = "@ref"
└ @ Documenter.Writers.HTMLWriter ~/.julia/packages/Documenter/FuXcO/src/Writers/HTMLWriter.jl:1823
...
┌ Warning: invalid local link: unresolved path in functions_overview.md
│   link.text =
│    1-element Array{Any,1}:
│     Markdown.Code("", "binomial(x,y)")
│   link.url = "@ref SpecialFunctions.binomial"
└ @ Documenter.Writers.HTMLWriter ~/.julia/packages/Documenter/FuXcO/src/Writers/HTMLWriter.jl:1823

Any idea what I did wrong?

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

codecov bot commented Jan 14, 2021

Codecov Report

Merging #293 (7cc46b5) into master (d18ff04) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #293      +/-   ##
==========================================
+ Coverage   88.17%   88.22%   +0.04%     
==========================================
  Files          11       11              
  Lines        2630     2632       +2     
==========================================
+ Hits         2319     2322       +3     
+ Misses        311      310       -1     
Flag Coverage Δ
unittests 88.22% <100.00%> (+0.04%) ⬆️

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

Impacted Files Coverage Δ
src/gamma.jl 93.86% <100.00%> (+0.28%) ⬆️

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 d18ff04...7cc46b5. Read the comment docs.

@PaulXiCao PaulXiCao marked this pull request as ready for review January 16, 2021 14:46
@PaulXiCao
Copy link
Contributor Author

A Todo list (taken from the issue #282)

  • implement the function
  • write documentation
    • wikipedia
    • dlmf
  • write tests

I didn't find a good link to dlmf. If anybody finds an appropriate link I can include it. I guess it is not that important?

The Documenter.jl script doesn't pick up the function documentation. I already created a topic at discourse.julialang.org.
As there are multiple functions for which the documentations are not picked up I guess it could be handled in a separate issue?


See also [`beta(a,b)`](@ref SpecialFunctions.beta).
"""
Base.binomial(x::Number, y::Number) = inv((x+1) * beta(x-y+1, y+1))
Copy link
Member

Choose a reason for hiding this comment

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

Type piracy; we would need to use a different name like genbinomial

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