Skip to content

Commit

Permalink
Generalise in (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty authored Nov 10, 2024
1 parent 6a9cf92 commit b0c3df8
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

2 comments on commit b0c3df8

@dlfivefifty
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/119101

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.25 -m "<description of version>" b0c3df85d9f4f14275513af198d5eb58f9c7a23e
git push origin v0.3.25

Please sign in to comment.