encodeSmallNumber encodes the exponent and mantissa into a buffer; only used when the exponent is negative. See encodeVarExpNumber.
(negative bool, e int, m []byte, encInto []byte)
| 203 | // encodeSmallNumber encodes the exponent and mantissa into a buffer; only used |
| 204 | // when the exponent is negative. See encodeVarExpNumber. |
| 205 | func encodeSmallNumber(negative bool, e int, m []byte, encInto []byte) []byte { |
| 206 | if negative { |
| 207 | onesComplement(m) |
| 208 | return encodeVarExpNumber(decimalNegSmall, true, uint64(-e), m, encInto) |
| 209 | } |
| 210 | return encodeVarExpNumber(decimalPosSmall, false, uint64(-e), m, encInto) |
| 211 | } |
| 212 | |
| 213 | // encodeLargeNumber encodes the exponent and mantissa into a buffer; only used |
| 214 | // when the exponent is larger than 10. See encodeVarExpNumber. |
no test coverage detected
searching dependent graphs…