From 2320ac1ceda35f148b0f7963c83413e98838f5a5 Mon Sep 17 00:00:00 2001 From: Andrew Gibbs <32740541+AndrewGibbs@users.noreply.github.com> Date: Wed, 18 Mar 2026 21:13:16 +0000 Subject: [PATCH 1/4] Change pointseven from rational to float representation --- src/LambertW.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LambertW.jl b/src/LambertW.jl index 43c7bf6..4af2dcd 100644 --- a/src/LambertW.jl +++ b/src/LambertW.jl @@ -133,7 +133,7 @@ end # choose initial value inside correct branch for root finding function _lambertw(z::Complex{T}, k::Integer, maxits::Integer) where T<:Real one_t = one(T) - pointseven = 7//10 + pointseven = 0.7 if abs(z) <= one_t/convert(T, MathConstants.e) if z == 0 k == 0 && return _no_loop(z) From 502e5c3db6a39128535199c7810f3915b0638858 Mon Sep 17 00:00:00 2001 From: Andrew Gibbs <32740541+AndrewGibbs@users.noreply.github.com> Date: Wed, 18 Mar 2026 21:16:52 +0000 Subject: [PATCH 2/4] Add workflow_dispatch trigger to CI workflow --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 217a265..7b2ee50 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,5 +1,6 @@ name: CI on: + workflow_dispatch: push: branches: - master From 98b81232bcffc5a4bd1e5c4f233ce064b465dfef Mon Sep 17 00:00:00 2001 From: Andrew Gibbs <32740541+AndrewGibbs@users.noreply.github.com> Date: Wed, 18 Mar 2026 21:29:10 +0000 Subject: [PATCH 3/4] Add test for small negative real complex in lambertw Add a test for lambertw function with small negative real complex input to ensure it does not error. --- test/small_neg_real_test.jl | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/small_neg_real_test.jl diff --git a/test/small_neg_real_test.jl b/test/small_neg_real_test.jl new file mode 100644 index 0000000..0e28386 --- /dev/null +++ b/test/small_neg_real_test.jl @@ -0,0 +1,9 @@ +using LambertW + +@testset "does not error for small negative real complex" begin + try lambertw(-0.4087512737796557 + 0.038455913083347504im, 0) + @test true + catch err + @test false + end +end From af4d441eb0807082c223811aa93d1ec22475da4e Mon Sep 17 00:00:00 2001 From: Andrew Gibbs <32740541+AndrewGibbs@users.noreply.github.com> Date: Wed, 18 Mar 2026 21:33:52 +0000 Subject: [PATCH 4/4] Include small_neg_real_test.jl in runtests --- test/runtests.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/runtests.jl b/test/runtests.jl index 02ce8cf..8d3d1af 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,6 +4,7 @@ using Test include("lambertw_test.jl") include("aqua_test.jl") +include("small_neg_real_test.jl") if VERSION >= v"1.7" include("jet_test.jl")