MCPcopy Create free account
hub / github.com/cockroachdb/apd / roundHalfEven

Function roundHalfEven

round.go:185–193  ·  view source on GitHub ↗
(result *BigInt, neg bool, half int)

Source from the content-addressed store, hash-verified

183}
184
185func roundHalfEven(result *BigInt, neg bool, half int) bool {
186 if half > 0 {
187 return true
188 }
189 if half < 0 {
190 return false
191 }
192 return result.Bit(0) == 1
193}
194
195func roundHalfDown(result *BigInt, neg bool, half int) bool {
196 return half > 0

Callers 1

ShouldAddOneMethod · 0.85

Calls 1

BitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…