ComicIDIOT, the (new?) generally-accepted replacement for an idle For( loop is indeed rand(#), as Souvik1997 noted. The larger the value of #, the longer the list of random values that the calculator generates, and the more time is wasted.
Oh? Nice. Does rand( ever through out anything higher than one? It's always been numbers like .20593452 in my memory.
comicIDIOT wrote:
Oh? Nice. Does rand( ever through out anything higher than one? It's always been numbers like .20593452 in my memory.
rand without parenthesis outputs a single value between [0,1) (ie, less than 1, greater than or equal to 0). randInt(A,B) returns a random integer between A and B, inclusive. rand+randInt(A,B-1 returns a random number between [A,B). rand(Q) returns a list of numbers, Q elements long, containing elements as if rand had been called Q times.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 6 of 6
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement