diff --git a/NEWS.md b/NEWS.md index e54201ab67..ad081b7e9c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.9.9] – 2023-12-14 + +### Fixed + +* introduced a nonzero `atol` for all point and vector checks that compre to zero. + This makes those checks a bit more relaxed by default and resolves [#630](https://github.com/JuliaManifolds/Manifolds.jl/issues/630). + ## [0.9.8] - 2023-11-17 ### Fixed diff --git a/Project.toml b/Project.toml index 490fd5c2bf..0bd91a22b8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Manifolds" uuid = "1cead3c2-87b3-11e9-0ccd-23c62b72b94e" authors = ["Seth Axen ", "Mateusz Baran ", "Ronny Bergmann ", "Antoine Levitt "] -version = "0.9.8" +version = "0.9.9" [deps] Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" diff --git a/src/manifolds/SymplecticStiefel.jl b/src/manifolds/SymplecticStiefel.jl index 455f8c1aef..a43c064e4b 100644 --- a/src/manifolds/SymplecticStiefel.jl +++ b/src/manifolds/SymplecticStiefel.jl @@ -148,16 +148,16 @@ The tolerance can be set with `kwargs...` (e.g. `atol = 1.0e-14`). check_vector(::SymplecticStiefel, ::Any...) function check_vector( - M::SymplecticStiefel, + M::SymplecticStiefel{S,𝔽}, p, X::T; atol=sqrt(prod(representation_size(M))) * eps(real(float(number_eltype(T)))), kwargs..., -) where {T} +) where {S,T,𝔽} n, k = get_parameter(M.size) # From Bendokat-Zimmermann: T_pSpSt(2n, 2k) = \{p*H | H^{+} = -H \} H = inv(M, p) * X # ∈ ℝ^{2k × 2k}, should be Hamiltonian. - H_star = inv(Symplectic(2k, field), H) + H_star = inv(Symplectic(2k, 𝔽), H) hamiltonian_identity_norm = norm(H + H_star) if !isapprox(hamiltonian_identity_norm, 0; atol=atol, kwargs...)