Typecasting

Hello,

I want to typecast an array of values from short to float. I am doing the below to do that

float pfI2[3],pfJ2[3],pfK2[3];
pfI2[3]= (float) pfI[3];
pfJ2[3]= (float) pfJ[3];
pfK2[3]= (float) pfK[3];

but when I am doing that, I am not able to get the float value as it is before typecasting.

what could be reason?

Do we loss values in typecasting?

what is the correct way of typecasting?

The result I am getting is attached here.

Related