There may be existing libraries that can be used. Research this first. See Marco Antoniotti recent work and his [sub-intervals](https://common-lisp.net/project/cdr/document/5/extra-num-types.html).
There may be existing libraries that can be used. Research this first. See Marco Antoniotti recent work and his sub-intervals.