benilla-re systems structs docs

__cftoe

function · crt · primitive

Address
0x40b54c · 97 bytes, up to 0x40b5ac
Signature
char * __cdecl (double *value, char *buffer, int ndec, int caps)
Meaning
Writes a double in the e form with ndec digits after the point: __fltout2, __fptostr, then __cftoe2
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 1

Callees 3

Calls and jumps by a bare address, from tables/calls.tsv.