Weird bug

Weird bug

Post by Markus Ilm » Tue, 24 Aug 2004 22:09:43


For some reason this causes my program to crash:

t->node[i]->position[0]=cos(Radf(i*-90.0f));

but this
t->node[i]->position[0]=cosf(Radf(i*-90.0f));
and this
t->node[i]->position[0]=cos(i*-90.0f*0.017453292519943295769236907684886f);
does not.

The function Radf looks like this:

float Radf(float d)
{
return d*0.017453292519943295769236907684886f;
}

Can it be a compiler bug?
 
 
 

Weird bug

Post by jacob navi » Wed, 25 Aug 2004 02:11:24


I did not see a crash but I do see a bad result when the intrinsic
function "cos" gets called with a float argument that is the result of a
function call.

This has been corrected and is in the new version. Thanks for your bug
report and I hope that it is OK now.