cocoa - converting a double to string

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-03-18T15:44:01Z Indexed on 2010/03/18 15:51 UTC
Read the original article Hit count: 415

I have a double number and I would like to convert it to string.

The number is, for example, something like

24.043333332154465777...

but if I convert it to string using something like

NSString *myString = [NSString stringWithFormat:@"%f", myDouble];

The string is just

24.043333

how do I get a full string the corresponds to the whole double number? What other methods do I have to convert this?

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about iphone