In comp.lang.objective-c sapsi <[EMAIL PROTECTED]> wrote: > The first output in the console is 40.4 and the second > -40.40000152587891. > > If i change the NSLog(s) to "%f",[n floatValue] (and the second > likewise) the first is 40.400002 and the second is -40.400002.
I assume you are complaining about the fact that it's not printing exactly 40.4, and wondering where the error is coming from. (It helps if you actually state this yourself, so we don't have to assume it, rather than just laying out the circumstances.) The answer is that floating point numbers are inherently imprecise. Read through this essential resource: http://docs.sun.com/source/806-3568/ncg_goldberg.html -- Michael Ash Rogue Amoeba Software -- http://mail.python.org/mailman/listinfo/python-list