I’m looking for a general idea. I know how IEEE float or double is stored, but I don’t know how to exactly multiply it.
One idea I have is to store the integer as a double (in float registers) and then use normal double multiply instruction.
Is there any characteristic property when multplying IEEE double by an integer? As in “you have to only multiply the exponent” or something similar?
Any help would be greatly appreciated.
You can multiply a single or double precision float by 2^n just by adding n to the exponent, but for any other multiplier value you’ll be changing the mantissa too, and that is obviously going to be non-trivial.