__cftof2
function · crt · primitive
- Address
0x40b6c4· 167 bytes, up to0x40b76a- Signature
char * __cdecl (char *buffer, int ndec, _strflt *flt, char g_fmt)- Meaning
- Writes rounded digits with the point after decpt of them, a 0 before it, and the zeros a negative decpt needs
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- crt/printf#the-e-and-f-forms
- Test
crt::crt_sprintf_float_difftest
Finding: The e and f forms in crt: formatted output
_cfltcvt sends e and E to _cftoe, f to _cftof and anything else to _cftog.
_cftoe rounds to ndec + 1 digits written after room for the sign and the point, then
_cftoe2 writes -, the first digit, the point when ndec is above 0, the rest, and the exponent
from the template e+000: E when capital, the decimal exponent less one with its sign and three
digits, and +000 for a zero. _cftof rounds to decpt + ndec digits, then _cftof2 writes -,
the integer digits or 0, and for ndec above 0 the point, then the zeros a negative exponent
puts before the first digit, at most ndec of them, then the digits.
The derivation is in the doc.
Callers 2
Callees 2
Calls and jumps by a bare address, from tables/calls.tsv.