The technical reason that floating-point ranges are deprecated is that precise addition of
Float is not guaranteed. In particular, it fails on addition of numbers with a decimal fraction, even if that fraction is “not tiny”, like
0.1. The library should not contain methods that mysteriously give you unreliable behavior, hence the deprecation.
The BigDecimal approach solves the issue because the math is performed without imprecision.
There’s no advantage to trying epsilon-shifting schemes because then you may as well just use integers to represent your decimal fraction, for example in the manner that Oliver demonstrated.
One could envision a macro that did the right thing for literals.