W
woessner
Does anyone know of a fast way to multiply floating point numbers by
powers of two? Conceptually, all you need to do is add to the
mantissa. But can I write C code (or x86 assembly) to accomplish this
without a full-blown multiply?
For example, I'd like to be able to do the following very quickly:
double x;
double y;
x = 42.13;
y = (1 << 9) * x;
Thanks in advance,
Bill
powers of two? Conceptually, all you need to do is add to the
mantissa. But can I write C code (or x86 assembly) to accomplish this
without a full-blown multiply?
For example, I'd like to be able to do the following very quickly:
double x;
double y;
x = 42.13;
y = (1 << 9) * x;
Thanks in advance,
Bill