Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > 64-bit integers support

Reply
Thread Tools

64-bit integers support

 
 
Vladislav Borovikov
Guest
Posts: n/a
 
      03-22-2005
Hi all!

I use C compiler, which doesn't support operations with 64-bit
integers. Of course, I should use a structure with two 32-bit words
instead of a 64-bit integer. But how to implement basic arithmetic
operations such as multiplication and division? It's too difficult for
me. Do you know any algorithms for that purpose?
Maybe somewhere can be found a source code in the public domain?

Thanks in advance,
Vladek.

 
Reply With Quote
 
 
 
 
Robert Gamble
Guest
Posts: n/a
 
      03-23-2005
On Tue, 22 Mar 2005 07:20:41 -0800, Vladislav Borovikov wrote:

> Hi all!
>
> I use C compiler, which doesn't support operations with 64-bit
> integers. Of course, I should use a structure with two 32-bit words
> instead of a 64-bit integer. But how to implement basic arithmetic
> operations such as multiplication and division? It's too difficult for
> me. Do you know any algorithms for that purpose?
> Maybe somewhere can be found a source code in the public domain?


Your best bet is probably to try to find a compiler for your platform that
supports 64-bit integers or use a Big-Num library. You didn't mention
your platform but the open source GMP library might meet your needs, it is
available at http://swox.com/gmp/. A Google search would turn up
additional results.

> Thanks in advance,
> Vladek.


Rob Gamble

 
Reply With Quote
 
 
 
 
Tor Rustad
Guest
Posts: n/a
 
      03-23-2005
"Vladislav Borovikov" <> wrote in message
> Hi all!
>
> I use C compiler, which doesn't support operations with 64-bit
> integers. Of course, I should use a structure with two 32-bit words
> instead of a 64-bit integer. But how to implement basic arithmetic
> operations such as multiplication and division? It's too difficult for
> me. Do you know any algorithms for that purpose?
> Maybe somewhere can be found a source code in the public domain?


Do a search for multi-precision library... GNU MP is one, personally
I have used Lenstra's freeLIP package, which is _very_ fast.

However, if you primary want to learn doing the MP calculations
yourself, take a look in "Numerical Recipes in C".. the book is
available online, and has simpler algorithms than what freely has.

--
Tor <torust AT online DOT no>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IEEE 1284.4 generic printing support / HP LaserJet printer support Manuel Lopez Windows 64bit 13 10-18-2009 12:51 PM
Question for IT Support/Managers - Providing Personal PC Support Big Dog Microsoft Certification 4 01-16-2008 01:33 AM
Anti Virus Support + Japanese character support =?Utf-8?B?Q2hyaXMgQnVzaA==?= Windows 64bit 6 07-31-2005 09:57 AM
ANN: SCons.0.96 adds Fortran 90/95 support, better Qt support,platform-independent file system actions, improved debugging, lots more Steven Knight Python 0 08-18-2004 03:57 PM
Getting Third Party Component Suppliers to support NUnit and NUnitASP to support test driven development in web pages Nick Zdunic ASP .Net 0 11-05-2003 10:45 AM



Advertisments