XCode 9.4.1. In debugger console I see results that seem strange to me:
(lldb) print (double)0.07
(double) $0 = 0.070000000000000007
(lldb) print [(NSDecimalNumber*)[NSDecimalNumber decimalNumberWithString:@"0.07"] doubleValue]
(double) $1 = 0.069999999999999993
The same results I see if executing in compiled code. I don't understand why result is different when converting literal 0.07 to double, and when converting decimal 0.07 to double. Why precision is lost differently?
What am I missing?