Skip to content

Commit

Permalink
use jacobi-theta-0.2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stla committed Oct 18, 2023
1 parent 56a2874 commit d95ba60
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 16 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog for `weierstrass-functions`

## 0.1.5.0 - 2023-10-18

Increased the lower bound of the version of the 'jacobi-theta' dependency.


## 0.1.4.0 - 2023-10-16

Increased the lower bound of the version of the 'jacobi-theta' dependency.
Expand Down
16 changes: 12 additions & 4 deletions src/Math/Eisenstein.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
{-|
Module : Math.Eisenstein
Description : Some modular functions.
Copyright : (c) Stéphane Laurent, 2023
License : BSD3
Maintainer : laurent_step@outlook.fr
Provides some modular functions and related functions.
-}
module Math.Eisenstein
( lambda,
eisensteinE2,
Expand All @@ -8,13 +17,12 @@ module Math.Eisenstein
modularDiscriminant,
agm,
etaDedekind,
jtheta1DashDashDash0,
jtheta1Dash
jtheta1DashDashDash0
) where
import Data.Complex ( Complex(..) )
import Internal ( (%^%) )
import Math.EllipticIntegrals ( ellipticF', ellipticE' )
import Math.JacobiTheta ( jtheta2, jtheta3, jtheta4, jtheta1Dash )
import Math.JacobiTheta ( jtheta2, jtheta3, jtheta4, jtheta1Dash0 )


i_ :: Complex Double
Expand Down Expand Up @@ -143,7 +151,7 @@ etaDedekind tau = exp (ipitau / 12) * j3
jtheta1DashDashDash0 ::
Complex Double -- ^ tau
-> Complex Double
jtheta1DashDashDash0 tau = - jtheta1Dash 0 q * eisensteinE2 tau
jtheta1DashDashDash0 tau = - jtheta1Dash0 q * eisensteinE2 tau
where
q = exp (i_ * pi * tau)

Expand Down
16 changes: 13 additions & 3 deletions src/Math/Weierstrass.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
{-|
Module : Math.Eisenstein
Description : Some Weierstrass functions.
Copyright : (c) Stéphane Laurent, 2023
License : BSD3
Maintainer : laurent_step@outlook.fr
Provides some Weierstrass functions and related functions.
-}
module Math.Weierstrass
( halfPeriods,
ellipticInvariants,
Expand All @@ -17,6 +26,7 @@ import Math.JacobiTheta ( jtheta2,
jtheta3,
jtheta1,
jtheta4,
jtheta1Dash0,
jtheta1Dash )
import Math.Gamma ( gamma )
import Math.EllipticIntegrals ( carlsonRF' )
Expand Down Expand Up @@ -136,7 +146,7 @@ weierstrassPdash z g2 g3 = 2 / (w1 %^% 3) * j2 * j3 * j4 * f
j2 = jtheta2 z' q
j3 = jtheta3 z' q
j4 = jtheta4 z' q
j1dash = jtheta1Dash 0 q
j1dash = jtheta1Dash0 q
j2zero = jtheta2 0 q
j3zero = jtheta3 0 q
j4zero = jtheta4 0 q
Expand Down Expand Up @@ -169,7 +179,7 @@ weierstrassSigma z g2 g3 = w1 * exp (h * z * z1 / pi) * j1 / j1dash
w1 = -2 * omega1 / pi
z1 = z / w1
j1 = jtheta1 z1 q
j1dash = jtheta1Dash 0 q
j1dash = jtheta1Dash0 q
h = - pi / (6 * w1) * jtheta1DashDashDash0 tau / j1dash

-- | Weierstrass zeta function
Expand All @@ -185,7 +195,7 @@ weierstrassZeta z g2 g3 = - eta1 * z + p * lj1dash
q = exp (i_ * pi * tau)
w1 = - omega1 / pi
p = 0.5 / w1
j1dash = jtheta1Dash 0 q
j1dash = jtheta1Dash0 q
eta1 = p * jtheta1DashDashDash0 tau / (6 * w1 * j1dash)
pz = p * z
lj1dash = jtheta1Dash pz q / jtheta1 pz q
3 changes: 2 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ packages:
- .

extra-deps:
- jacobi-theta-0.2.0.0
- git: https://github.com/stla/jacobi-theta.git
commit: 1ca79c7632ac921720b609a2a1bee7d90b7a02af
- elliptic-integrals-0.1.0.0
- gamma-0.10.0.0
- continued-fractions-0.10.0.2
Expand Down
12 changes: 8 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@

packages:
- completed:
hackage: jacobi-theta-0.1.2.0@sha256:b868599c1e17bafb8720265fd49f4251061e8c433f900b19bd521015d91851d7,1533
commit: 1ca79c7632ac921720b609a2a1bee7d90b7a02af
git: https://github.com/stla/jacobi-theta.git
name: jacobi-theta
pantry-tree:
sha256: 6f16972c5f020293296c4940f5a59ebff7f1990742bd0a7836525ed6efc01b52
size: 429
sha256: 9488726294512da43ee1498cfc9bd57ced5d41261334467b1f52ba3d059dc793
size: 772
version: 0.2.1.1
original:
hackage: jacobi-theta-0.1.2.0
commit: 1ca79c7632ac921720b609a2a1bee7d90b7a02af
git: https://github.com/stla/jacobi-theta.git
- completed:
hackage: elliptic-integrals-0.1.0.0@sha256:f96e03260c1fc51f8e1a65ef2d4d36600ac36eac5d50c41a444b676791cd9292,1484
pantry-tree:
Expand Down
4 changes: 2 additions & 2 deletions tests/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ main = defaultMain $

testCase "Differential equation" $ do
let z = 1 :+ 1
g2 = 2 :+ 1
g3 = 2 :+ (-1)
g2 = 5 :+ 3
g3 = 2 :+ 7
w = weierstrassP z g2 g3
wdash = weierstrassPdash z g2 g3
left = wdash ** 2
Expand Down
4 changes: 2 additions & 2 deletions weierstrass-functions.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: weierstrass-functions
version: 0.1.4.0
version: 0.1.5.0
synopsis: Weierstrass Elliptic Functions
description: Evaluation of Weierstrass elliptic functions and some related functions.
homepage: https://github.com/stla/weierstrass-functions#readme
Expand All @@ -20,7 +20,7 @@ library
, Math.Weierstrass
other-modules: Internal
build-depends: base >= 4.7 && < 5
, jacobi-theta >= 0.2.0.0
, jacobi-theta >= 0.2.1.1
, elliptic-integrals >= 0.1.0.0
, gamma >= 0.10.0.0
default-language: Haskell2010
Expand Down

0 comments on commit d95ba60

Please sign in to comment.