Hi, I am looking for a straight forward way to work direclty on the byte-level representation of floats, in order to perform some simple integer arithmetic operations on them. If a is a floating point number , then I would perform some integer arithmetics on a1=int(a), where a1 is represented by the same 32 bits as a. In my case, each thread would load one float a, perform some floating point operations in the first phase, and then switch to integer view and perform some integer arithmetic operations. What would be the best way to do something like that?

Further, I’ve read that CUDA’s float is not fully IEEE compatible. How much does it influence the arithmetic operations, and can it be ensured that the following operations would give exact same value for all variables:

CUDA:

float A, B

float C=B-A

Transfer A to PC

Transfer C to PC

HOST PC(Intel): float B=A+C