Skip to content

Commit

Permalink
Generalise in
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed Nov 10, 2024
1 parent 6a9cf92 commit eccd517
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
version:
- '1.3'
- 'lts'
- '1'
- 'nightly'
os:
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "HypergeometricFunctions"
uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a"
version = "0.3.24"
version = "0.3.25"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
10 changes: 3 additions & 7 deletions src/specialfunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,16 @@ const ρϵ = 0.71
structend

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

struct ℕ₀ end

Base.in(n::Integer, ::Type{ℕ₀}) = n 0
Base.in(n::Real, ::Type{ℕ₀}) == round(Int, n); n == ν && ν ℕ₀)
Base.in(n::Complex, ::Type{ℕ₀}) = imag(n) == 0 && real(n) ℕ₀
Base.in(n::Number, ::Type{ℕ₀}) = isinteger(n) && round(Int, n) ℕ₀

structend

Base.in(n::Integer, ::Type{ℤ}) = true
Base.in(n::Real, ::Type{ℤ}) = n == round(Int, n)
Base.in(n::Complex, ::Type{ℤ}) = imag(n) == 0 && real(n)
Base.in(n::Number, ::Type{ℤ}) = isinteger(n)

abeqcd(a, b, cd) = isequal(a, b) && isequal(b, cd)
abeqcd(a, b, c, d) = isequal(a, c) && isequal(b, d)
Expand Down

0 comments on commit eccd517

Please sign in to comment.