Export to GitHub

clojure - issue #91

Documentation for rand inaccurate


Posted on Mar 5, 2009 by Happy Lion

A minor issue.

The doc says that the number is between 0 and 1, but if the parameter n is not 1, then this is not accurate.

Reproduce as below in the REPL.

user=> (doc rand)

clojure.core/rand ([] [n]) Returns a random floating point number between 0 (inclusive) and 1 (exclusive). nil user=> (rand 100000) 44028.44964067226

Comment #1

Posted on Apr 10, 2009 by Massive Dog

fixd in r1343 - thanks for the report

Status: Fixed

Labels:
Type-Defect Priority-Low