MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / floatMapToBigIntMap

Function floatMapToBigIntMap

model/transaction_test.go:57–63  ·  view source on GitHub ↗

Helper to convert map of float64 to map of *big.Int with precision applied

(floatMap map[string]float64, precision int64)

Source from the content-addressed store, hash-verified

55
56// Helper to convert map of float64 to map of *big.Int with precision applied
57func floatMapToBigIntMap(floatMap map[string]float64, precision int64) map[string]*big.Int {
58 bigIntMap := make(map[string]*big.Int)
59 for k, v := range floatMap {
60 bigIntMap[k] = floatToBigInt(v, precision)
61 }
62 return bigIntMap
63}
64
65func TestCalculateDistributionsPrecise(t *testing.T) {
66 tests := []struct {

Callers 1

Calls 1

floatToBigIntFunction · 0.85

Tested by

no test coverage detected