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

Function encodeLargeNumber

pkg/util/encoding/decimal.go:215–221  ·  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

213// encodeLargeNumber encodes the exponent and mantissa into a buffer; only used
214// when the exponent is larger than 10. See encodeVarExpNumber.
215func encodeLargeNumber(negative bool, e int, m []byte, encInto []byte) []byte {
216 if negative {
217 onesComplement(m)
218 return encodeVarExpNumber(decimalNegLarge, false, uint64(e), m, encInto)
219 }
220 return encodeVarExpNumber(decimalPosLarge, true, uint64(e), m, encInto)
221}
222
223// encodeMediumNumber encodes the exponent and mantissa into a buffer, only used
224// 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…