summaryrefslogtreecommitdiff
path: root/src/pkg/rand
AgeCommit message (Collapse)AuthorFilesLines
2011-09-13Imported Upstream version 60upstream/60Ondřej Surý7-0/+1244
2011-09-13Imported Upstream version 60Ondřej Surý7-1244/+0
2011-08-03Imported Upstream version 59upstream/59Ondřej Surý1-2/+2
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý1-2/+2
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý3-10/+4
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý2-7/+7
2010-03-16gofmt: more consistent formatting of const/var declsRobert Griesemer1-2/+2
- gofmt -w src misc - only manually modified file: src/pkg/go/printer/nodes.go R=rsc CC=golang-dev, r http://codereview.appspot.com/606041
2009-12-15rand: Zipf distributed random variates.William Josephson2-0/+74
R=rsc http://codereview.appspot.com/176070 Committer: Russ Cox <rsc@golang.org>
2009-12-15rand: add explicit Int31n to avoid 64-bit divide on 32-bit machinesRuss Cox2-2/+38
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 Griesemer5-199/+199
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-09added benchmarks to rand_test.go;Roger Peppe1-0/+15
removed superfluous field name in lockedSource. R=r, rsc http://codereview.appspot.com/170043 Committer: Russ Cox <rsc@golang.org>
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-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia1-2/+2
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox1-6/+6
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer5-53/+53
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 Griesemer5-39/+39
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 Bort6-97/+921
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 Bort2-1/+1
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-08-12convert non-low-level non-google pkg codeRuss Cox1-53/+4
to whole-package compilation. R=r OCL=33070 CL=33101
2009-06-09mv src/lib to src/pkgRob Pike2-0/+378
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102