Fortunately, my preferred programming language, Raku, makes creating this sort of subset trivially easy:
subset UnitInterval of Real where 0 ≤ * ≤ 1
Say you need to represent velocity in a transportation simulation. You could have a function, velocity, that looks like this:
double velocity(double v, char * of_what)
double v_jogger = velocity(8.0, "human");
double v_car = velocity(65.0, "city car");
You probably couldn't reasonably use this everywhere that you would use actual constrained types in a language that has them, but you could probably catch a lot of errors just using them in initializers.
@Clamping(0...14) var pH: Double = 7.0