benilla-re systems structs docs

RsqrtEstimateInPlaceDouble

function · cmath · unreached

Address
0x456380 · 18 bytes, up to 0x456391
Signature
double __fastcall (double *x, uint32_t magic)
Meaning
Stores into the double a high dword of the magic less half of its own and returns it
Confidence
verified, proof two
Finding
cmath/scalars#reciprocal-and-root-estimates

Finding: Reciprocal and root estimates in cmath: scalars

0x456330 takes a magic number in ecx and a float on the stack (ret 4) and returns in st0 the float whose bits are the magic less half of the argument's bits (shr 1, masked with 0x3fffffff). It is the seed of a reciprocal square root. 0x456350 does the same for a double, shifting its high dword. Four siblings subtract the whole bit pattern instead, which seeds a reciprocal: 0x4563a0 and 0x4563b0 take the value on the stack, 0x4563c0 and 0x4563d0 work in place through ecx with the magic in edx, and 0x456370 and 0x456380 are the in-place forms of the root seed.

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.