update top of histogram

This commit is contained in:
NunoSempere 2024-06-11 18:02:18 -04:00
parent 9278ce8349
commit 16192861a0

View File

@ -302,7 +302,7 @@ func printElectoralCollegeHistogram(samples []int) {
p := float64(count) / float64(len(samples)) * 100 p := float64(count) / float64(len(samples)) * 100
cp += p cp += p
if i > 130 && i < 400 { if i > 130 && i < 538 {
fmt.Printf("[ %2d, %4d): %s %.2f%% (%.0f%%)\n", i, i+1, barString(bar_length), p, cp) fmt.Printf("[ %2d, %4d): %s %.2f%% (%.0f%%)\n", i, i+1, barString(bar_length), p, cp)
} else if p >= 0.01 { } else if p >= 0.01 {
fmt.Printf(">0.01 probability outside of domain, you might want to change histogram parameters\n") fmt.Printf(">0.01 probability outside of domain, you might want to change histogram parameters\n")