Re: 64 bit
Re: 64 bit
- Subject: Re: 64 bit
- From: Alastair Houghton <email@hidden>
- Date: Thu, 13 Dec 2007 12:33:48 +0000
On 13 Dec 2007, at 10:55, Perry Winkel wrote:
i need to multiply, divide, add and stuff on large (signed) integers
i was thinking about using 64 bit numbers
what is the strategy to follow within the Xcode/Darwin paradigm on
doing 64 bit integer math?
Use the "long long" type. Also, the long type becomes 64-bit on
(and only on) 64-bit architectures.
tried that, but got an error telling me
"ISO c++ does not support long long"
seems like i have to enable/disbable some stuff but what?
I think you've got "treat warnings as errors" enabled, and you've also
enabled
"pedantic warnings". You probably don't want pedantic warnings
enabled; they
aren't really useful in most instances.
Also, if you know you want 64-bit numbers, I'd be inclined to use
int64_t and/or
uint64_t (you'll have to #include <stdint.h> first) rather than long
long. Or
maybe int_fast64_t since your goal here is performance and you only
care about
having *at least* 64 bits.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >64 bit (From: email@hidden) |
| >Re: 64 bit (From: Nick Zitzmann <email@hidden>) |
| >Re: 64 bit (From: Perry Winkel <email@hidden>) |