By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,332 Members | 1,427 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,332 IT Pros & Developers. It's quick & easy.

Too big integers

P: n/a
Hi all

I want to make a program that will need to use too long integers and
the biggest size that I know is unsigned long, which stores numbers
until 4294967295 (in my Turbo C 3.1), but this size is too small for
what I want to do. So, how can I store numbers bigger than this one in
C?

Thanks, Guilherme
Nov 14 '05 #1
Share this Question
Share on Google+
39 Replies


P: n/a
hobbs <gu************@uol.com.br> wrote:
So, how can I store numbers bigger than this one in C?


google for a 'bignum' library or develop your own.

--
== Eric Gorr ========= http://www.ericgorr.net ========= ICQ:9293199 ===
"Therefore the considerations of the intelligent always include both
benefit and harm." - Sun Tzu
== Insults, like violence, are the last refuge of the incompetent... ===
Nov 14 '05 #2

P: n/a
begin followup to hobbs:
So, how can I store numbers bigger than this one in C?


Neither language nor standard library offer any direct solution.
Some contemporary compilers offer an additional (non-standard)
64-bit integer type, going by the name of "long long" or __int64.

For custom big-number libraries there are two approaches:

1. Binary coded decimals
2. Array of words

Probably your best option is to grab a free library.
My recommendation is

http://www.swox.com/gmp/

though I can't say whether it will work on your particular platform.

--
Für Google, Tux und GPL!
Nov 14 '05 #3

P: n/a
On 26 Dec 2003 00:11:28 GMT, Alexander Bartolich
<al*****************@gmx.at> wrote in comp.lang.c:
begin followup to hobbs:
So, how can I store numbers bigger than this one in C?


Neither language nor standard library offer any direct solution.
Some contemporary compilers offer an additional (non-standard)
64-bit integer type, going by the name of "long long" or __int64.


[snip]

__int64 is indeed non-standard, but "long long" has been part of the
ISO C standard since October 1999, and of the ANSI standard since May
2000.

Any compiler that does not supply signed and unsigned long long types
of at least 64 bits does not conform to the current C standard.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Nov 14 '05 #4

P: n/a

Not only is writing your own large number math library relatively easy,
it is also a fun and educational process which might teach you about
algorithms and the C language.

Note that if you are going to write your own it will not be as fast as
existing "bignum" libraries such as GMP.
Nov 14 '05 #5

P: n/a
> Neither language nor standard library offer any direct solution.
Some contemporary compilers offer an additional (non-standard)
64-bit integer type, going by the name of "long long" or __int64.


"long long" is defined in the ANSI C 1999 standard, so it is fully
supported by the language (although you may have to check to see if
your compile is modernized enough).

Jonathan Hoyle
Gene Codes Corporation
Nov 14 '05 #6

P: n/a
gu************@uol.com.br (hobbs) wrote in message news:<26**************************@posting.google. com>...
Hi all

I want to make a program that will need to use too long integers and
the biggest size that I know is unsigned long, which stores numbers
until 4294967295 (in my Turbo C 3.1), but this size is too small for
what I want to do. So, how can I store numbers bigger than this one in
C?

Thanks, Guilherme


1. If you don't know what bigger integers are for, how can you even design
a program which makes use of them? Hint: Cryptography, PI value etc.

2. For how long you'll be using that old DOS based compiler? Hint: Upgrade.

3. For arbitrary precision arithmetic, either code your own routines (out of
question) or use available libraries such as MIRACL or GMP.

4. My pleasure!

Regards,
Manish Singh
Nov 14 '05 #7

P: n/a
ma********@yahoo.com (Manish Singh) wrote in message news:<ab*************************@posting.google.c om>...
gu************@uol.com.br (hobbs) wrote in message news:<26**************************@posting.google. com>...
Hi all

I want to make a program that will need to use too long integers and
the biggest size that I know is unsigned long, which stores numbers
until 4294967295 (in my Turbo C 3.1), but this size is too small for
what I want to do. So, how can I store numbers bigger than this one in
C?

Thanks, Guilherme
1. If you don't know what bigger integers are for, how can you even design
a program which makes use of them? Hint: Cryptography, PI value etc.

2. For how long you'll be using that old DOS based compiler? Hint: Upgrade.

3. For arbitrary precision arithmetic, either code your own routines (out of
question) or use available libraries such as MIRACL or GMP.


Why is "coding your own" out of the question? I just finished doing it
-- took only a few days. I definitely recommend reading up on the
subject, "Numerical Recipes in C" or "Art of Computer Programming -
Seminumerical Algorithms" by Knuth.
4. My pleasure!

Regards,
Manish Singh

Nov 14 '05 #8

P: n/a
jo******@mac.com (Jonathan Hoyle) writes:
Neither language nor standard library offer any direct solution.
Some contemporary compilers offer an additional (non-standard)
64-bit integer type, going by the name of "long long" or __int64.


"long long" is defined in the ANSI C 1999 standard, so it is fully
supported by the language (although you may have to check to see if
your compile is modernized enough).


Few C compilers fully support the C99 standard yet, but many compilers
provide "long long" as an extension (it was based on existing
practice, after all).

I don't think any of the C compilers I use fail to provide a
"long long" type of at least 64 bits -- but then, as you can tell from
my sig, I probably don't work in a typical environemnt.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
(Note new e-mail address)
Nov 14 '05 #9

P: n/a
Yoni Rabkin <yo********@member.fsf.org> writes:
Not only is writing your own large number math library relatively easy,
it is also a fun and educational process which might teach you about
algorithms and the C language.

Note that if you are going to write your own it will not be as fast as
existing "bignum" libraries such as GMP.


It may also not be as correct.

If your goal is to wrote reliable software, use an existing "bignum"
library that's already been thoroughly tested. If your goal is to
learn something about C programming and/or to have some fun, by all
means roll your own.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
(Note new e-mail address)
Nov 14 '05 #10

P: n/a
Thanks for the hints, I've already started writing my own library to
use these numbers because my old compiler doesn't offer the 64-bit
integer type....I'll use an array of unsigned longs and I'll write all
the basic math functions to be used with them.
Nov 14 '05 #11

P: n/a
ca******@yahoo.com (Brett) wrote in message news:<93*************************@posting.google.c om>...

[snip]
Why is "coding your own" out of the question? I just finished doing it
-- took only a few days. I definitely recommend reading up on the
subject, "Numerical Recipes in C" or "Art of Computer Programming -
Seminumerical Algorithms" by Knuth.


Writing your own is definitely worth the effort. But it's OOQ in case of the OP
because the OP seems to have no idea where the big integers can be implemented.

In other words, coding my own encryption algorithm is out of question if I don't
know where it can be implemented.

Regards,
Manish Singh
Nov 14 '05 #12

P: n/a
Manish Singh wrote:
ca******@yahoo.com (Brett) wrote in message
news:<93*************************@posting.google.c om>...

[snip]
Why is "coding your own" out of the question? I just finished doing it
-- took only a few days. I definitely recommend reading up on the
subject, "Numerical Recipes in C" or "Art of Computer Programming -
Seminumerical Algorithms" by Knuth.
Writing your own is definitely worth the effort. But it's OOQ in case of
the OP because the OP seems to have no idea where the big integers can be
implemented.


I don't understand what you mean by "where" in this context. Surely memory
is the usual place to implement this stuff?
In other words, coding my own encryption algorithm is out of question if I
don't know where it can be implemented.


In memory, as with any other algorithm?

Could you be clearer about what you mean by "where", please?
--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #13

P: n/a
"Richard Heathfield" <do******@address.co.uk.invalid> wrote:
Manish Singh wrote:

^^^^^^^^^^^^
....
In other words, coding my own encryption algorithm is out of question if I don't know where it can be implemented.


Could you be clearer about what you mean by "where", please?


His name doesn't look natively English. Have you taken that into
consideration?
Nov 14 '05 #14

P: n/a
Peter Pichler wrote:
"Richard Heathfield" <do******@address.co.uk.invalid> wrote:
Manish Singh wrote:

^^^^^^^^^^^^
...
> In other words, coding my own encryption algorithm is out of question
> if I > don't know where it can be implemented.


Could you be clearer about what you mean by "where", please?


His name doesn't look natively English. Have you taken that into
consideration?


No. I'm trying to help him, not sentence him! :-) All that I've taken into
consideration is the fact that I don't understand what he wants. I'd like
to help him, but I can't do that effectively until I understand him. I did
not intend to criticise his English. I merely asked for clarification of
what he meant.
--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #15

P: n/a
hobbs wrote:
Thanks for the hints, I've already started writing my own library to
use these numbers because my old compiler doesn't offer the 64-bit
integer type....I'll use an array of unsigned longs and I'll write all
the basic math functions to be used with them.


You're gonna love division. Hint: keep it as simple as you can, and do lots
of examples on paper.

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #16

P: n/a
In article <26**************************@posting.google.com >,
gu************@uol.com.br says...
Thanks for the hints, I've already started writing my own library to
use these numbers because my old compiler doesn't offer the 64-bit
integer type....I'll use an array of unsigned longs and I'll write all
the basic math functions to be used with them.


What is wrong with a free, newer compiler? BTW, one that I just started
using recently on Windows platforms is "Dev-C++" which is a nice IDE
front end bundled with gcc.

--
Randy Howard
2reply remove FOOBAR

Nov 14 '05 #17

P: n/a
gu************@uol.com.br (hobbs) wrote:
Thanks for the hints, I've already started writing my own library to
use these numbers because my old compiler doesn't offer the 64-bit
integer type....I'll use an array of unsigned longs and I'll write all
the basic math functions to be used with them.


It looks like you can get a start here:

http://camino.rutgers.edu/ut/utsa/cs3343/lecture20.html

--
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/
Nov 14 '05 #18

P: n/a
Richard Heathfield <do******@address.co.uk.invalid> wrote in message news:<bs**********@sparta.btinternet.com>...
Peter Pichler wrote:
"Richard Heathfield" <do******@address.co.uk.invalid> wrote:
Manish Singh wrote:

^^^^^^^^^^^^
...
> In other words, coding my own encryption algorithm is out of question
> if I > don't know where it can be implemented.

Could you be clearer about what you mean by "where", please?


His name doesn't look natively English. Have you taken that into
consideration?


No. I'm trying to help him, not sentence him! :-) All that I've taken into
consideration is the fact that I don't understand what he wants. I'd like
to help him, but I can't do that effectively until I understand him. I did
not intend to criticise his English. I merely asked for clarification of
what he meant.


I should have used 'how' but somehow managed to write 'where', which fits
perfect in my native language frame.

BTW, what makes you think that I need to get help from someone? I didn't ask
for it. The OP seemed to have problems with bignums and I replied with what I
had in my mind, ATM. All I meant to say is if someone doesn't know how to make
use of a motorcycle, he's not supposed to manufacture or repair them.

I know you're not critici(s/z)ing my English. I don't care if it doesn't live
upto the Internatinal Standards. Oh well, the fact is I fail to see what exactly
you meant to say when you wrote "I don't understand what he wants.".
What *I* want? Gosh!

I don't want nothing. I never expected someone to interrupt me and ask what I
wanted, when in fact I was trying to help the OP. Pathetic!

Regards,
Manish

----------------------------------
Get rid of a BigEgo routine today.
----------------------------------
Nov 14 '05 #19

P: n/a
ma********@yahoo.com (Manish Singh) writes:
[...]
I know you're not critici(s/z)ing my English. I don't care if it
doesn't live upto the Internatinal Standards. Oh well, the fact is I
fail to see what exactly you meant to say when you wrote "I don't
understand what he wants.". What *I* want? Gosh!

I don't want nothing. I never expected someone to interrupt me and
ask what I wanted, when in fact I was trying to help the
OP. Pathetic!


Nobody interrupted you. Richard was trying to be helpful, just as you
were; that's why we're here. There's absolutely nothing pathetic
about it. It looks like you're taking offense where none was
intended.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
(Note new e-mail address)
Nov 14 '05 #20

P: n/a
[Manish's reply hasn't yet reached my server.]

Keith Thompson wrote:
ma********@yahoo.com (Manish Singh) writes:
[...]
I know you're not critici(s/z)ing my English. I don't care if it
doesn't live upto the Internatinal Standards. Oh well, the fact is I
fail to see what exactly you meant to say when you wrote "I don't
understand what he wants.". What *I* want? Gosh!

I don't want nothing. I never expected someone to interrupt me and
ask what I wanted, when in fact I was trying to help the
OP. Pathetic!


Nobody interrupted you. Richard was trying to be helpful, just as you
were; that's why we're here. There's absolutely nothing pathetic
about it. It looks like you're taking offense where none was
intended.


Thanks, Keith, for backing me up, but I've just re-read the thread and it
does seem that Manish does have at least the makings of a valid point here.
In between reading his original reply and composing my reply to it, it
seems I forgot that he wasn't actually the OP! So it was partly my fault.
I'm not sure why he's so cross about it, though.

And I still don't know what he means by "where the big integers can be
implemented".

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #21

P: n/a
Richard Heathfield <do******@address.co.uk.invalid> wrote in message news:<bs**********@sparta.btinternet.com>...
[Manish's reply hasn't yet reached my server.]

Keith Thompson wrote:
ma********@yahoo.com (Manish Singh) writes:
[...]
I know you're not critici(s/z)ing my English. I don't care if it
doesn't live upto the Internatinal Standards. Oh well, the fact is I
fail to see what exactly you meant to say when you wrote "I don't
understand what he wants.". What *I* want? Gosh!

I don't want nothing. I never expected someone to interrupt me and
ask what I wanted, when in fact I was trying to help the
OP. Pathetic!
Nobody interrupted you. Richard was trying to be helpful, just as you
were; that's why we're here. There's absolutely nothing pathetic
about it. It looks like you're taking offense where none was
intended.


Thanks, Keith, for backing me up, but I've just re-read the thread and it
does seem that Manish does have at least the makings of a valid point here.
In between reading his original reply and composing my reply to it, it
seems I forgot that he wasn't actually the OP! So it was partly my fault.
I'm not sure why he's so cross about it, though.


You said 'at least'?
I never showed any sign of anger, did I? All that I reacted to was unexpected.
And I still don't know what he means by "where the big integers can be
implemented".


Implemented in a program. Implemented on some crypto system. Implemented
some'where'. Last chance, change it "where it can be applied". Hmm?
Okay, I give up. You won, congratulations. :)

Regards,
Manish
Nov 14 '05 #22

P: n/a
Keith Thompson <ks***@mib.org> wrote in message news:<ln************@nuthaus.mib.org>...
ma********@yahoo.com (Manish Singh) writes:
[...]
I know you're not critici(s/z)ing my English. I don't care if it
doesn't live upto the Internatinal Standards. Oh well, the fact is I
fail to see what exactly you meant to say when you wrote "I don't
understand what he wants.". What *I* want? Gosh!

I don't want nothing. I never expected someone to interrupt me and
ask what I wanted, when in fact I was trying to help the
OP. Pathetic!


Nobody interrupted you. Richard was trying to be helpful, just as you
were; that's why we're here. There's absolutely nothing pathetic
about it. It looks like you're taking offense where none was
intended.


He did, actually. You may have to re-read the thread to get the whole picture.
Indeed he was trying to helpful, but unfortunately to someone who didn't
ask for it. Isn't it awful when you come to realize that someone you know and
respect have become picky syntax checkers, more annoying than most Lints?

Regards,
Manish
Nov 14 '05 #23

P: n/a
Manish Singh wrote:
He did, actually. You may have to re-read the thread to get the whole picture.
Indeed he was trying to helpful, but unfortunately to someone who didn't
ask for it. Isn't it awful when you come to realize that someone you know and
respect have become picky syntax checkers, more annoying than most Lints?


Chill! Mr. Heathfield already admitted to making a mistake, thinking you
were the OP. I've been following this newsgroup for quite some time now
and he is one of the most helpful people around here... You'd better
save the name-calling for people who are more deservant of it.

Best regards,

Sidney

Nov 14 '05 #24

P: n/a
Sidney Cadot <si****@jigsaw.nl> wrote in message news:<bs**********@news.tudelft.nl>...
Manish Singh wrote:
He did, actually. You may have to re-read the thread to get the whole picture.
Indeed he was trying to helpful, but unfortunately to someone who didn't
ask for it. Isn't it awful when you come to realize that someone you know and
respect have become picky syntax checkers, more annoying than most Lints?


Chill! Mr. Heathfield already admitted to making a mistake, thinking you
were the OP. I've been following this newsgroup for quite some time now
and he is one of the most helpful people around here... You'd better
save the name-calling for people who are more deservant of it.

Best regards,

Sidney


There is no doubt that he is one of the best people around here, helpful or not.
I never intended to hurt him or anyone else in this NG. There was some
misunderstanding on both sides which resulted in some un-necessary postings.
However, there is no need to apologize. It's all settled, I believe.

One thing, I'm still not sure why it was only him who had a problem with that
sentence. He could have corrected it, but he chose to have 'I'll-help-you-no-
matter-you-need-it-or-not' type attitude instead. Anyway ...

Regards,
Manish
Nov 14 '05 #25

P: n/a
Manish Singh wrote:
Richard Heathfield <do******@address.co.uk.invalid> wrote in message
news:<bs**********@sparta.btinternet.com>...
<snip>
And I still don't know what he means by "where the big integers can be
implemented".


Implemented in a program. Implemented on some crypto system. Implemented
some'where'.


What difference does it make? Typically, bignum stuff goes in a library, and
is used wherever needed.
Last chance, change it "where it can be applied". Hmm?
Oh, is that all you meant? Well, it can be applied anywhere it's needed.
Okay, I give up. You won, congratulations. :)


I didn't realise it was a competition. You seem offended. I'm not sure why,
but it was not my intent to offend you. If I have done so, I apologise.

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #26

P: n/a
ma********@yahoo.com (Manish Singh) writes:
Keith Thompson <ks***@mib.org> wrote in message
news:<ln************@nuthaus.mib.org>...
ma********@yahoo.com (Manish Singh) writes:
[...]
I know you're not critici(s/z)ing my English. I don't care if it
doesn't live upto the Internatinal Standards. Oh well, the fact is I
fail to see what exactly you meant to say when you wrote "I don't
understand what he wants.". What *I* want? Gosh!

I don't want nothing. I never expected someone to interrupt me and
ask what I wanted, when in fact I was trying to help the
OP. Pathetic!


Nobody interrupted you. Richard was trying to be helpful, just as you
were; that's why we're here. There's absolutely nothing pathetic
about it. It looks like you're taking offense where none was
intended.


He did, actually. You may have to re-read the thread to get the
whole picture. Indeed he was trying to helpful, but unfortunately
to someone who didn't ask for it. Isn't it awful when you come to
realize that someone you know and respect have become picky syntax
checkers, more annoying than most Lints?


Not to beat a dead horse, but I don't believe Richard was being
terribly picky. You wrote "I don't know where it can be implemented."
(and yes, that's out of context). I, for one, honestly didn't know
what you meant, but I didn't happen to reply.

There's a difference between picking on someone's grammar when it's
obvious what they meant, and asking for clarification when an odd
grammatical construct actually obscures the meaning. It may have
seemed perfectly clear to you; you'll just have to make my and
Richard's word for it that it wasn't clear to at least some of your
readers.

I apologize sincerely for any offense I may have inadvertently caused,
and insincerely for the mildly snide tone I've inserted into this
apology by adding this clause.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
(Note new e-mail address)
Nov 14 '05 #27

P: n/a
On 29 Dec 2003 04:13:12 -0800, in comp.lang.c , ma********@yahoo.com
(Manish Singh) wrote:
Richard Heathfield <do******@address.co.uk.invalid> wrote in message news:<bs**********@sparta.btinternet.com>...
[Manish's reply hasn't yet reached my server.]

Keith Thompson wrote:
> ma********@yahoo.com (Manish Singh) writes:
> [...]
>>
>> I don't want nothing.

Not trying to be picky, but two negatives makes a positive in English.
So this says "I want anything"
I never expected someone to interrupt me and >> ask what I wanted, when in fact I was trying to help the
>> OP. Pathetic!
>
> Nobody interrupted you. Richard was trying to be helpful, just as you
> were; that's why we're here.


Thanks, Keith, for backing me up, but I've just re-read the thread and it
does seem that Manish does have at least the makings of a valid point here.


You said 'at least'?
I never showed any sign of anger, did I? All that I reacted to was unexpected.


When someone apologises, its conventinal to say "thats ok", not to
continue to rant. YMMV

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #28

P: n/a
On 29 Dec 2003 04:22:37 -0800, in comp.lang.c , ma********@yahoo.com
(Manish Singh) wrote:
Keith Thompson <ks***@mib.org> wrote in message news:<ln************@nuthaus.mib.org>...
ma********@yahoo.com (Manish Singh) writes:
[...]
>
> I don't want nothing. I never expected someone to interrupt me and


Nobody interrupted you.


He did, actually.


Its impossible to interrupt someone in a written medium. Your messages
are becoming ridiculous.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #29

P: n/a
Mark McIntyre <ma**********@spamcop.net> writes:
[...]
> ma********@yahoo.com (Manish Singh) writes:
> [...]
>>
>> I don't want nothing.


Not trying to be picky, but two negatives makes a positive in English.
So this says "I want anything"


Trying to be picky, but a double negative in informal English often
implies a negative. When Mick Jagger sings "I can't get no
satisfaction", he's not complaining that he's too satisfied.

Depending on the context, though, it's not unlikely to be
misinterpreted; "I don't want anything" would have been clearer.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
(Note new e-mail address)
Nov 14 '05 #30

P: n/a
Mark McIntyre wrote:

.... snip ...

> ma********@yahoo.com (Manish Singh) writes:
> [...]
>>
>> I don't want nothing.


Not trying to be picky, but two negatives makes a positive in
English. So this says "I want anything"


Nah. He don't want no nevermind.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #31

P: n/a
Mark McIntyre <ma**********@spamcop.net> wrote in message news:<0t********************************@4ax.com>. ..
On 29 Dec 2003 04:13:12 -0800, in comp.lang.c , ma********@yahoo.com
(Manish Singh) wrote:
Richard Heathfield <do******@address.co.uk.invalid> wrote in message news:<bs**********@sparta.btinternet.com>...
[Manish's reply hasn't yet reached my server.]

Keith Thompson wrote:

> ma********@yahoo.com (Manish Singh) writes:
> [...]
>>
>> I don't want nothing.
Not trying to be picky, but two negatives makes a positive in English.
So this says "I want anything"


Let's make it clear. English ain't no mathematics.
Well, if there is any ISO English standard that you're well aware of, let us
all share it.
I never expected someone to interrupt me and
>> ask what I wanted, when in fact I was trying to help the
>> OP. Pathetic!
>
> Nobody interrupted you. Richard was trying to be helpful, just as you
> were; that's why we're here.

Thanks, Keith, for backing me up, but I've just re-read the thread and it
does seem that Manish does have at least the makings of a valid point here.


You said 'at least'?
I never showed any sign of anger, did I? All that I reacted to was unexpected.


When someone apologises, its conventinal to say "thats ok", not to
continue to rant. YMMV


'Conventional' is the keyword here.

Regards,
Manish
Nov 14 '05 #32

P: n/a
Richard Heathfield <do******@address.co.uk.invalid> wrote in message news:<bs**********@hercules.btinternet.com>...
Manish Singh wrote:
Richard Heathfield <do******@address.co.uk.invalid> wrote in message
news:<bs**********@sparta.btinternet.com>...


<snip>
And I still don't know what he means by "where the big integers can be
implemented".


Implemented in a program. Implemented on some crypto system. Implemented
some'where'.


What difference does it make? Typically, bignum stuff goes in a library, and
is used wherever needed.
Last chance, change it "where it can be applied". Hmm?


Oh, is that all you meant? Well, it can be applied anywhere it's needed.


That's it!
The OP intended to write a C program which would make use of big ..BIG integers.
Take a look at what he said, again.
"I want to make a program that will need to use too long integers".
Obviously, the OP had not written a single program utilizing bignums, until
then. Now, is someone supposed to write a BigNum library himself if he hasn't
written a single program which makes use of big integers?

That is why I said that writing his very own bignum lib was out of question.
Even if he manages to write one, though an achievement for him, it would not
serve the purpose very well. Hint: Optimizations.
Okay, I give up. You won, congratulations. :)


I didn't realise it was a competition. You seem offended. I'm not sure why,
but it was not my intent to offend you. If I have done so, I apologise.


No, please don't! There is no need to apologize.
I personally believe what happened to this thread was very unfortunate.
OTOH, I learnt my lesson. That a single misunderstanding can spoil the whole
thread. That a single logic error can result in such a mess.

And, that a single logic error can trigger a series of "undefined behaviour" and
a LOT of arrogance.

Regards,
Manish
Nov 14 '05 #33

P: n/a
[I cannot see Mark's message, sorry Keith]

"Keith Thompson" <ks***@mib.org> wrote in message
news:ln************@nuthaus.mib.org...
Mark McIntyre <ma**********@spamcop.net> writes:
[...]
> > ma********@yahoo.com (Manish Singh) writes:
> > [...]
> >>
> >> I don't want nothing.
Not trying to be picky, but two negatives makes a positive in English.
So this says "I want anything"


This is hugely off-topic, discussing other languages than C here, but...
shouldn't that be "I want something?"

Consider this just a curious question of a non-native English speaker.
Depending on the context, though, it's not unlikely to be
misinterpreted; "I don't want anything" would have been clearer.


Keeping this part only to retain at least some of Keith's post ;-)

Peter
Nov 14 '05 #34

P: n/a
Mark McIntyre <ma**********@spamcop.net> wrote in message news:<g0********************************@4ax.com>. ..
On 29 Dec 2003 04:22:37 -0800, in comp.lang.c , ma********@yahoo.com
(Manish Singh) wrote:
Keith Thompson <ks***@mib.org> wrote in message news:<ln************@nuthaus.mib.org>...
ma********@yahoo.com (Manish Singh) writes:
[...]
>
> I don't want nothing. I never expected someone to interrupt me and

Nobody interrupted you.


He did, actually.


Its impossible to interrupt someone in a written medium. Your messages
are becoming ridiculous.


Technically, it's possible Mr Mark.
You happen to think of this thread as a piece of paper. I don't.
Don't confuse an electronic medium with a writing medium. And I really hate
it being told that interrupts can't be raised or accepted in an electronic
medium. Each time I press a key on my keyboard, an interrupt is caused and is
processed by the appropriate handler.

Technical stuff aside.
My copy of Oxford Dictionary includes some examples under the entry 'interrupt'.
"Trade between the two countries was interrupted by the war". Here's another,
"We interrupt this programme to bring you a news flash".

An interrupt is a mere disturbance. It can be used to break any continuity or
process. Be it reading, writing, taking or posting in newsgroups.

Your comments are becoming impotent.

Regards,
Manish
Nov 14 '05 #35

P: n/a
Peter Pichler wrote:

Not trying to be picky, but two negatives makes a positive in English.
So this says "I want anything"

This is hugely off-topic, discussing other languages than C here, but...
shouldn't that be "I want something?"

Consider this just a curious question of a non-native English speaker.


That would be my interpretation. I'm both a native English speaker and
an "only English" speaker. ;)

-Kevin
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.
Nov 14 '05 #36

P: n/a
Manish Singh wrote:
Richard Heathfield <do******@address.co.uk.invalid> wrote in message
news:<bs**********@hercules.btinternet.com>...
Manish Singh wrote:
> Last chance, change it "where it can be applied". Hmm?
Oh, is that all you meant? Well, it can be applied anywhere it's needed.


That's it!
The OP intended to write a C program which would make use of big ..BIG
integers. Take a look at what he said, again.
"I want to make a program that will need to use too long integers".


Yeeeeesss....
Obviously, the OP had not written a single program utilizing bignums,
until then. Now, is someone supposed to write a BigNum library himself if
he hasn't written a single program which makes use of big integers?
Well, that's what I did. It was because I wanted to write such programs that
I wrote a library that would let me write those programs. So why shouldn't
he, if he's bright enough? (In fact, he doesn't need to be /that/ bright -
after all, I managed all right.)
That is why I said that writing his very own bignum lib was out of
question.
It isn't, if he's bright enough.
Even if he manages to write one, though an achievement for him,
it would not serve the purpose very well.
Why on earth not?
Hint: Optimizations.


Premature optimisation is the root of all evil. First make it right. Then
make it fast, if it's not fast enough already.

Incidentally, with one minor exception - conversion to base 10 - I haven't
tried to optimise my bignum library. Okay, it isn't the fastest in the
world, but it's no slouch. It's certainly fast enough for my purposes.

<snip>

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #37

P: n/a
ma********@yahoo.com (Manish Singh) wrote in message

One thing, I'm still not sure why it was only him who had a problem with that
sentence.
It certainly wasn't only Richard. I could not work out what you meant
by those sentences. I had difficulty with your earlier message, but
managed to guess right in that case. With the message that lead to this
furore, I could think of some possible interpretations, but I couldn't
see any way to tell which one you meant or if you meant something else
I hadn't thought of.
He could have corrected it, but he chose to have 'I'll-help-you-no-
matter-you-need-it-or-not' type attitude instead. Anyway ...


How could he have corrected it since he didn't know what you meant?
Are you saying you think he knew what you meant but was just pretending
that he didn't? I can't speak for Richard, but that wasn't true in my
case. Asking you to explain was the obvious way to get the problem
corrected for all of us.
Nov 14 '05 #38

P: n/a
Kevin Goodsell <us*********************@neverbox.com> writes:
Peter Pichler wrote:

Not trying to be picky, but two negatives makes a positive in English.
So this says "I want anything"

This is hugely off-topic, discussing other languages than C here,
but...
shouldn't that be "I want something?"
Consider this just a curious question of a non-native English
speaker.


That would be my interpretation. I'm both a native English speaker and
an "only English" speaker. ;)


(The original statement was "I don't want nothing".)

A painfully literal interpretation would be "I want something". The
obvious idiomatic or slang interpretation would be "I don't want
anything".

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"
(Note new e-mail address)
Nov 14 '05 #39

P: n/a
Peter Pichler <pi*****@pobox.sk> scribbled the following:
[I cannot see Mark's message, sorry Keith]
"Keith Thompson" <ks***@mib.org> wrote in message
news:ln************@nuthaus.mib.org...
Mark McIntyre <ma**********@spamcop.net> writes:
[...]
> >> > ma********@yahoo.com (Manish Singh) writes:
> >> > [...]
> >> >>
> >> >> I don't want nothing.
>
> Not trying to be picky, but two negatives makes a positive in English.
> So this says "I want anything"
This is hugely off-topic, discussing other languages than C here, but...
shouldn't that be "I want something?"


Not necessarily. The way I see it is:
"I want anything" is:
A x: (x exists) => (I want x),
while "I want something" is:
E x: (x exists) & (I want x).
To those who can't read my pseudo-logical symbols, this means that
"I want anything" means "For all x that exist, I want x", while
"I want something" means "There is an x that exists, and I want x".
So the real point is that in the latter, there are existing things
that the speaker doesn't want. In the former, there aren't.
Also "I want anything" does not equal "I want everything". The former
is content with being given less than everything. The latter is not.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"The trouble with the French is they don't have a word for entrepreneur."
- George Bush
Nov 14 '05 #40

This discussion thread is closed

Replies have been disabled for this discussion.