Just realized that I am getting errors on simple math if I mixed Integer with floats in iPhone SDK on the Simulator. Two examples:
float testVal1 = 10 + 5/10;
//evaluates to 10 instead of 10.5 unless I use explicit 10.0f..
// Problem Code mixed float int
NSUInteger jvalue = 2312345;
NSInteger testVal2 = (jvalue - 2512345); // evaluates correctly
float testVal3 = (jvalue - 2512345); // fails with some huge bogus value
I thought that in mixed mode expression it will convert to float values. Seems it is all or nothing while using floats, no mixing
What is going wrong here ?