MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / encodeLargeNumber

Function encodeLargeNumber

pkg/util/encoding/decimal.go:210–216  ·  view source on GitHub ↗

encodeLargeNumber encodes the exponent and mantissa into a buffer; only used when the exponent is larger than 10. See encodeVarExpNumber.

(negative bool, e int, m []byte, encInto []byte)

Source from the content-addressed store, hash-verified

208// encodeLargeNumber encodes the exponent and mantissa into a buffer; only used
209// when the exponent is larger than 10. See encodeVarExpNumber.
210func encodeLargeNumber(negative bool, e int, m []byte, encInto []byte) []byte {
211 if negative {
212 onesComplement(m)
213 return encodeVarExpNumber(decimalNegLarge, false, uint64(e), m, encInto)
214 }
215 return encodeVarExpNumber(decimalPosLarge, true, uint64(e), m, encInto)
216}
217
218// encodeMediumNumber encodes the exponent and mantissa into a buffer, only used
219// when the exponent is in [0, 10].

Callers 1

encodeEandMFunction · 0.85

Calls 2

encodeVarExpNumberFunction · 0.85
onesComplementFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…