InitSoftFloatOne
function · cmath · orchestration
- Address
0x762e20· 15 bytes, up to0x762e2e- Signature
void __cdecl (void)- Meaning
- Stores the software float of 1 in its global; a static initializer
- Confidence
- verified, proof one
- Finding
- spell/records#software-floats
Finding: Software floats in spell: records
Five routines compute on single-precision bit patterns with integer instructions. They have no case for infinity or NaN, and none checks exponent overflow.
| routine | result |
|---|---|
0x761260 int to float | 0 for 0; else sign, exponent from the top set bit, the magnitude shifted to 24 bits, low bits dropped |
0x760be0 multiply | with either fraction 0: 0 if either exponent is 0, else the exponent sum with the other fraction; else the high word of the two left-aligned 24-bit significands, truncated; either way 0 when the exponent sum less the bias, before any carry, is below 1 |
0x760e20 add | the other operand when an exponent is 0; the larger when exponents differ by 23 or more; else two's-complement significands with a guard bit, the smaller sar-aligned, summed, renormalized by shifts, truncated; a zero sum is +0 |
0x760fb0 floor | exact for finite inputs; under 1 in magnitude, −1.0 for a negative nonzero value, else +0.0 |
0x761040 ceil | exact for finite inputs; under 1 in magnitude, +0.0 for a negative nonzero value, else 1.0, zero included |
The derivation is in the doc.
Callers 1
- 0x762e10 cmath
Callees 1
- SoftFloatFromInt cmath
Calls and jumps by a bare address, from tables/calls.tsv.