# Is there a continuous range type in julia?

**URL:** <https://discourse.julialang.org/t/is-there-a-continuous-range-type-in-julia/50298>\
**Category:** General Usage\
**Created:** [November 17, 2020, 1:26pm UTC](https://discourse.julialang.org/t/is-there-a-continuous-range-type-in-julia/50298 "2020-11-17T13:26:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HenriDeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrideh/32/8316_2.png) [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Post date:** [November 17, 2020, 1:26pm UTC](https://discourse.julialang.org/t/is-there-a-continuous-range-type-in-julia/50298/1 "2020-11-17T13:26:31Z")

</div>

Hi,

I was wondering if there exists a continuous range type. The idea would be to be able to have something like

`0.5 in CRange(0,1)`

to return true. The interest is mostly syntactic I guess, but since continuous ranges are a thing in math it could be nice.  
We could define stuff like

`Rplus = CRange(0, Inf)`

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [November 17, 2020, 1:28pm UTC](https://discourse.julialang.org/t/is-there-a-continuous-range-type-in-julia/50298/2 "2020-11-17T13:28:04Z")

</div>

You should check out `IntervalArithmatic` it uses `0..1` as syntax for this concept, and lets you perform math on intervals to get other intervals guaranteed to contain the correct answer

---

<div class="post-metadata">

**Author:** ![HenriDeh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrideh/32/8316_2.png) [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Post date:** [November 17, 2020, 1:29pm UTC](https://discourse.julialang.org/t/is-there-a-continuous-range-type-in-julia/50298/3 "2020-11-17T13:29:49Z")

</div>

Ha sweet, thanks !
