• Advertisement
Sign in to follow this  

64-bit C++ compiler

This topic is 4328 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have spent the past 3 hours scouring the internet for a free, 64-bit compiler and I seem to have had no luck. I need to use the "long long" data type, and none of the compilers I've downloaded seem to support it. Can anyone point me in the right direction?

Share this post


Link to post
Share on other sites
Advertisement
Microsoft's compilers (including the free ones) support __int64 which is a 64-bit integer.

Share this post


Link to post
Share on other sites
I'm using Windows. I went to the GCC website but it was an absolute mess and I got lost. I'll give Mingw a try.

Share this post


Link to post
Share on other sites
Ah, I didn't know you had to put LL at the end of a long long. That works for me.

Are there any limitations to long long that don't apply to the other data types? In particular, I'm doing a lot of work with the mod function.

Share this post


Link to post
Share on other sites
Well, remember that 64-bit arithmetic is not as fast as 32-bit integer numbers.
It is, of course fast enough for most things, but, for examples it would be
unwise making all integer numbers in your program a 'long long' on a 32-bit platform.

Waht do you want to use the 'long long' values for?

Share this post


Link to post
Share on other sites
Quote:
Original post by Wutalife37
Ah, I didn't know you had to put LL at the end of a long long. That works for me.

Are there any limitations to long long that don't apply to the other data types? In particular, I'm doing a lot of work with the mod function.


Do you only need long long for some encryption methods? The 64-bit and "a lot with mod" makes me think that.

Unless you really need the 64-bit byte-code getting a compiler for that is most likely redundant.



Share this post


Link to post
Share on other sites
Well I'm doing some tests with very large numbers, so I have to do a series of operations with every number up to 10^15 or so.

Share this post


Link to post
Share on other sites
if you go to cwiki.org and search for large number library, you will find my STL-based version. I used it for an RSA implementation.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
on windows platforms, especially msvc, there's LONGLONG. it is's typedef'd union that lets you access either a long long or an __in64, depending on what you want to do with it.
that said, forget about using platform specific stuff. __in64 or it's boost counterparts are the way to go

Share this post


Link to post
Share on other sites
Quote:
Original post by Wutalife37
Well I'm doing some tests with very large numbers, so I have to do a series of operations with every number up to 10^15 or so.


Why won't a double work?

Share this post


Link to post
Share on other sites
double doesn't work with %, AFAIK

I searched for the large number library and couldn't find it. If anyone has some suggestions on how to speed up the process it would be much appreciated. By my current estimates, it will take the program about a week to run.

Share this post


Link to post
Share on other sites
I would suggest getting savvy with inline assembly. It offers a lot of tricks that are not available to c/c++. One that may be a big help to you is that when you divide, you get the modulus for free.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement