MCPcopy Create free account
hub / github.com/dolthub/doltgresql / encodeLargeNumber

Function encodeLargeNumber

postgres/parser/encoding/decimal.go:228–234  ·  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

226// encodeLargeNumber encodes the exponent and mantissa into a buffer; only used
227// when the exponent is larger than 10. See encodeVarExpNumber.
228func encodeLargeNumber(negative bool, e int, m []byte, encInto []byte) []byte {
229 if negative {
230 onesComplement(m)
231 return encodeVarExpNumber(decimalNegLarge, false, uint64(e), m, encInto)
232 }
233 return encodeVarExpNumber(decimalPosLarge, true, uint64(e), m, encInto)
234}
235
236// encodeMediumNumber encodes the exponent and mantissa into a buffer, only used
237// 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