Dear All,
I was playing around to see if I could find a smart way with the Rnd function to generate random numbers deriving from numbers already containing decimals by multiplying the input by 100000000, knowing that it will have a max of 8 decimals, and dividing it afterwards by 100000000.
But because of the limits of integers, this does not work well. Is there any known smart way to do this?
Let me make it clear .. both the input low and high and the output should be with decimals.
I found a post with a function that almost does it, but it does not work on numbers with a value below 1.
https://www.b4x.com/android/forum/threads/long-rnd.44051/#post-268155
I was playing around to see if I could find a smart way with the Rnd function to generate random numbers deriving from numbers already containing decimals by multiplying the input by 100000000, knowing that it will have a max of 8 decimals, and dividing it afterwards by 100000000.
But because of the limits of integers, this does not work well. Is there any known smart way to do this?
Let me make it clear .. both the input low and high and the output should be with decimals.
I found a post with a function that almost does it, but it does not work on numbers with a value below 1.
https://www.b4x.com/android/forum/threads/long-rnd.44051/#post-268155
Last edited: