diff options
author | Rob Pike <r@golang.org> | 2009-11-08 20:45:39 -0800 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2009-11-08 20:45:39 -0800 |
commit | e8ca170871566f97ffdef5e2e10c6a363258eda2 (patch) | |
tree | 636e7342341aa07e922367be4ff7e1a3d227f377 /test/bench | |
parent | 1f89e5d6e7a054a64f27e09cf7778d5dce96ee3a (diff) | |
download | go-e8ca170871566f97ffdef5e2e10c6a363258eda2.tar.gz |
delete TODO now that compiler is better at %
adjust an inconsistency in reflect/type.go's package comment
R=rsc
http://go/go-review/1026029
Diffstat (limited to 'test/bench')
-rw-r--r-- | test/bench/fasta.go | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/test/bench/fasta.go b/test/bench/fasta.go index 7919f7204..52a55447e 100644 --- a/test/bench/fasta.go +++ b/test/bench/fasta.go @@ -66,7 +66,7 @@ type AminoAcid struct { var lastrandom uint32 = 42 // Random number between 0.0 and 1.0 -func Zmyrandom() float { +func myrandom() float { const ( IM = 139968; IA = 3877; @@ -77,24 +77,6 @@ func Zmyrandom() float { return float(int32(lastrandom)) / IM; } -// TODO: delete this when compiler does the reduction for us -func -myrandom() float -{ - const ( - IM = 139968; - IA = 3877; - IC = 29573; - S = 46; - IM1 = ((1<<S) + IM) / IM; - ) - - n := (lastrandom * IA + IC); - q := uint32((uint64(n) * IM1) >> S); - lastrandom = n - q*IM; - return float(int32(lastrandom)) / IM; -} - func AccumulateProbabilities(genelist []AminoAcid) { for i := 1; i < len(genelist); i++ { genelist[i].p += genelist[i-1].p; |