I need to get a random float number between 0 and 1 (probability) to feed into my batch script.
It seems %RANDOM% only returns integers? I tried dividing by max number (around 32000) and I just get back an int.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Batch files do not support floating point arithmetic. There are some possible workarounds discussed in a few answers to these questions on StackOverflow: