From 8284196ea4852890f94748513952385c1bef2684 Mon Sep 17 00:00:00 2001 From: Alexander Voigt Date: Fri, 14 Nov 2025 08:06:47 +0100 Subject: [PATCH 1/3] run only on macOS with julia 1.0 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c69368..c762d4c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,8 +10,8 @@ jobs: strategy: matrix: arch: [x64] - os: [ubuntu-latest, macOS-latest, Windows-latest] - version: ['1.0', '1'] + os: [macOS-latest] + version: ['1.0'] steps: - uses: actions/checkout@v2 From 5212b8224445bc858009b66550613ea537e6507e Mon Sep 17 00:00:00 2001 From: Alexander Voigt Date: Fri, 14 Nov 2025 10:20:13 +0100 Subject: [PATCH 2/3] inline euler gamma constant --- src/Constants.jl | 1 - src/Harmonic.jl | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Constants.jl b/src/Constants.jl index 9a91fcd..a412d5d 100644 --- a/src/Constants.jl +++ b/src/Constants.jl @@ -5,4 +5,3 @@ const ZETA3_F64 = 1.2020569031595943 # zeta(3) with Float64 precision const ZETA4_F64 = 1.0823232337111382 # zeta(4) with Float64 precision const ZETA5_F64 = 1.0369277551433699 # zeta(5) with Float64 precision const ZETA6_F64 = 1.0173430619844491 # zeta(6) with Float64 precision -const EULERGAMMA_F64 = 0.57721566490153286 # Euler gamma constant with Float64 precision diff --git a/src/Harmonic.jl b/src/Harmonic.jl index af541e6..ded7523 100644 --- a/src/Harmonic.jl +++ b/src/Harmonic.jl @@ -5,7 +5,7 @@ function harmonic(n::Integer, ::Type{T})::T where T elseif n == 1 one(T) elseif issimplefloat(T) && n >= 20 - convert(T, EULERGAMMA_F64 + digamma(n + 1)) + convert(T, 0.57721566490153286 + digamma(n + 1)) else one(T) + sum(x -> inv(T(x)), 2:n) end From 94f0d33d530a2738888c9d75dbf43272ddb2f683 Mon Sep 17 00:00:00 2001 From: Alexander Voigt Date: Fri, 14 Nov 2025 10:32:25 +0100 Subject: [PATCH 3/3] use pre-defined eulergamma --- src/Harmonic.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Harmonic.jl b/src/Harmonic.jl index ded7523..fd6cf72 100644 --- a/src/Harmonic.jl +++ b/src/Harmonic.jl @@ -5,7 +5,7 @@ function harmonic(n::Integer, ::Type{T})::T where T elseif n == 1 one(T) elseif issimplefloat(T) && n >= 20 - convert(T, 0.57721566490153286 + digamma(n + 1)) + convert(T, Base.MathConstants.eulergamma + digamma(n + 1)) else one(T) + sum(x -> inv(T(x)), 2:n) end