Floating point types on iPhone
I don't have access to an iPhone yet, only working with the simulator right now...
Can anyone tell me what type of long double the iPhone supports? Is it an extended type (80 bits, 64 bit mantissa), or a 128 bit type, or the same as a regular double?
And a double is 64 bits, 53 bit mantissa, right?
If you don't know but want to find out for me, just throw the following into a .mm file in any project and replace "someLabel" with the name of a label or button object (and compile for the iPhone, not the simulator!):
#include <limits>
someLabel.text = [NSString stringWithFormat:@"%d", std::numeric_limits<long double>::digits];
Thanks,
Michel Colman
Can anyone tell me what type of long double the iPhone supports? Is it an extended type (80 bits, 64 bit mantissa), or a 128 bit type, or the same as a regular double?
And a double is 64 bits, 53 bit mantissa, right?
If you don't know but want to find out for me, just throw the following into a .mm file in any project and replace "someLabel" with the name of a label or button object (and compile for the iPhone, not the simulator!):
#include <limits>
someLabel.text = [NSString stringWithFormat:@"%d", std::numeric_limits<long double>::digits];
Thanks,
Michel Colman
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Question re: GameKit and online connection types | Malarkey | 0 | 1,744 |
Jan 8, 2010 05:12 PM Last Post: Malarkey |
|

