fix: random distribution and range

- Non-fp numbers didn't include the upper limit;
- Fp numbers included numbers beyond the upper limit;
fixing test: template was using a wrong regex