G
googlegroups11
I am modifying somebody's program. There is a function that returns an
int. I printf this and it is some value always less than 2500 -- it is
limited by this value so no overflow is happenning. Now when I assign
this value to a float i.e.,
float myfloat = this_integer;
or
float myfloat = (float) this_integer;
myfloat is always nan.
I am on 32-bit machine. As I said, I can see the int value, it is what
I expect, but when I assign it to a float it becomes nan.
Can someone give any pointers?
Thanks
int. I printf this and it is some value always less than 2500 -- it is
limited by this value so no overflow is happenning. Now when I assign
this value to a float i.e.,
float myfloat = this_integer;
or
float myfloat = (float) this_integer;
myfloat is always nan.
I am on 32-bit machine. As I said, I can see the int value, it is what
I expect, but when I assign it to a float it becomes nan.
Can someone give any pointers?
Thanks