ldexp - Multiply by 2 to the power n

0 comments

Check the OpenCL spec and see if your calculation can be substituted by one of its built-in functions.

I used to write

y = x * (1 << n);

for x is float and n is integer. But I just found that there is a function doing this job! And FYI, C <math.h> has this function too!