Skip to content

Commit b0c3df8

Browse files
authored
Generalise in (#84)
1 parent 6a9cf92 commit b0c3df8

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

.github/workflows/CI.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
version:
13-
- '1.3'
13+
- 'lts'
1414
- '1'
1515
- 'nightly'
1616
os:

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "HypergeometricFunctions"
22
uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a"
3-
version = "0.3.24"
3+
version = "0.3.25"
44

55
[deps]
66
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

src/specialfunctions.jl

+3-7
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,16 @@ const ρϵ = 0.71
8181
structend
8282

8383
Base.in(n::Integer, ::Type{ℕ}) = n > 0
84-
Base.in(n::Real, ::Type{ℕ}) == round(Int, n); n == ν && ν ℕ)
85-
Base.in(n::Complex, ::Type{ℕ}) = imag(n) == 0 && real(n)
84+
Base.in(n::Number, ::Type{ℕ}) = isinteger(n) && round(Int, n)
8685

8786
struct ℕ₀ end
8887

8988
Base.in(n::Integer, ::Type{ℕ₀}) = n 0
90-
Base.in(n::Real, ::Type{ℕ₀}) == round(Int, n); n == ν && ν ℕ₀)
91-
Base.in(n::Complex, ::Type{ℕ₀}) = imag(n) == 0 && real(n) ℕ₀
89+
Base.in(n::Number, ::Type{ℕ₀}) = isinteger(n) && round(Int, n) ℕ₀
9290

9391
structend
9492

95-
Base.in(n::Integer, ::Type{ℤ}) = true
96-
Base.in(n::Real, ::Type{ℤ}) = n == round(Int, n)
97-
Base.in(n::Complex, ::Type{ℤ}) = imag(n) == 0 && real(n)
93+
Base.in(n::Number, ::Type{ℤ}) = isinteger(n)
9894

9995
abeqcd(a, b, cd) = isequal(a, b) && isequal(b, cd)
10096
abeqcd(a, b, c, d) = isequal(a, c) && isequal(b, d)

0 commit comments

Comments
 (0)