Home:ALL Converter>Rotate Right operation on integer data using floating point operations?

Rotate Right operation on integer data using floating point operations?

Ask Time:2011-05-09T12:58:09         Author:user744528

Json Formatter

I'd like to take a value with an unsigned integer representation, and somehow, using floating point operations, perform a rotate right shift bitwise operation.

Take a look at the cleverness used here: http://en.wikipedia.org/wiki/Fast_inverse_square_root This uses a magic value and some tricks to perform an operation on a floating point number using integer operations. What I want is the opposite; the hardware I am using is heavily optimized for floating point but performs poorly with integer operations. The algorithm is sha256, which makes heavy use of the rotate right operation.

Author:user744528,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/5932689/rotate-right-operation-on-integer-data-using-floating-point-operations
yy