arbitrary domains support
Technically you don't need to take t_n as input to the functions, but giving it and treating a shift/scale of domain helps make the code a lot more user-friendly. Also added numerous error messages to steer users in the right direction vis-a-vis sampling, since it's easy to goof up.