SAS can ranuni (0) return 0?

Is it possible for the ranuni (0) function to return 0? I know that the theoretical probability is zero, but in fact it depends on the generator.

+4
source share
2 answers

I would say NO. The documentation indicates the range (0,1). Note the use of () instead of [], which is a normal notation when the endpoints of an interval are excluded.

A newer function RAND('uniform')is a better random number generator than RANUNI(). The documentation for this function clearly states that the range is 0 <x <1.

+3
source

No, it cannot return zero (or one).

SAS :

SEED = mod( SEED * 397204094, 2**31-1 )
RETURN (SEED/(2**31-1))

2**31-1 - , 2 ** 31-1 (- modulo), mod([anything],2**31-1) 0.

+2

Source: https://habr.com/ru/post/1613057/


All Articles