benilla-re systems structs docs

___multtenpow12

function · crt · primitive

Address
0x413111 · 124 bytes, up to 0x41318c
Signature
void __cdecl (Ld12Real *x, int pow, uint32_t mult12)
Meaning
Multiplies a 12-byte real by 10^pow through the octal digits of pow and the tables at 0x832490 and 0x8325f0
Confidence
verified, proof one
Name from
the community database (idb)
Finding
crt/decimal#powers-of-ten
Test
crt::crt_multtenpow12_difftest, crt::crt_i10_output_difftest

Finding: Powers of ten in crt: decimal digits

___multtenpow12(x, pow, mult12) multiplies x by 10^pow, a factor per nonzero octal digit of |pow|: digit d of group g, from the low one, is row 7g+d-1 of the table for the sign. The rows are 10^1 to 10^7, then by 8 to 10^56, by 64 to 10^448, by 512 to 10^3584, and 10^4096. A row holds the power's mantissa rounded to nearest at 64 bits and the remainder rounded to a signed 16-bit extension; an extension of 0x8000 or more takes the low dword one lower, so each factor is the power rounded to nearest at 80 bits. mult12 0 clears the extension of x. A power of 0 does nothing; 8192 or more reads past the table.

The derivation is in the doc.

Callers 2

Callees 1

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