I'm working with someone else's code, and there is a float with some unusual qualities.
If I output the float using:
NSLog(@"theFloat: %f", record.theFloat);
I get:
theFloat: 0.000000
However, if I use:
NSLog(@"(int)theFloat = %i", (int) record.theFloat);
I get:
(int)theFloat: 71411232
How do I discover the real format and value of theFloat? I know that it should contain a large number.
Incidentally, the Record class which contains the float propertizes it in such a way:
@property (assign) float* theFloat;
There is also floatLength:
@property (assign) int floatLength;
And has this method, which seems to indicate that the float is of variable length (?):
- (void) copyFloat:(float*)theF ofLength:(int)len
{
float *floatcopy = malloc(len*sizeof(float));
memcpy(floatcopy, theF, len*sizeof(float));
self.theFloat = floatcopy;
}