Possible Duplicates:
Objective-C - float checking for nan
Determine if NSNumber is NaN
I have a problem with NaN values in CGFloat, how can I check if the number is valid?
the only way so far that works is:
if ([[NSString stringWithFormat:@"%f", output] isEqualToString:@"nan"]) {
output = 0;
}
which is not a nice solution at all! :) ... and I am pretty sure that there is something else I should do instead.