Can RNDF() return 0?
12Me21Created:
Oh... now I see the impossibility of RNDF() ever returning exactly zero. I've gotten it to return up to 25+ random decimal places. And even if all of those just happened to be zero, at least to my findings, the number will just be shifted down about another 18 decimal places (essentially making no progress).
If we assume that the source of randomness in SB is a pseudorandom bit generator, then the odds are something like 1 to 2^52 of getting a zero. We don't know this definitely though and I'm just going off limited knowledge so the challenge is just finding the right seed.
It's possible that there isn't a seed that gets zero on the first try but I don't know enough to say so.
I got it.
PRINT "RNDF()=0"
Don't know if this counts, but theoretically, RNDF() will always return 0 when the program ends with this code:
NUM=1 WHILE NUM!=0 NUM=RNDF() WENDBasically this program will run over and over again until RNDF() returns 0, so it's (technically) repeatable, but it will take a REALLY long time for it to do so.