bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gmp] a very simple example


From: Ferdinand Moldenhauer
Subject: [Bug-gmp] a very simple example
Date: Fri, 04 Aug 2000 17:06:27 +0200

Hi everybody,

for a while (a week) I try to use gmp-3.0, but with no success.
Although I think, that I am in the wrong discussion group I hope that
anybody of you can help me.

The problem is very simple:
I want to add 999,999,999,999,999,999,999 + 2 and the result write to
the standard
output.

What I did is:

#include "d:\gmp-3.0\gmp.h"
int main()
{
  mpz_t aa, bb, cc;
  mpz_init( aa );  mpz_init( bb );  mpz_init( cc );

  mpz_add( cc, aa, bb );
  mpz_out_str( stdout, 36, cc );

  mpz_clear( aa ), mpz_clear( bb ); mpz_clear( cc );
  return 0;
} // main

Which files have to be included in the project? I included almost all of
the C-source-files out of the directories MPZ and MPN/GENERIC. But it
doesn't work.
I read the GNU MP book by Torbjörn Granlund through and througt, but I
am as wise as before.

I do not want to use the fastest assembler code, slow c code is
sufficient for my computations I think.

I use WinNT and C (Microsoft VC 6.0, Borland C 5.0 and Borland Turbo C
3.1). None of them compiles the source.

It would be very helpful for me if you could send me a completed source
code and all the necessary files for this simple project.
I think if it runns on a UNIX platform I can translate it myself to the
DOS/WIN platform.
Or do you have any idea to which usenet I should turn to?

Thank you very much for your efforts in advance.
Yours sincerely,
Ferdinand Moldenhauer

----
Mr. Ferdinand Moldenhauer
Bioinformatics
Max-Delbrueck-Center for Molecular Medicine
Robert-Roessle-Str. 10
Postbox: 74 02 38
D-13092 Berlin
Germany
Tel.: +49-30-9406-3125; Fax.: -2834






reply via email to

[Prev in Thread] Current Thread [Next in Thread]