Created
March 17, 2018 14:31
-
-
Save seiflotfy/fb3a01c5e3fba89874ea32b7ea249e8b to your computer and use it in GitHub Desktop.
simpler version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tlc := New() | |
llb := NewBeta() | |
// Make sure tlc is not using sparse | |
tlc.sparse = false | |
tlc.toNormal() | |
// lets rebase 10 times | |
for n := uint8(1); n <= 5; n++ { | |
// make sure we increment all the registers by 1 this iterations (to guarantee a rebase after the loop is done) | |
for i := uint32(0); i < tlc.m; i++ { | |
llb.insert(i, n) | |
tlc.insert(i, n) | |
} | |
before := tlc.Estimate() | |
tlc.insert(0, 32) | |
llb.insert(0, 32) // has no effect but still for code simplicity | |
fmt.Println("iteration", n, | |
"\ntailcut base: ", tlc.b, | |
"\ntailcut est (before rebase):", before, | |
"\ntailcut est (after rebase): ", tlc.Estimate(), | |
"\nloglogbeta est: ", llb.Estimate(), "\n") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment