Problem: subraction giving very strange results

Show us the complete code. If the vectors are defined as float arrays why do you have to cast them to (float *)? You see, we have to see all the code to help you.