When trying to assign NaN to a variable on an x64 processor
*dest = *(float*)&sourceNaN;
Where
unsigned char sourceNaN[] = {00,00, 0xa0, 0x7f};
The floating-point commands fld and fstp (visible during disassembly) change 0xa0 bytes to 0xe0. Thus, the receiver has an extra bit. Can someone explain why this is happening? This is a windows application.
Assembly language code:
005C9B9C mov eax,dword ptr [ebp+10h] 005C9B9F fld dword ptr [ebp-80h] 005C9BA2 fstp dword ptr [eax]
Bruce source share