roundrnd

emlib.mathlib.roundrnd(x)[source]

Round x to its nearest integer, taking the fractional part as the probability

3.5 will have a 50% probability of rounding to 3 or to 4 3.1 will have a 10% probability of rounding to 3 and 90% prob. of rounding to 4

Return type:

float