Skip to content

Commit

Permalink
v3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stla committed Nov 15, 2023
1 parent 7d63eba commit 69bf3b4
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: jacobi
Title: Jacobi Theta Functions and Related Functions
Version: 3.1.0
Version: 3.1.1
Authors@R: c(
person("Stéphane", "Laurent", , "[email protected]", role = c("aut", "cre")),
person("Mikael", "Fremling", role = "aut",
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# jacobi 3.1.1

An equality test in the unit tests failed on MacM1, so I relaxed its tolerance.


# jacobi 3.1.0

- Elliptic alpha function.
Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Testing environments

* local R 4.3.1, Windows 10
* local R 4.3.2, Windows 10
* Ubuntu, via Github action
* win-builder devel

Expand Down
45 changes: 45 additions & 0 deletions inst/images/etaDedekind_Cayley-Moebius.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
library(jacobi)
library(RcppColors)

# background color
bkgcol <- "#ffffff"

# Möbius transformation of order 3
Mob <- function(z, t) {
a <- pi*t/3
((sqrt(3)*cos(a) - sin(a)) * z - 2*sin(a))/
(2*sin(a) * z + sqrt(3)*cos(a) + sin(a))
}

# map the disk to H and calculate eta
f <- function(x, y, t) {
z <- complex(real = x, imaginary = y)
K <- rep(NA_complex_, length(z))
inDisk <- Mod(z) < 1
K[inDisk] <- eta(disk2H(z[inDisk]))
K
}
n <- 512L
x <- y <- seq(-1, 1, length.out = n)
Grid <- expand.grid(X = x, Y = y)
K <- f(Grid$X, Grid$Y, 0.05)^24
dim(K) <- c(n, n)

# plot
img <- colorMap5(K)
opar <- par(mar = c(0, 0, 0, 0))
plot(NULL, xlim = c(0, 1), ylim = c(0, 1), asp = 1,
axes = FALSE, xaxs = "i", yaxs = "i", xlab = NA, ylab = NA)
rasterImage(img, 0, 0, 1, 1)
par(opar)


svg("x.svg", width = 15, height = 15)
opar <- par(mar = c(0, 0, 0, 0))
plot(NULL, xlim = c(0, 1), ylim = c(0, 1), asp = 1,
axes = FALSE, xaxs = "i", yaxs = "i", xlab = NA, ylab = NA)
rasterImage(img, 0, 0, 1, 1)
par(opar)
dev.off()

rsvg::rsvg_png("x.svg", "etaDedekindOnCircle.png", 512, 512)
2 changes: 1 addition & 1 deletion tests/testthat/test-RogersRamanujan.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test_that("Value of `q` for which Rogers-Ramanujan is `i`", {
tau <- (7 + 1i)/10
q <- exp(1i * pi * tau)
expect_equal(
RR(q^2)^5, 1i, tolerance = 1e-7
RR(q^2)^5, 1i, tolerance = 1e-5
)
})

Expand Down

0 comments on commit 69bf3b4

Please sign in to comment.