1. 09 Dec, 2012 1 commit
    • Russ Cox's avatar
      time: add Round and Truncate · 00cd6a3b
      Russ Cox authored
      New in Go 1 will be nanosecond precision in the result of time.Now on Linux.
      This will break code that stores time in external formats at microsecond
      precision, reads it back, and expects to get exactly the same time.
      
      Code like that can be fixed by using time.Now().Round(time.Microsecond)
      instead of time.Now() in those contexts.
      
      R=golang-dev, bradfitz, iant, remyoudompheng
      CC=golang-dev
      https://golang.org/cl/6903050
      00cd6a3b
  2. 08 Dec, 2012 2 commits
  3. 07 Dec, 2012 2 commits
    • Russ Cox's avatar
      math/rand: add example / regression test · b99161e4
      Russ Cox authored
      This makes sure the outputs do not change for a fixed seed.
      See also https://golang.org/cl/6905049.
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/6907048
      b99161e4
    • Russ Cox's avatar
      undo CL 6845121 / 79603a5e4cda · ff2534e0
      Russ Cox authored
      This changes the output of
      
      rand.Seed(0)
      perm := rand.Perm(100)
      
      When giving the same seeds to Go 1.0 and Go 1.1 programs
      I would like them to generate the same random numbers.
      
      ««« original CL description
      math/rand: remove noop iteration in Perm
      
      The first iteration always do `m[0], m[0] = m[0], m[0]`, because
      `rand.Intn(1)` is 0.
      
      fun note: IIRC in TAOCP version of this algorithm, `i` goes
      backward (n-1->1), meaning that the "already" shuffled part of the
      array is never altered betweens iterations, while in the current
      implementation the "not-yet" shuffled part of the array is
      conserved between iterations.
      
      R=golang-dev
      CC=golang-dev
      https://golang.org/cl/6845121
      
      »»»
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/6905049
      ff2534e0
  4. 06 Dec, 2012 17 commits
  5. 05 Dec, 2012 7 commits
  6. 04 Dec, 2012 10 commits
  7. 03 Dec, 2012 1 commit