summaryrefslogtreecommitdiff
path: root/src/pkg/rand/rand.go
AgeCommit message (Collapse)AuthorFilesLines
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý1-6/+0
2009-12-15rand: add explicit Int31n to avoid 64-bit divide on 32-bit machinesRuss Cox1-2/+17
use Int31n in Intn when possible. Fixes issue 390. (using 8g) Intn1000 50000000 38 ns/op Int31n1000 50000000 39 ns/op Int63n1000 20000000 114 ns/op R=r CC=golang-dev, skybrian http://codereview.appspot.com/180054
2009-12-151) Change default gofmt default settings forRobert Griesemer1-48/+48
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 4th set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180049
2009-12-09Make the operations on the global rng thread safe.Roger Peppe1-1/+21
R=r, rsc CC=golang-dev http://codereview.appspot.com/168041 Committer: Russ Cox <rsc@golang.org>
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer1-5/+5
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-3/+3
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer1-72/+24
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-10-15Define the new Rand and Source types to allow creatingDave Bort1-0/+198
isolated sources of random values. Add normal and exponential distributions. Add some tests for the normal and exponential distributions. R=rsc APPROVED=rsc DELTA=1005 (904 added, 80 deleted, 21 changed) OCL=35501 CL=35779
2009-10-09Move rand.go to rng.go to prepare for some surgery.Dave Bort1-318/+0
R=rsc APPROVED=rsc DELTA=637 (318 added, 318 deleted, 1 changed) OCL=35534 CL=35536
2009-10-07apply gofmt to rand reflect regexp rpc runtime sort strconv strings sync ↵Russ Cox1-189/+189
syscall testing time unicode unsafe utf8 R=gri DELTA=1409 (79 added, 24 deleted, 1306 changed) OCL=35415 CL=35437
2009-06-09mv src/lib to src/pkgRob Pike1-0/+318
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102