public StatisticRange intersect(StatisticRange other)
    {
        double newLow = max(low, other.low);
        boolean newOpenLow = newLow == low ? openLow : other.openLow;
        // epsilon is an arbitrary choice
        newOpenLow = nearlyEqual(low, other.low, 1E-10) ? openLow || other.openLow : newOpenLow;
        double newHigh = min(high, other.high);
        boolean newOpenHigh = newHigh == high ? openHigh : other.openHigh;
        newOpenHigh = nearlyEqual(high, other.high, 1E-10) ? openHigh || other.openHigh : newOpenHigh;
        if (newLow <= newHigh) {
            return new StatisticRange(newLow, newOpenLow, newHigh, newOpenHigh, overlappingDistinctValues(other));
        }
        return empty();
    }
@Test
    public void testIntersect()
    {
        StatisticRange zeroToTen = range(0, 10, 10);
        StatisticRange fiveToFifteen = range(5, 15, 60);
        assertEquals(zeroToTen.intersect(fiveToFifteen), range(5, 10, 10));
    }