Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Too big integers

1 view
Skip to first unread message

hobbs

unread,
Dec 25, 2003, 6:36:13 PM12/25/03
to
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

Eric

unread,
Dec 25, 2003, 7:07:23 PM12/25/03
to
hobbs <guilher...@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... ===

Alexander Bartolich

unread,
Dec 25, 2003, 7:11:28 PM12/25/03
to
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!

Jack Klein

unread,
Dec 26, 2003, 12:18:28 AM12/26/03
to
On 26 Dec 2003 00:11:28 GMT, Alexander Bartolich
<alexander...@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

Yoni Rabkin

unread,
Dec 26, 2003, 6:19:20 AM12/26/03
to

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.

Jonathan Hoyle

unread,
Dec 26, 2003, 10:57:46 AM12/26/03
to
> 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

Manish Singh

unread,
Dec 26, 2003, 2:02:06 PM12/26/03
to
guilher...@uol.com.br (hobbs) wrote in message news:<262e12a9.03122...@posting.google.com>...

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

Brett

unread,
Dec 26, 2003, 4:56:37 PM12/26/03
to
manis...@yahoo.com (Manish Singh) wrote in message news:<ab0c258.03122...@posting.google.com>...

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.

Keith Thompson

unread,
Dec 26, 2003, 5:25:11 PM12/26/03
to

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)

Keith Thompson

unread,
Dec 26, 2003, 5:27:38 PM12/26/03
to

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.

hobbs

unread,
Dec 26, 2003, 7:35:25 PM12/26/03
to
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.

Manish Singh

unread,
Dec 27, 2003, 12:59:34 PM12/27/03
to
cauc...@yahoo.com (Brett) wrote in message news:<931f9c2.03122...@posting.google.com>...

[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

Richard Heathfield

unread,
Dec 27, 2003, 2:07:13 PM12/27/03
to
Manish Singh wrote:

> cauc...@yahoo.com (Brett) wrote in message
> news:<931f9c2.03122...@posting.google.com>...
>
> [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 : bin...@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

Peter Pichler

unread,
Dec 27, 2003, 3:28:10 PM12/27/03
to
"Richard Heathfield" <dont...@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?


Richard Heathfield

unread,
Dec 28, 2003, 1:48:43 AM12/28/03
to
Peter Pichler wrote:

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

unread,
Dec 28, 2003, 1:49:32 AM12/28/03
to
hobbs wrote:

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

Randy Howard

unread,
Dec 28, 2003, 5:49:54 AM12/28/03
to
In article <262e12a9.03122...@posting.google.com>,
guilher...@uol.com.br says...

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

Paul Hsieh

unread,
Dec 28, 2003, 9:48:25 AM12/28/03
to

Manish Singh

unread,
Dec 28, 2003, 12:12:23 PM12/28/03
to
Richard Heathfield <dont...@address.co.uk.invalid> wrote in message news:<bsluca$5cp$2...@sparta.btinternet.com>...

> Peter Pichler wrote:
>
> > "Richard Heathfield" <dont...@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.
----------------------------------

Keith Thompson

unread,
Dec 28, 2003, 9:00:52 PM12/28/03
to
manis...@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.

Richard Heathfield

unread,
Dec 28, 2003, 11:32:46 PM12/28/03
to
[Manish's reply hasn't yet reached my server.]

Keith Thompson wrote:

> manis...@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".

--

Manish Singh

unread,
Dec 29, 2003, 7:13:12 AM12/29/03
to
Richard Heathfield <dont...@address.co.uk.invalid> wrote in message news:<bsoapd$m8k$2...@sparta.btinternet.com>...

> [Manish's reply hasn't yet reached my server.]
>
> Keith Thompson wrote:
>
> > manis...@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

Manish Singh

unread,
Dec 29, 2003, 7:22:37 AM12/29/03
to
Keith Thompson <ks...@mib.org> wrote in message news:<lnzndcf...@nuthaus.mib.org>...

> manis...@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

Sidney Cadot

unread,
Dec 29, 2003, 9:32:33 AM12/29/03
to
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

Manish Singh

unread,
Dec 29, 2003, 1:55:59 PM12/29/03
to
Sidney Cadot <sid...@jigsaw.nl> wrote in message news:<bspdtk$jug$1...@news.tudelft.nl>...

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

Richard Heathfield

unread,
Dec 29, 2003, 2:18:29 PM12/29/03
to
Manish Singh wrote:

> Richard Heathfield <dont...@address.co.uk.invalid> wrote in message
> news:<bsoapd$m8k$2...@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.

Keith Thompson

unread,
Dec 29, 2003, 4:58:17 PM12/29/03
to

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.

Mark McIntyre

unread,
Dec 29, 2003, 8:25:25 PM12/29/03
to
On 29 Dec 2003 04:13:12 -0800, in comp.lang.c , manis...@yahoo.com
(Manish Singh) wrote:

>Richard Heathfield <dont...@address.co.uk.invalid> wrote in message news:<bsoapd$m8k$2...@sparta.btinternet.com>...
>> [Manish's reply hasn't yet reached my server.]
>>
>> Keith Thompson wrote:
>>
>> > manis...@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 =---

Mark McIntyre

unread,
Dec 29, 2003, 8:26:45 PM12/29/03
to
On 29 Dec 2003 04:22:37 -0800, in comp.lang.c , manis...@yahoo.com
(Manish Singh) wrote:

>Keith Thompson <ks...@mib.org> wrote in message news:<lnzndcf...@nuthaus.mib.org>...
>> manis...@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.

Keith Thompson

unread,
Dec 29, 2003, 9:06:34 PM12/29/03
to
Mark McIntyre <markmc...@spamcop.net> writes:
[...]

> >> > manis...@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.

CBFalconer

unread,
Dec 30, 2003, 12:09:32 AM12/30/03
to
Mark McIntyre wrote:
>
... snip ...

> >>
> >> > manis...@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 (cbfal...@yahoo.com) (cbfal...@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!


Manish Singh

unread,
Dec 30, 2003, 1:10:18 PM12/30/03
to
Mark McIntyre <markmc...@spamcop.net> wrote in message news:<0tk1vv0r49poft59h...@4ax.com>...

> On 29 Dec 2003 04:13:12 -0800, in comp.lang.c , manis...@yahoo.com
> (Manish Singh) wrote:
>
> >Richard Heathfield <dont...@address.co.uk.invalid> wrote in message news:<bsoapd$m8k$2...@sparta.btinternet.com>...
> >> [Manish's reply hasn't yet reached my server.]
> >>
> >> Keith Thompson wrote:
> >>
> >> > manis...@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

Manish Singh

unread,
Dec 30, 2003, 1:44:16 PM12/30/03
to
Richard Heathfield <dont...@address.co.uk.invalid> wrote in message news:<bspum4$jb0$2...@hercules.btinternet.com>...

> Manish Singh wrote:
>
> > Richard Heathfield <dont...@address.co.uk.invalid> wrote in message
> > news:<bsoapd$m8k$2...@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

Peter Pichler

unread,
Dec 30, 2003, 1:45:15 PM12/30/03
to
[I cannot see Mark's message, sorry Keith]

"Keith Thompson" <ks...@mib.org> wrote in message

news:lnfzf3x...@nuthaus.mib.org...


> Mark McIntyre <markmc...@spamcop.net> writes:
> [...]
> > >> > manis...@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


Manish Singh

unread,
Dec 30, 2003, 2:13:14 PM12/30/03
to
Mark McIntyre <markmc...@spamcop.net> wrote in message news:<g0l1vvktdd9rcdial...@4ax.com>...

> On 29 Dec 2003 04:22:37 -0800, in comp.lang.c , manis...@yahoo.com
> (Manish Singh) wrote:
>
> >Keith Thompson <ks...@mib.org> wrote in message news:<lnzndcf...@nuthaus.mib.org>...
> >> manis...@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

Kevin Goodsell

unread,
Dec 30, 2003, 3:06:37 PM12/30/03
to
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.

Richard Heathfield

unread,
Dec 30, 2003, 3:06:48 PM12/30/03
to
Manish Singh wrote:

> Richard Heathfield <dont...@address.co.uk.invalid> wrote in message
> news:<bspum4$jb0$2...@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>

J. J. Farrell

unread,
Dec 30, 2003, 6:51:28 PM12/30/03
to
manis...@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.

Keith Thompson

unread,
Dec 30, 2003, 6:57:47 PM12/30/03
to
Kevin Goodsell <usenet1.spa...@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".

Joona I Palaste

unread,
Dec 31, 2003, 10:54:35 AM12/31/03
to
Peter Pichler <pic...@pobox.sk> scribbled the following:

> [I cannot see Mark's message, sorry Keith]
> "Keith Thompson" <ks...@mib.org> wrote in message
> news:lnfzf3x...@nuthaus.mib.org...
>> Mark McIntyre <markmc...@spamcop.net> writes:
>> [...]
>> > >> > manis...@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 (pal...@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

0 new messages