avoid a lot of try-catch that are costly
much faster gamma sampling with Maths3