Strange calculation problem in C multiply by 1.2 fails
- by DoomStone
I have this c code, where i need to calculate a dobule from a long.
double result;
long t2_value;
t2_value = 72;
result = t2_value * 1.2;
Now this code crashes at "result = t2_value * 1.2;" only with the error "Vector 0000000006".
Here is the strange thing, if i replace
result = t2_value * 1.2;
with
result = 72 * 1.2;
evything works just as it should, i have tryed type casting t2_value as an double
result = ((double)t2_value * 1.2);
or making it an int istead of a long, but nothing helps.