I have the following function defined in my stan

```
functions {
real weibull_trunc_rng(real alpha, real sigma, real lb){// function to generate truncated weibull;
real lp = weibull_cdf(lb, alpha, sigma);
real u = uniform_rng(lp, 1);
real y = sigma * (-log1m(u))^inv(alpha);
return y;
}
}
```

but I am getting the following error message:

[1] “Error in sampler$call_sampler(args_list[[i]]) : "

[2] " Exception: Exception: uniform_rng: Upper bound parameter is 1, but must be greater than 1 (in ‘model5efd3f9032ef_evt_pred_weibull’ at line 10)”

[3] " (in ‘model5efd3f9032ef_evt_pred_weibull’ at line 75)"

what is causing this?