So like above, I want to find the IEEE 754 representation of -1x10^200.
I know we can get the sign be to be 1, as we have a negative number. However I am unsure of how to find the mantissa/exponent. My initial idea was to convert 10^200 to 2^x. However x is not a whole number. So I figure we need to get a fraction somehow by separating the 10^200 somehow. Theoretically one could use very long devision, but I am looking for a more elegant answer that can be done without a high precision calculator.
−10200 cannot be represented in IEEE-754 basic 64-bit binary format. The closest number that can be represented is -99999999999999996973312221251036165947450327545502362648241750950346848435554075534196338404706251868027512415973882408182135734368278484639385041047239877871023591066789981811181813306167128854888448.
The encoding of this in the 64-bit format is 0xe974e718d7d7625a. It has a sign of − (encoded as 1 in bit 63), an exponent of 664 (encoded as 1687 or 0x697 in bits 62 to 52), and a significand of 0x1.4e718d7d7625a (encoded as 0x4e718d7d7625a in bits 51 to 0).
Given that the exponent is 664, you can find the significand by dividing 10200 by 2664, writing the result in binary, and rounding after 52 bits after the radix point. Alternately, after dividing by 2664, multiply by 252 and round to an integer.