Skip to content

Add ThickNumbers extension - #770

Open
timholy wants to merge 1 commit into
JuliaIntervals:masterfrom
timholy:teh/tn
Open

Add ThickNumbers extension#770
timholy wants to merge 1 commit into
JuliaIntervals:masterfrom
timholy:teh/tn

Conversation

@timholy

@timholy timholy commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

ThickNumbers.jl (https://github.com/HolyLab/ThickNumbers.jl) provides a general interface for "numbers with width," of which intervals are the premier example. Other examples include Gaussian random variables and other implementations of "fuzzy numbers." While this does not make this package's intervals a subtype of ThickNumber, it does add a compatibility shim that is sufficient for at least one tested non-trivial consumer.

ThickNumbers.jl (https://github.com/HolyLab/ThickNumbers.jl) provides a
general interface for "numbers with width," of which intervals are the
premier example. Other examples include Gaussian random variables and
other implementations of "fuzzy numbers." While this does not make this
package's intervals a subtype of `ThickNumber`, it does add a compatibility
shim that is sufficient for at least one tested non-trivial consumer.
# `in_interval(::Interval, ::Interval)`, a real point's membership in an interval is always
# decidable, and `IA.in_interval` already computes exactly that (`Base.in(::Interval,
# ::Interval)` is the one IA purposely leaves unsupported, for `issubset_interval` instead).
Base.in(x::Real, a::IA.Interval) = IA.in_interval(x, a)

@OlivierHnt OlivierHnt Jul 26, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like type piracy, no?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In the sense that this method has nothing to do with ThickNumber, and the package extension does not own Interval. In any case, it's probably not a feature we'd want to add to IA.jl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants