JuliaMath / JuliaMath/Combinatorics.jl

Double factorial can be extended to negative ints

Open
#103 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
230
Forks
62
PR merge metrics
No merged PRs in 30d

Description

The following error may be averted, or such functionality made possible with an additional method:

https://github.com/JuliaMath/Combinatorics.jl/blob/c2114a71ccfc93052efb9a9379e62b81b9388ef8/src/factorials.jl#L47-L54

An example of how `‼︎` can be extended to the signed integers is found on Wikipedia at [Ellipse § Circumference](https://en.wikipedia.org/wiki/Ellipse#Circumference):

```tex
where $n‼︎$ is the double factorial (extended to negative odd integers
by the recurrence relation $(2n-1)‼︎ = (2n+1)‼︎ / (2n+1)$, for $n ≤ 0$).
```

Would this be a useful addition to the library? Alternatively, if there are multiple distinct analytical continuations of `‼︎` for the negative integers, could I have a lead for how to implement it in Julia? Would this issue be a better fit for the [SpecialFunctions](https://github.com/JuliaMath/SpecialFunctions.jl) library?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.