473,320 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

GMP problem with simple thing

Hello.
I have to write small program in C based on liberary GMP (GNU Multi
Precision Aritmetic Liberary).

My program have to add and multiply some big numbers, thats why I have
chosen GMP.
So where is the point?
Here:

it works:
mpz_t table[int][int];

but it doesn't:
mpz_set_si (table[5][5], 3); //digits are of course for example

I can compile my program, but when I want to write something to my table or
even print my table on stdout compiled program causes "Segmentation fault"
error when I try to run it.
My table need to be mpz type.

Can you help me?
ra_v
Nov 13 '05 #1
1 1632
Rafa³ "ra_v" Zawierta wrote:
Hello.
I have to write small program in C based on liberary GMP (GNU Multi
Precision Aritmetic Liberary).

My program have to add and multiply some big numbers, thats why I have
chosen GMP.
We don't discuss particular non-standard libraries here. This group is
for discussion of standard C.
So where is the point?
Here:

it works:
mpz_t table[int][int];
This looks like a syntax error.

but it doesn't:
mpz_set_si (table[5][5], 3); //digits are of course for example
No idea what any of that means, since it is non-standard and you haven't
bothered to supply declarations.

I can compile my program, but when I want to write something to my table or
even print my table on stdout compiled program causes "Segmentation fault"
error when I try to run it.
My table need to be mpz type.


You seem to have a problem with GMP, not C. Find a forum that supports
GMP, or consult the documentation. It is off-topic here.

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: G Matthew J | last post by:
interesting "signal vs. noise" blog entry: http://37signals.com/svn/archives2/whats_wrong_with_ajax.php
17
by: Danny J. Lesandrini | last post by:
The following code works with a standard MDB to navigate to a particluar record (with a DAO recordset, of course) but it's giving me problems in an ADP I'm working on. Dim rs As ADODB.Recordset...
24
by: Bob Alston | last post by:
Most of my Access database implementations have been fairly small in terms of data volume and number of concurrent users. So far I haven't had performance issues to worry about. <knock on wood> ...
90
by: Jhon smith | last post by:
Hi all,Just wondering are there any problems with learning c from older books,as I have picked up some from 1988,1994,1997,1998. By using books of this age(Im on a tight budget)am I going to...
28
by: Vishal Naidu | last post by:
i m new to the C world... i ve been told by my instructors not to use goto stmt.. but no one could give me a satisfactory answer as to why it is so.. plz help me out of this dilemma, coz i use...
22
by: Jeff Louie | last post by:
Well I wonder if my old brain can handle threading. Dose this code look reasonable. Regards, Jeff using System; using System.Diagnostics; using System.IO; using System.Threading;
4
by: Alan Silver | last post by:
Hello, I'm trying to use an ArrayList to do data binding, but am getting an error I don't understand. I posted this in another thread, but that was all confused with various other problems,...
3
by: Geoff | last post by:
Hi, all, I have a VB .NET (VS 2003) application that has a dropdown list or dropdown combo with checkboxes as a "3rd party control" linked to a ComponentOne TrueDBGrid cell button click event. ...
18
by: jslowery | last post by:
I am not completely knowledgable about the status of lexical scoping in Python, but it was my understanding that this was added in a long time ago around python2.1-python2.2 I am using python2.4...
17
by: John Bailo | last post by:
What does he do all day? Find out here: http://channel9.msdn.com/Showpost.aspx?postid=163166
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.