__cropzeros
function · crt · primitive
- Address
0x40b4a8· 78 bytes, up to0x40b4f5- Signature
void __cdecl (char *buffer)- Meaning
- Removes the trailing zeros of a number text's fraction, and the point when no digit is left after it
- Confidence
- verified, proof one
- Finding
- crt/printf#the-g-form-and-its-trims
- Test
crt::crt_sprintf_float_difftest
Finding: The g form and its trims in crt: formatted output
_cftog rounds to ndec significant digits, then takes the decimal exponent after the rounding,
less one: below -4 or at least ndec, the e form with ndec - 1 digits after the point;
otherwise the f form, with every zero a negative exponent puts before the first digit, and with
the last digit dropped when the rounding carried into a new first digit. _cropzeros, for g
without #, removes the zeros before the exponent or the end of the fraction, and the point
when no digit is left after it. _forcdecpt, for # with precision 0, puts a point after the
leading digits, or before an e that comes first.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.