understanding complex fft results
Your expected output can be achieved when the input is as follows:

real part = cos(2*pi*[0:63]*3/64)

imag part = 0

So I think you have a couple of issues:


You are missing a factor 1/64 in your description of the input above.
You should use cos() instead of sin() for the real part of the input.


Try fixing issue 1 in your post, and try fixing issue 2 in your code.