benilla-re systems structs docs

SStrToFloat

function · storm · primitive

Address
0x64aaa0 · 434 bytes, up to 0x64ac51
Signature
float __stdcall (const char *string)
Meaning
Reads a decimal float: an optional minus, digits, a fraction and an exponent at 53 bits; 0.0 and error 0x57 for null
Confidence
verified, proof two
Name from
the community database (idb)
Finding
storm/strings#float-grammar
Test
storm::sstrtofloat_whole

Finding: Float grammar in storm: string conversions

SStrToFloat(s) (0x64aaa0) reads one optional -, with no space skipped and no +; then decimal digits; then a . and decimal digits; then an exponent; each part optional, and the read stops at the first byte that fits none. A . with no digit after it is still passed, so 1.e2 reads as 1e2. The exponent is e or E, one optional +, and SStrToInt of the rest, so 1e+-2 reads as 1e-2. 12 and +12 read 0, .5 as 0.5, - as −0.0, and a null s sets error 0x57 and answers 0.0. A digit is a byte, sign-extended, minus '0' below 10 unsigned.

The derivation is in the doc.

Callers 45

Callees 4

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