Price list behind API: Difference between revisions

→‎{{header|Go}}: Fixed corner case.
(→‎{{header|Wren}}: Fixed corner case.)
(→‎{{header|Go}}: Fixed corner case.)
Line 21:
import (
"fmt"
"log"
"math"
"math/rand"
Line 70 ⟶ 71:
pmin := pmax + 1
pmax, pcount = get5000(prices, pmin, max, n)
if pcount == 0 {
log.Fatal("Price list from", pmin, "has too many with same price.")
}
res = append(res, [3]float64{pmin, pmax, float64(pcount)})
}
9,482

edits