Use the reduced-denominator function unbounded on every interval:
Every value is a finite real number. In any nondegenerate interval , its interior contains infinitely many rational numbers, whereas there are only finitely many reduced fractions in with denominator at most any fixed . Some rational number in therefore has denominator exceeding . Hence the function is unbounded on every such interval. It reverses the positive values of the Thomae function rather than requiring an infinite value at any point.
At a nonzero rational in lowest terms, irrational points approach with function value zero, whereas , so is discontinuous. At zero, for nonzero , hence and continuity follows.
At an irrational , given , only finitely many rationals in a bounded neighbourhood have reduced denominator . Choose a neighbourhood avoiding those points; throughout it, . Consequently the continuity set is . This is a variant of the Thomae function.
On , use reduced representations of rational numbers with positive denominator. This reverses the nonzero values of the Thomae function, while leaving its values at irrational numbers zero. Every interval of positive length contains rational numbers of arbitrarily large reduced denominator: there are only finitely many fractions in with denominator at most a fixed , whereas any open interval contains infinitely many rational numbers. Thus this function taking finite real number values is unbounded on every nondegenerate subinterval.