Skip to content

Commit 56e16c1

Browse files
author
oscarddssmith
committed
Switch Requires.jl to weakdep
1 parent 0faab57 commit 56e16c1

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Manifest.toml

Project.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
name = "Quadmath"
22
uuid = "be4d8f0f-7fa4-5f49-b795-2f01399ab2dd"
3-
version = "0.5.13"
3+
version = "0.5.14"
44

55
[deps]
66
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
77
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
88
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
9-
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
9+
10+
[weakdeps]
11+
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
12+
13+
[extensions]
14+
QuadMathSpecialFunctionsExt = ["SpecialFunctions"]
1015

1116
[compat]
1217
Aqua = "0.6"
1318
Compat = "4.4"
1419
Printf = "<0.0.1, 1"
1520
Random = "<0.0.1, 1"
16-
Requires = "1.0"
1721
SpecialFunctions = "2.0"
1822
Test = "<0.0.1, 1"
19-
julia = "1.6"
23+
julia = "1.10"
2024

2125
[extras]
2226
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"

src/specfun.jl renamed to ext/QuadMathSpecialFunctionsExt.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
import .SpecialFunctions
2-
import .SpecialFunctions: erf, erfc, besselj0, besselj1, bessely0, bessely1,
1+
module QuadMathSpecialFunctionsExt
2+
3+
using Quadmath: libquadmath, Float128, Cfloat128
4+
import SpecialFunctions
5+
import SpecialFunctions: erf, erfc, besselj0, besselj1, bessely0, bessely1,
36
besselj, bessely, gamma, logabsgamma
47

58
erf(x::Float128) =
@@ -30,3 +33,5 @@ function logabsgamma(x::Float128)
3033
sign = !isfinite(result) || x >= 0 || !iszero(mod(ceil(x), 2)) ? 1 : -1
3134
return result, sign
3235
end
36+
37+
end

src/Quadmath.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
module Quadmath
2-
using Requires
32
using Compat: @assume_effects
43

54
export Float128, ComplexF128, Inf128
@@ -116,13 +115,6 @@ reinterpret(::Type{Int128}, x::Float128) =
116115
reinterpret(::Type{Float128}, x::Int128) =
117116
reinterpret(Float128, reinterpret(UInt128, x))
118117

119-
function __init__()
120-
@require SpecialFunctions="276daf66-3868-5448-9aa4-cd146d93841b" begin
121-
include("specfun.jl")
122-
end
123-
end
124-
125-
126118
sign_mask(::Type{Float128}) = 0x8000_0000_0000_0000_0000_0000_0000_0000
127119
exponent_mask(::Type{Float128}) = 0x7fff_0000_0000_0000_0000_0000_0000_0000
128120
exponent_one(::Type{Float128}) = 0x3fff_0000_0000_0000_0000_0000_0000_0000

0 commit comments

Comments
 (0)