Skip to content

Commit

Permalink
update Rmath_jll (#79)
Browse files Browse the repository at this point in the history
* update Rmath_jll

* fix tests
  • Loading branch information
simonbyrne authored Jan 27, 2023
1 parent dc449cf commit a670288
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name = "Rmath"
uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa"
version = "0.7.0"
version = "0.7.1"

[deps]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Rmath_jll = "f50d1b31-88e8-58de-be2c-1cc44531875f"

[compat]
Rmath_jll = "0.3"
Rmath_jll = "0.3, 0.4"
julia = "1.3"

[extras]
Expand Down
20 changes: 14 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,18 @@ allEq(Rt2, qt.(1 .- Pt2, 1.01, false), 1e-2)
allEq(Runif, qunif.(1 .- Punif, .2, 2, false))
allEq(Rweibull, qweibull.(1 .- Pweibull, 3, 2, false))
allEq(Rwilcox, qwilcox.(1 .- Pwilcox, 13, 17, false))

const logPbinom = pbinom.(Rbinom, 55, pi/16, true, true)
const logPnbinom = pnbinom.(Rnbinom, 7, .01, true, true)
const logPpois = ppois.(Rpois, 12, true, true)
const logcPbinom = pbinom.(Rbinom, 55, pi/16, false, true)
const logcPnbinom = pnbinom.(Rnbinom, 7, .01, false, true)
const logcPpois = ppois.(Rpois, 12, false, true)


## Check q*(p* ( log ), log) = identity
allEq(Rbeta, qbeta.(log.(Pbeta), .8, 2, true, true))
allEq(Rbinom, qbinom.(log.(Pbinom), 55, pi/16, true, true))
allEq(Rbinom, qbinom.(logPbinom, 55, pi/16, true, true))
allEq(Rcauchy, qcauchy.(log.(Pcauchy), 12, 2, true, true))
allEq(Rchisq, qchisq.(log.(Pchisq), 3, true, true), 1e-14)
allEq(Rexp, qexp.(log.(Pexp), 2, true, true))
Expand All @@ -147,9 +155,9 @@ allEq(Rgeom, qgeom.(log.(Pgeom), pi/16, true, true))
allEq(Rhyper, qhyper.(log.(Phyper), 40, 30, 20, true, true))
allEq(Rlnorm, qlnorm.(log.(Plnorm), -1, 3, true, true))
allEq(Rlogis, qlogis.(log.(Plogis), 12, 2, true, true))
allEq(Rnbinom, qnbinom.(log.(Pnbinom), 7, .01, true, true))
allEq(Rnbinom, qnbinom.(logPnbinom, 7, .01, true, true))
allEq(Rnorm, qnorm.(log.(Pnorm), -1, 3, true, true))
allEq(Rpois, qpois.(log.(Ppois), 12, true, true))
allEq(Rpois, qpois.(logPpois, 12, true, true))
allEq(Rsignrank, qsignrank.(log.(Psignrank), 47, true, true))
allEq(Rt, qt.(log.(Pt), 11, true, true))
allEq(Rt2, qt.(log.(Pt2), 1.01, true, true), 1e-2)
Expand All @@ -159,7 +167,7 @@ allEq(Rwilcox, qwilcox.(log.(Pwilcox), 13, 17, true, true))

## same q*(p* (log) log) with upper tail:
allEq(Rbeta, qbeta.(log.(1 .- Pbeta), .8, 2, false, true))
allEq(Rbinom, qbinom.(log.(1 .- Pbinom), 55, pi/16, false, true))
allEq(Rbinom, qbinom.(logcPbinom, 55, pi/16, false, true))
allEq(Rcauchy, qcauchy.(log.(1 .- Pcauchy), 12, 2, false, true))
allEq(Rchisq, qchisq.(log.(1 .- Pchisq), 3, false, true))
allEq(Rexp, qexp.(log.(1 .- Pexp), 2, false, true))
Expand All @@ -169,9 +177,9 @@ allEq(Rgeom, qgeom.(log.(1 .- Pgeom), pi/16, false, true))
allEq(Rhyper, qhyper.(log.(1 .- Phyper), 40, 30, 20, false, true))
allEq(Rlnorm, qlnorm.(log.(1 .- Plnorm), -1, 3, false, true))
allEq(Rlogis, qlogis.(log.(1 .- Plogis), 12, 2, false, true))
allEq(Rnbinom, qnbinom.(log.(1 .- Pnbinom), 7, .01, false, true))
allEq(Rnbinom, qnbinom.(logcPnbinom, 7, .01, false, true))
allEq(Rnorm, qnorm.(log.(1 .- Pnorm), -1, 3, false, true))
allEq(Rpois, qpois.(log.(1 .- Ppois), 12, false, true))
allEq(Rpois, qpois.(logcPpois, 12, false, true))
allEq(Rsignrank, qsignrank.(log.(1 .- Psignrank), 47, false, true))
allEq(Rt, qt.(log.(1 .- Pt ), 11, false, true))
allEq(Rt2, qt.(log.(1 .- Pt2), 1.01, false, true), 1e-2)
Expand Down

2 comments on commit a670288

@simonbyrne
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/76524

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.7.1 -m "<description of version>" a670288984627a66f67bdb5218160b2682ff0df3
git push origin v0.7.1

Please sign in to comment.