So here's the code:
NSDecimalNumber *test=[[NSDecimalNumber alloc] initWithInt:65];
number3=[[NSDecimalNumber one] decimalNumberByDividingBy:[[[NSDecimalNumber alloc] initWithInt:10] decimalNumberByRaisingToPower:test.integerValue]];
number3=[number3 decimalNumberByMultiplyingBy:number3];
I expected the program to terminate with an underflow exception, but it didn't. Moreover, taking an NSLog gives number3 as some huge number. If I change "test" to anything below 64, it gives the correct output (that is, 10^(-2*test)). Does anyone know what's going on here? I mean, it's pretty easy to work around, but unless I'm missing something (which is quite possible), it seems like an error in the NSDecimalNumber class.