Skip to content

Commit

Permalink
Reexport LogExpFunctions (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion authored Apr 19, 2021
1 parent bc45e18 commit 56322bb
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 542 deletions.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name = "StatsFuns"
uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
version = "0.9.7"
version = "0.9.8"

[deps]
LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
Rmath = "79098fc4-a85e-5d69-aa6a-4863f24498fa"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"

[compat]
LogExpFunctions = "0.2.1"
Rmath = "0.4, 0.5, 0.6, 0.7"
SpecialFunctions = "0.8, 0.9, 0.10, 1.0"
julia = "1"
Expand Down
53 changes: 27 additions & 26 deletions src/StatsFuns.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,6 @@ export
sqrthalfπ, # √(π / 2)
invsqrt2, # 1 / √2
invsqrt2π, # 1 / √2π
loghalf, # log(1 / 2)
logtwo, # log(2)
logπ, # log(π)
log2π, # log(2π)
log4π, # log(4π)

# basicfuns
xlogx, # x * log(x) for x > 0, or 0 when x == 0
xlogy, # x * log(y) for x > 0, or 0 when x == 0
logistic, # 1 / (1 + exp(-x))
logit, # log(x / (1 - x))
log1psq, # log(1 + x^2)
log1pexp, # log(1 + exp(x))
log1mexp, # log(1 - exp(x))
log2mexp, # log(2 - exp(x))
logexpm1, # log(exp(x) - 1)
softplus, # alias of log1pexp
invsoftplus, # alias of logexpm1
log1pmx, # log(1 + x) - x
logmxp1, # log(x) - x + 1
logaddexp, # log(exp(x) + exp(y))
logsubexp, # log(abs(e^x - e^y))
logsumexp, # log(sum(exp(x)))
softmax, # exp(x_i) / sum(exp(x)), for i
softmax!, # inplace softmax

# distrs/beta
betapdf, # pdf of beta distribution
Expand Down Expand Up @@ -233,10 +208,36 @@ export
logmvbeta, # logarithm of multivariate beta function
lstirling_asym

# reexports
using LogExpFunctions

export
loghalf, # log(1 / 2)
logtwo, # log(2)
logπ, # log(π)
log2π, # log(2π)
log4π, # log(4π)
xlogx, # x * log(x) for x > 0, or 0 when x == 0
xlogy, # x * log(y) for x > 0, or 0 when x == 0
logistic, # 1 / (1 + exp(-x))
logit, # log(x / (1 - x))
log1psq, # log(1 + x^2)
log1pexp, # log(1 + exp(x))
log1mexp, # log(1 - exp(x))
log2mexp, # log(2 - exp(x))
logexpm1, # log(exp(x) - 1)
softplus, # alias of log1pexp
invsoftplus, # alias of logexpm1
log1pmx, # log(1 + x) - x
logmxp1, # log(x) - x + 1
logaddexp, # log(exp(x) + exp(y))
logsubexp, # log(abs(e^x - e^y))
logsumexp, # log(sum(exp(x)))
softmax, # exp(x_i) / sum(exp(x)), for i
softmax! # inplace softmax

## source files
include("constants.jl")
include("basicfuns.jl")
include("misc.jl")
include("rmath.jl")

Expand Down
Loading

2 comments on commit 56322bb

@devmotion
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/34682

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.8 -m "<description of version>" 56322bb8fef18db63d6dd2f4c4615583c58d77c7
git push origin v0.9.8

Please sign in to comment.