Skip to content

Comment on Show HN: I made a calculator that works over disjoint sets of intervals

Comments

The division example is a perfect illustration of why this matters — [-∞, +∞] as an answer is technically correct but operationally useless. The union representation actually preserves information that standard interval arithmetic throws away. Curious about the composition behavior: if you chain multiple operations that each produce disjoint unions, does the number of intervals in the result grow exponentially in the worst case? And how does the implementation handle that — is there a merging/simplification step, or do you let it grow? The tan() implementation must have been painful given the infinite number of discontinuities.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.