Objectmix
Tags Register Mark Forums Read

Re: rand() v. rand(0.1) ? : RUBY

This is a discussion on Re: rand() v. rand(0.1) ? within the RUBY forums in Programming Languages category; Hi, In message "Re: rand() v. rand(0.1) ?" on Sat, 15 Sep 2007 20:35:37 +0900, Chad Perrin <perrin @ apotheon.com> writes: |Speaking of which . . . obviously rand() doesn't produce a truly random |number, but it's reasonably close for some purposes. I'm curious about |just how far off it is, though -- because I'm curious about how |appropriate it is to use to simulate dice-rolling for gaming software (in |the "roleplaying game" sense of the term "gaming") in Ruby's |implementation. It uses Mersenne Twister algorithm which has a period of 2**19937-1. matz....


Object Mix > Programming Languages > RUBY > Re: rand() v. rand(0.1) ?

Reply

 

LinkBack Thread Tools
  #1  
Old 09-15-2007, 07:09 AM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Re: rand() v. rand(0.1) ?

Hi,

In message "Re: rand() v. rand(0.1) ?"
on Sat, 15 Sep 2007 20:35:37 +0900, Chad Perrin <perrin@apotheon.com> writes:

|Speaking of which . . . obviously rand() doesn't produce a truly random
|number, but it's reasonably close for some purposes. I'm curious about
|just how far off it is, though -- because I'm curious about how
|appropriate it is to use to simulate dice-rolling for gaming software (in
|the "roleplaying game" sense of the term "gaming") in Ruby's
|implementation.

It uses Mersenne Twister algorithm which has a period of 2**19937-1.

matz.

Reply

Thread Tools


Similar Threads

Thread Thread Starter Forum Replies Last Post
Re: rand() usenet TCL 4 10-03-2007 11:12 AM
Re: rand() usenet TCL 0 10-03-2007 09:31 AM
Re: rand() usenet TCL 3 10-03-2007 07:36 AM
Re: rand() usenet TCL 2 10-02-2007 01:05 PM
Re: will we have rand(m, n)? usenet RUBY 2 09-15-2007 10:45 AM


All times are GMT -5. The time now is 05:00 PM.

Managed by Infnx Pvt Ltd.