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

Function floatEquals

model/transaction_test.go:29–32  ·  view source on GitHub ↗

Helper function for float64 comparisons

(a, b float64)

Source from the content-addressed store, hash-verified

27
28// Helper function for float64 comparisons
29func floatEquals(a, b float64) bool {
30 const epsilon = 1e-9
31 return math.Abs(a-b) < epsilon
32}
33
34// Helper function for big.Int map comparisons
35func bigIntMapsEqual(got, want map[string]*big.Int) bool {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected