IntervalArithmetic.jl icon indicating copy to clipboard operation
IntervalArithmetic.jl copied to clipboard

Improve support for `Interval{<:Integer}`

Open timholy opened this issue 4 years ago • 2 comments

When intervals are components of bigger structs that impose eltype-consistency, it would be nice not to have to force the eltype to be an AbstractFloat. It's been possible to construct Interval{<:Integer} for some time, but many methods throw errors. This reduces the fragility of the package, hopefully without introducing new numeric errors.

This also takes the liberty of bumping the patch version in hopes of getting this into a release, but I'm happy to remove that if you'd prefer to manage that separately.

timholy avatar Apr 03 '21 14:04 timholy

Thanks for this @timholy, and apologies for the delay.

We had made a deliberate choice near the start of writing the package not to support intervals of integers, but if it's easy to add then that seems like a good idea. I'm interested in what the use case would be.

I'll try to look at the details soon.

dpsanders avatar Apr 13 '21 16:04 dpsanders

@timholy: I think bigequiv(x) is the same as big(float(x)) so I don't think we need to export that function?

dpsanders avatar May 05 '21 17:05 dpsanders