From 03c3ba47e9d9e5125dd385565ce5ad92ba6da250 Mon Sep 17 00:00:00 2001 From: Jutho Haegeman Date: Sat, 1 Feb 2020 23:15:40 +0100 Subject: [PATCH] bump version, update readme and ci --- .travis.yml | 4 +--- Project.toml | 2 +- README.md | 29 +++++++++++++++-------------- appveyor.yml | 4 +--- 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2763dc7..c37bba4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,7 @@ os: - osx julia: - 1.0 - - 1.1 - - 1.2 - - 1.3 + - 1 - nightly # env: # - JULIA_NUM_THREADS=1 diff --git a/Project.toml b/Project.toml index 0eaa8c6..ad406c8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "WignerSymbols" uuid = "9f57e263-0b3d-5e2e-b1be-24f2bb48858b" authors = ["Jutho Haegeman"] -version = "1.0.0" +version = "1.1.0" [deps] RationalRoots = "308eb6b3-cc68-5ff3-9e97-c3c4da4fa681" diff --git a/README.md b/README.md index 7e1a1a5..2d58518 100644 --- a/README.md +++ b/README.md @@ -18,21 +18,21 @@ Pkg.add("WignerSymbols") ## Available functions While the following function signatures are probably self-explanatory, you can query help for them in the Julia REPL to get further details. -* `wigner3j(T::Type{<:AbstractFloat} = Float64, j₁, j₂, j₃, m₁, m₂, m₃ = -m₂-m₁) -> ::T` -* `wigner6j(T::Type{<:AbstractFloat} = Float64, j₁, j₂, j₃, j₄, j₅, j₆) -> ::T` -* `clebschgordan(T::Type{<:AbstractFloat} = Float64, j₁, m₁, j₂, m₂, j₃, m₃ = m₁+m₂) -> ::T` -* `racahV(T::Type{<:AbstractFloat} = Float64, j₁, j₂, j₃, m₁, m₂, m₃ = -m₁-m₂) -> ::T` -* `racahW(T::Type{<:AbstractFloat} = Float64, j₁, j₂, J, j₃, J₁₂, J₂₃) -> ::T` +* `wigner3j(T::Type{<:Real} = RationalRoot{BigInt}, j₁, j₂, j₃, m₁, m₂, m₃ = -m₂-m₁) -> ::T` +* `wigner6j(T::Type{<:Real} = RationalRoot{BigInt}, j₁, j₂, j₃, j₄, j₅, j₆) -> ::T` +* `clebschgordan(T::Type{<:Real} = RationalRoot{BigInt}, j₁, m₁, j₂, m₂, j₃, m₃ = m₁+m₂) -> ::T` +* `racahV(T::Type{<:Real} = RationalRoot{BigInt}, j₁, j₂, j₃, m₁, m₂, m₃ = -m₁-m₂) -> ::T` +* `racahW(T::Type{<:Real} = RationalRoot{BigInt}, j₁, j₂, J, j₃, J₁₂, J₂₃) -> ::T` * `δ(j₁, j₂, j₃) -> ::Bool` -* `Δ(T::Type{<:AbstractFloat} = Float64, j₁, j₂, j₃) -> ::T` +* `Δ(T::Type{<:Real} = RationalRoot{BigInt}, j₁, j₂, j₃) -> ::T` -~~The package also defines the `HalfInteger` type that can be used to represent half- -integer values. Construct if as `HalfInteger(a::Real)` or `HalfInteger(numerator::Integer, -denominator::Integer)`. Furthermore, the range operator `a:b` can be used to create ranges -of `HalfInteger` values (a `HalfIntegerRange`).~~ -The package now relies on [HalfIntegers.jl](https://github.com/sostock/HalfIntegers.jl) to -support and use arithmetic with half integer numbers. +The package relies on [HalfIntegers.jl](https://github.com/sostock/HalfIntegers.jl) to +support and use arithmetic with half integer numbers, and, since v1.1, on +[RationalRoots.jl](https://github.com/Jutho/RationalRoots.jl) to return the result exactly +as the square root of a `Rational{BigInt}`, which will then be automatically converted to a +suitable floating point value upon further arithmetic, using the `AbstractIrrational` +interface from Julia Base. ## Implementation Largely based on reading the paper (but not the code): @@ -63,5 +63,6 @@ for caching the computed 3j and 6j symbols. [3] [L. Wei, New formula for 9-j symbols and their direct calculation, Computers in Physics, 12 (1998), 632–634.](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.481.5946&rep=rep1&type=pdf) -* Convenient syntax to get the exact results in the `√(r) * s` format, but in such a way - that it can be used by the Julia type system and can be converted afterwards. +* ~~Convenient syntax to get the exact results in the `√(r) * s` format, but in such a way + that it can be used by the Julia type system and can be converted afterwards.~~ + Solved in v1.1 by the package RationalRoots.jl, the implementation of which was initiated by @w-vdh in [PR #9](https://github.com/Jutho/WignerSymbols.jl/pull/9). diff --git a/appveyor.yml b/appveyor.yml index cf5896a..5150cd5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,9 +1,7 @@ environment: matrix: + - julia_version: 1.0 - julia_version: 1 - - julia_version: 1.1 - - julia_version: 1.2 - - julia_version: 1.3 - julia_version: nightly platform: