-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combine with InfiniteArrays.Infinity? #25
Comments
Hi @dlfivefifty, thanks for your message. I've been mulling it over. Yes I'm favour of your proposal in general. Currently this package has the following types:
The original motivation for the package was the Over on #11 I was already considering making In response to your proposals:
So I think the types should look like this:
It sounds like a lot, but for most users it suffices to just use Some things I'm not sure about:
|
#In my usage I absolutely need an infinity that's a subtype or So perhaps we do this: const InfiniteCardinality{K} <: Integer end
const ℵ₀ = InfiniteCardinality{0}() |
Do you just need infinite cardinalities, or do you also need the |
For the most part, just infinite cardinalities. Though there was a need to negate them ( probably somewhere in the array code it called We should think if there's a cleaner way to extend number systems. For reals and integers there's always a choice between adding two or one infinity. For complex's there's a choice between one infinity and an infinity from each direction. |
The main goal of this package is to provide a useful notion of infinity that sits within the existing base Julia types. The existing infinities If you want the unique projective infinity, then I suppose we could have a singleton type As for infinite cardinals, it seems reasonable to have something like |
Because InfiniteArrays.jl supports infinite sized |
Makes sense. So what do you think of my earlier 6 point proposal? |
Ahhh!!! Accidentally closed the window with a detailed response to all your comments 😰 The main point: I think julia> using InfiniteArrays, Unitful, Unitful.DefaultSymbols
julia> ∞ * hr
∞ hr That would not be possible if |
Oh no!!! I think you might be right --- overloading the meaning of I think we'll still need something like So the proposal becomes:
|
Yes I like this |
@fchorney @omus FYI the plan is to move this package over to https://github.com/JuliaMath/Infinities.jl. It is being renamed to Let me know if you have any more PRs soon. If not, I'll release a version and that will be the last one on this repo. Then we'll copy the repo to its new home, make the planned changes, and register it. @dlfivefifty Sounds reasonable? |
I'll copy over my code now with the new naming scheme. |
InfiniteArrays.jl currently has several infinite types and could make sense to unify this with this package. In particular I have
Infinity <: Integer
. This is because it represents cardinality, and so need it to be anInteger
to work with the array interfaces. Note I believe in interpretingInteger
as an an interface, not a mathematical definition, so sinceInfinity
conforms to theInteger
interface this is a valid definition.SignedInfinity <: Integer
, to support+∞
and-∞
.OrientedInfinity{T<:Real} <: Number
. This is for infinities in the complex plane (unfortunately there's noAbstractComplex
to subtype)What do you think? It will take some thought, in particular I would propose at least:
Infinite
asInfinity
(adjective -> noun)Infinity <: Integer
makes sense, or whether that should be another type calledInfiniteCardinality
.The text was updated successfully, but these errors were encountered: