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)
| 198 | // encodeSmallNumber encodes the exponent and mantissa into a buffer; only used |
| 199 | // when the exponent is negative. See encodeVarExpNumber. |
| 200 | func encodeSmallNumber(negative bool, e int, m []byte, encInto []byte) []byte { |
| 201 | if negative { |
| 202 | onesComplement(m) |
| 203 | return encodeVarExpNumber(decimalNegSmall, true, uint64(-e), m, encInto) |
| 204 | } |
| 205 | return encodeVarExpNumber(decimalPosSmall, false, uint64(-e), m, encInto) |
| 206 | } |
| 207 | |
| 208 | // encodeLargeNumber encodes the exponent and mantissa into a buffer; only used |
| 209 | // when the exponent is larger than 10. See encodeVarExpNumber. |
no test coverage detected
searching dependent graphs…