Fix build errors.
This commit is contained in:
parent
2ebc2f904f
commit
91ebe9ddc3
@ -1,6 +1,7 @@
|
||||
package auctionsim
|
||||
|
||||
import (
|
||||
"math"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
@ -75,7 +76,7 @@ func Summarize(price float64, allBidders []Bidder) *ResultSummary {
|
||||
rube = allBidders[maxIdx]
|
||||
}
|
||||
return &ResultSummary{
|
||||
Bidders: len(allbidders),
|
||||
Bidders: len(allBidders),
|
||||
Price: price,
|
||||
WinnerValue: winner.Value,
|
||||
WinnerProfit: winner.Value - price,
|
||||
@ -108,7 +109,7 @@ func ResultSummaryCSVHeader() []string {
|
||||
}
|
||||
|
||||
func csvFloat(f float64) string {
|
||||
return strconv.FormatFloat(f, 'g', CSVPrecision)
|
||||
return strconv.FormatFloat(f, 'g', CSVPrecision, 64)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -121,11 +122,11 @@ func (s *ResultSummary) CSVRecord() []string {
|
||||
csvFloat(s.Price),
|
||||
csvFloat(s.WinnerValue),
|
||||
csvFloat(s.WinnerProfit),
|
||||
strconv.Itoa(LosersWithRegrets),
|
||||
strconv.Itoa(s.LosersWithRegrets),
|
||||
csvFloat(s.HighestValue),
|
||||
csvFloat(s.HighestValuatorBid),
|
||||
csvFloat(s.MissedProfit),
|
||||
csvFloat(s.ValueDelta),
|
||||
strconv.Itoa(HighestValueRank),
|
||||
strconv.Itoa(s.HighestValueRank),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user