Hi,
Can someone give the standard function which can create positive
integer value in C?
Thanks,
Deepak 63 4930
deepak said:
Hi,
Can someone give the standard function which can create positive
integer value in C?
What does your textbook say about the generation of random numbers?

Richard Heathfield <http://www.cpax.org.uk>
Email: http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place"  dmr 29 July 1999
deepak wrote:
Hi,
Can someone give the standard function which can create positive
integer value in C?
Thanks,
Deepak
Lookup rand.
On Dec 18, 4:27 am, santosh <santosh....@gmail.comwrote:
deepak wrote:
Hi,
Can someone give the standard function which can create positive
integer value in C?
Thanks,
Deepak
Lookup rand.
You may want to man for rand series entirely; e.g. you may want to use
srand, and seed it with something like your system time to generate
random sequences, etc.
:D
deepak wrote:
Hi,
Can someone give the standard function which can create positive
integer value in C?
There is no standard C function that creates numbers out of nothing.
If you are rather looking for a pseudorandom generator, see the C FAQ.

Tor <bw****@wvtqvm.vw  tr izah az>
Jack Klein <ja*******@spamcop.netwrites:
On Tue, 18 Dec 2007 00:43:10 0800 (PST), deepak
<de*********@gmail.comwrote in comp.lang.c:
>Can someone give the standard function which can create positive integer value in C?
Other's have talked about "rand()", but I don't see anything in your
post that requires it.
[...]
The subject was "Positive random number". That information should
have been in the body of the original post.

Keith Thompson (The_Other_Keith) <ks***@mib.org>
Looking for software development work in the San Diego area.
"We must do something. This is something. Therefore, we must do this."
 Antony Jay and Jonathan Lynn, "Yes Minister"
On Tue, 18 Dec 2007 20:30:18 0600, Jack Klein <ja*******@spamcop.net>
wrote:
>On Tue, 18 Dec 2007 00:43:10 0800 (PST), deepak <de*********@gmail.comwrote in comp.lang.c:
>Hi,
Can someone give the standard function which can create positive integer value in C?
Other's have talked about "rand()", but I don't see anything in your post that requires it. Here's a function guaranteed to meet the requirement you asked for in the body of your message:
int create_positive_integer_value_in_C(void) {
return 42; }
Definitely *not* guaranteed.
In C99, section 5.2.4.1 Translation limits:
"The implementation shall be able to translate and execute at least
one program that contains at least one instance of every one of the
following limits:
....
31 significant initial characters in an external identifier..."
The identifier "create_positive_integer_value_in_C" is an external
identifier with 34 characters, and thus exceeds the minimum number of
characters *guaranteed* to be accepted by the standard. In C90, the
minimum was a paltry six characters.
Now, an identifier such as "create_positive_int_value_in_C" (30
characters) is acceptable in C99, but not necessarily in C90, though
arguably it is acceptable in mostif not allC90 compilers in the
real world (for that matter, so is
"create_positive_integer_value_in_C" :^)

jay
jaysome wrote:
On Tue, 18 Dec 2007 20:30:18 0600, Jack Klein <ja*******@spamcop.net>
wrote:
>>On Tue, 18 Dec 2007 00:43:10 0800 (PST), deepak <de*********@gmail.comwrote in comp.lang.c:
>>Hi,
Can someone give the standard function which can create positive integer value in C?
Other's have talked about "rand()", but I don't see anything in your post that requires it. Here's a function guaranteed to meet the requirement you asked for in the body of your message:
int create_positive_integer_value_in_C(void) { return 42; }
Definitely *not* guaranteed.
In C99, section 5.2.4.1 Translation limits:
"The implementation shall be able to translate and execute at least
one program that contains at least one instance of every one of the
following limits:
...
31 significant initial characters in an external identifier..."
The identifier "create_positive_integer_value_in_C" is an external
identifier with 34 characters, and thus exceeds the minimum number of
characters *guaranteed* to be accepted by the standard. In C90, the
minimum was a paltry six characters.
What part of "31 significant initial characters" did you not understand.
Jack's function name will only cause problems if he happened to have
defined another identifier with the same sequence of 31 initial
characters.
"santosh" <sa*********@gmail.comschrieb im Newsbeitrag
news:fk**********@registered.motzarella.org...
jaysome wrote:
>On Tue, 18 Dec 2007 20:30:18 0600, Jack Klein <ja*******@spamcop.net> wrote:
>>>On Tue, 18 Dec 2007 00:43:10 0800 (PST), deepak <de*********@gmail.comwrote in comp.lang.c:
Hi,
Can someone give the standard function which can create positive integer value in C?
Other's have talked about "rand()", but I don't see anything in your post that requires it. Here's a function guaranteed to meet the requirement you asked for in the body of your message:
int create_positive_integer_value_in_C(void) { return 42; }
Definitely *not* guaranteed.
In C99, section 5.2.4.1 Translation limits:
"The implementation shall be able to translate and execute at least one program that contains at least one instance of every one of the following limits:
...
31 significant initial characters in an external identifier..."
The identifier "create_positive_integer_value_in_C" is an external identifier with 34 characters, and thus exceeds the minimum number of characters *guaranteed* to be accepted by the standard. In C90, the minimum was a paltry six characters.
What part of "31 significant initial characters" did you not understand.
Jack's function name will only cause problems if he happened to have
defined another identifier with the same sequence of 31 initial
characters.
What part of "Definitely *not* guaranteed" didn't you understand? 8))
Bye, Jojo
Keith Thompson schrieb:
Jack Klein <ja*******@spamcop.netwrites:
>On Tue, 18 Dec 2007 00:43:10 0800 (PST), deepak <de*********@gmail.comwrote in comp.lang.c:
>>Can someone give the standard function which can create positive integer value in C?
Other's have talked about "rand()", but I don't see anything in your post that requires it.
[...]
The subject was "Positive random number". That information should
have been in the body of the original post.
http://xkcd.org/221/
:))
Greetings,
Johannes

"Viele der Theorien der Mathematiker sind falsch und klar
GotteslÃ¤sterlich. Ich vermute, dass diese falschen Theorien genau
deshalb so geliebt werden."  Prophet und VisionÃ¤r Hans Joss aka
HJP in de.sci.mathematik <47**********************@news.sunrise.ch>
Johannes Bauer wrote:
>
Keith Thompson schrieb:
Jack Klein <ja*******@spamcop.netwrites:
On Tue, 18 Dec 2007 00:43:10 0800 (PST), deepak
<de*********@gmail.comwrote in comp.lang.c: Can someone give the standard function which can create positive integer value in C?
Other's have talked about "rand()",
but I don't see anything in your
post that requires it.
[...]
The subject was "Positive random number". That information should
have been in the body of the original post.
Th return value of rand isn't guaranteed to be positive.

pete
pete said:
Johannes Bauer wrote:
>> Keith Thompson schrieb:
Jack Klein <ja*******@spamcop.netwrites: On Tue, 18 Dec 2007 00:43:10 0800 (PST), deepak <de*********@gmail.comwrote in comp.lang.c: Can someone give the standard function which can create positive integer value in C? Other's have talked about "rand()", but I don't see anything in your post that requires it.
[...]
The subject was "Positive random number". That information should
have been in the body of the original post.
Th return value of rand isn't guaranteed to be positive.
Nor is it guaranteed to be random.

Richard Heathfield <http://www.cpax.org.uk>
Email: http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place"  dmr 29 July 1999
pete wrote:
The return value of rand isn't guaranteed to be positive.
What does "positive" mean? Is x positive if and only if x 0?
Does that mean that 0 is neither positive nor negative?
For the record, the rand function computes a sequence of
pseudorandom integers in the range 0 to RAND_MAX.
Spoon wrote:
pete wrote:
>The return value of rand isn't guaranteed to be positive.
What does "positive" mean? Is x positive if and only if x 0?
Does that mean that 0 is neither positive nor negative?
Correct.
Spoon said:
pete wrote:
>The return value of rand isn't guaranteed to be positive.
What does "positive" mean?
Greater than zero.
Is x positive if and only if x 0?
Yes.
Does that mean that 0 is neither positive nor negative?
Yes.
For the record, the rand function computes a sequence of
pseudorandom integers in the range 0 to RAND_MAX.
Yes.

Richard Heathfield <http://www.cpax.org.uk>
Email: http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place"  dmr 29 July 1999
Richard Heathfield schrieb:
>>The return value of rand isn't guaranteed to be positive.
What does "positive" mean?
Greater than zero.
>Is x positive if and only if x 0?
Yes.
>Does that mean that 0 is neither positive nor negative?
Yes.
The question if 0 is positive or not is one which has long been debated
my mathematicians around the world  and still is. Many are of the
opinion that it is useful to define it as positive, just as it is useful
to define 0^0 = 1 (although this is not as clear as it might seem).
The point is: It's a question a definition. Your answer is much too
dogmatic.
Greetings,
Johannes

"Viele der Theorien der Mathematiker sind falsch und klar
GotteslÃ¤sterlich. Ich vermute, dass diese falschen Theorien genau
deshalb so geliebt werden."  Prophet und VisionÃ¤r Hans Joss aka
HJP in de.sci.mathematik <47**********************@news.sunrise.ch>
Johannes Bauer wrote:
Richard Heathfield schrieb:
>>>The return value of rand isn't guaranteed to be positive. What does "positive" mean?
Greater than zero.
>>Is x positive if and only if x 0?
Yes.
>>Does that mean that 0 is neither positive nor negative?
Yes.
The question if 0 is positive or not is one which has long been debated
my mathematicians around the world  and still is. Many are of the
opinion that it is useful to define it as positive, just as it is useful
to define 0^0 = 1 (although this is not as clear as it might seem).
The point is: It's a question a definition. Your answer is much too
dogmatic.
There might be obscure discussions among mathematicians in which such a
definition is used, but I believe that in almost all contexts, the
overwhelming majority of the mathematically literate population consider
0 to be neither positive nor negative. I don't think it's excessively
dogmatic to insist on interpreting it that way in this context.
James Kuyper schrieb:
>The point is: It's a question a definition. Your answer is much too dogmatic.
There might be obscure discussions among mathematicians in which such a
definition is used, but I believe that in almost all contexts, the
overwhelming majority of the mathematically literate population consider
0 to be neither positive nor negative. I don't think it's excessively
dogmatic to insist on interpreting it that way in this context.
They are not obscure. Consider the work of Peano
( http://en.wikipedia.org/wiki/Giuseppe_Peano) which in his older works
state that the positive Integers start at 1, while at a later release
(Peano.G.: Formulaire de mathÃ©matiques 5 Bde. Turin, Bocca 18951908) he
states they start at zero.
It is *not* something that "almost all mathematicians" agree about, it
is primarily a question of usefulness. Both variants are common, it even
depends which university you're attending. Dogmatism are stupid, there
are good reasons why zero should be considered a positive integer and
there are also good reasons why it shouldn't. It's important to base
your decision on reason, not on "that's what I think everybody is doing".
Then again  in a trueley mathematic sense  almost all mathematicians
consider zero to be nonpositive. Almost all of them agree that zero is a
positive number, too. This is because "almost" in a mathematic sense
means "except for a finite number of exceptions" :)
Greetings,
Johannes

"Viele der Theorien der Mathematiker sind falsch und klar
GotteslÃ¤sterlich. Ich vermute, dass diese falschen Theorien genau
deshalb so geliebt werden."  Prophet und VisionÃ¤r Hans Joss aka
HJP in de.sci.mathematik <47**********************@news.sunrise.ch>
pete wrote:
Johannes Bauer wrote:
>Keith Thompson schrieb:
>>Jack Klein <ja*******@spamcop.netwrites: On Tue, 18 Dec 2007 00:43:10 0800 (PST), deepak <de*********@gmail.comwrote in comp.lang.c: Can someone give the standard function which can create positive integer value in C? Other's have talked about "rand()", but I don't see anything in your post that requires it. [...]
The subject was "Positive random number". That information should have been in the body of the original post.
Th return value of rand isn't guaranteed to be positive.
The rand() function computes a sequence of pseudorandom integers in the
range of 0 to RAND_MAX (as defined by the header file <stdlib.h>).
Johannes Bauer wrote:
James Kuyper schrieb:
>>The point is: It's a question a definition. Your answer is much too dogmatic.
There might be obscure discussions among mathematicians in which such a definition is used, but I believe that in almost all contexts, the overwhelming majority of the mathematically literate population consider 0 to be neither positive nor negative. I don't think it's excessively dogmatic to insist on interpreting it that way in this context.
They are not obscure. Consider the work of Peano
(http://en.wikipedia.org/wiki/Giuseppe_Peano) which in his older works
state that the positive Integers start at 1, while at a later release
(Peano.G.: Formulaire de mathÃ©matiques 5 Bde. Turin, Bocca 18951908) he
states they start at zero.
The sets he refers to are often called the "natural numbers", and there
*is* difference in the mathematical community as to whether they should
be defined to start at 0 or 1. But nobody ever asks the question "Is
zero natural?" because it's all a matter of definition, and so long as
you're clear which definition you're using, or the result is the same
regardless, it doesn't matter.
It is *not* something that "almost all mathematicians" agree about, it
is primarily a question of usefulness. Both variants are common, it even
depends which university you're attending. Dogmatism are stupid, there
are good reasons why zero should be considered a positive integer and
there are also good reasons why it shouldn't. It's important to base
your decision on reason, not on "that's what I think everybody is doing".
Really? At some point you just have to say "that's what I think
everybody is doing" because all you're doing is agreeing on a common
language. Which side of the road do you drive on? The same side everyone
else does. There is no reason it should be left or right  it just is.
I've never met anyone who considered zero to be positive. Therefore, I
do not consider zero to be positive. If I want to say "positive or zero"
I'd generally say "nonnegative".
Then again  in a trueley mathematic sense  almost all mathematicians
consider zero to be nonpositive. Almost all of them agree that zero is a
positive number, too. This is because "almost" in a mathematic sense
means "except for a finite number of exceptions" :)
Only when the "all" is an infinite set. Which the set of mathemeticians
isn't.
Phil
Johannes Bauer wrote:
[...]
Then again  in a trueley mathematic sense  almost all mathematicians
consider zero to be nonpositive. Almost all of them agree that zero is a
positive number, too. This is because "almost" in a mathematic sense
means "except for a finite number of exceptions" :)
#define is_zero_positive 0
T wrapper_positive(T number)
{
return is_zero_positive ? number : number + 1;
}
<gd&r>

Tor <bw****@wvtqvm.vw  tr izah az>
Philip Potter schrieb:
Really? At some point you just have to say "that's what I think
everybody is doing" because all you're doing is agreeing on a common
language. Which side of the road do you drive on? The same side everyone
else does. There is no reason it should be left or right  it just is.
Well at exactly *that* problem (zero positive or not) there's *no*
"common opinion". Impressively demonstrated by the fact that even Peano
himself (Peano Axioms! A *great* mathematician in the field of integer
arithmetic) had a reason to change his opinion.
Which fits your analogy nicely, as people in Great Britain drive on the
left side of the road and people in the US on the right side. So there
is obviously no dogmatic "correct way", but you have to ask: where
should I drive? In which environment is it *useful*? I will drive on the
left/right side because I an $WHEREEVER.
I've never met anyone who considered zero to be positive.
You just did.
Therefore, I
do not consider zero to be positive. If I want to say "positive or zero"
I'd generally say "nonnegative".
I've never met a person speaking Aymara, therefore I consider nobody is
speaking Aymara. Everyone who does is obviosly speaking the wrong language.
It's not something to argue about, actually: it's a definition (clear by
the meaning of the word "axiom", actually). It's just frustrating to
meet people over and over again who have never heared of any discussion
about this topic and therefore believe their opinion is the only/best
one. Reminds me of all these stupid US Americans who believe Europe is a
country and who become angry when you tell them that Mexico is a part of
America.
Greetings,
Johannes

"Viele der Theorien der Mathematiker sind falsch und klar
GotteslÃ¤sterlich. Ich vermute, dass diese falschen Theorien genau
deshalb so geliebt werden."  Prophet und VisionÃ¤r Hans Joss aka
HJP in de.sci.mathematik <47**********************@news.sunrise.ch>
Johannes Bauer wrote:
<snip discussion about whether zero should be considered
positive or not>
The status of zero in mathematics seems to be similar to that of the
photon in physics. The "correct" definition in a particular case is the
definition that yields good results!
santosh said:
Johannes Bauer wrote:
<snip discussion about whether zero should be considered
positive or not>
The status of zero in mathematics seems to be similar to that of the
photon in physics. The "correct" definition in a particular case is the
definition that yields good results!
The important thing is not what mathematicians think about 0, but what C
programmers think about 0. And it can be shown from the Standard that 0 is
neither positive nor negative.
See, for example, 3.3.5 (Multiplicative operators  and I'm quoting from
C89 here), which says (of division / and modulo %) that "if the value of
the second operand is zero, the behavior is undefined", before going on to
define the behaviour for positive and negative operands. If zero is either
positive or negative, a contradiction arises. Therefore, it cannot be
either.

Richard Heathfield <http://www.cpax.org.uk>
Email: http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place"  dmr 29 July 1999
Johannes Bauer wrote:
James Kuyper schrieb:
...
There might be obscure discussions among mathematicians in which such a
definition is used, but I believe that in almost all contexts, the
overwhelming majority of the mathematically literate population consider
0 to be neither positive nor negative. I don't think it's excessively
dogmatic to insist on interpreting it that way in this context.
They are not obscure. Consider the work of Peano
(http://en.wikipedia.org/wiki/Giuseppe_Peano) which in his older works
state that the positive Integers start at 1, while at a later release
(Peano.G.: Formulaire de mathématiques 5 Bde. Turin, Bocca 18951908) he
states they start at zero.
I think that counts as obscure, as far a nonmathematicians are
concerned.
It is *not* something that "almost all mathematicians" agree about, it
is primarily a question of usefulness. Both variants are common, it even
Again, I don't believe that both are common outside of mathematics
departments. Among users of mathematics, rather than producers, the
idea that 0 might count as positive is pretty much unheard of.
depends which university you're attending. Dogmatism are stupid, there
are good reasons why zero should be considered a positive integer and
there are also good reasons why it shouldn't. It's important to base
your decision on reason, not on "that's what I think everybody is doing".
My reason says that if the definition of positive is changed to ">=0",
I will still need a term for ">0", and it will have to be a new term
distinguishable from "positive". If you want to have a new name for
what I've always heard referred to as "nonnegative", why not give it
a name that has no prior contradictory associations? I personally have
never use "positive" in a context where the new proposed definition
would be an acceptable replacement, and I don't think I've ever seen
it used in such a context either.
Then again  in a trueley mathematic sense  almost all mathematicians
consider zero to be nonpositive. Almost all of them agree that zero is a
positive number, too. This is because "almost" in a mathematic sense
means "except for a finite number of exceptions" :)
I'm familiar with this meaning for "almost all", and I think you've
misapplied it. I don't remember the precise definition, but I believe
that the entire set has to be infinitely bigger than the set of
exceptions. For instance, a function that is 0 for all real values,
except that it is 1 for all integers, then that function is 0 "almost
everywhere". I don't believe that the set of mathematicians is
infinitely larger than the subset who hold those opinions.
In article <eb**********************************@n20g2000hsh. googlegroups.com>,
<ja*********@verizon.netwrote:
>I'm familiar with this meaning for "almost all", and I think you've misapplied it. I don't remember the precise definition, but I believe that the entire set has to be infinitely bigger than the set of exceptions. For instance, a function that is 0 for all real values, except that it is 1 for all integers, then that function is 0 "almost everywhere". I don't believe that the set of mathematicians is infinitely larger than the subset who hold those opinions.
"Almost all nonnegative even numbers less than 1 google are nonprime."
Is "1 google" infinite? No. Is the statement true? I think nearly
everyone (who knows what prime numbers are) would agree that it is
true.
"1 google" is close enough to "infinity" for practical purposes as to
make no difference, but I believe that if you change "google"
to "million" or even "thousand" that very close to the same number
of people would continue to agree that the modified statement is true.
I believe if you reduced the number down to 20 that the disagreement
rate would be very nearly the same; even at 11 I don't think the
disagreement rate would be significantly higher.
Now, if you reduced the limit to 3 then I could imagine people
getting bothered about the wording, since "almost all" in that case
would be empty. At 4 or 5 then the "almost all" sample size would
be the same as the size of the alternative and people might still
get flustered about the wording. But I believe that one single
exception out of a relatively small set would still broadly be agreed
as the rest being "almost all". I suspect that the psychology of
"almost all" gets more muddy when there are multiple exceptions.

We regret to announce that submillibarn resolution biohyperdimensional
plasmatic space polyimaging has been delayed until the release
of Windows Vista SP2.
In article <87************@blp.benpfaff.org>,
Ben Pfaff <bl*@cs.stanford.eduwrote:
>ro******@ibd.nrccnrc.gc.ca (Walter Roberson) writes:
>"Almost all nonnegative even numbers less than 1 google are nonprime."
>s/google/googol/
Dang. Good thing this isn't school and I don't have to write out
"googol" one googol times!

So you found your solution
What will be your last contribution?
 Supertramp (Fool's Overture) ro******@ibd.nrccnrc.gc.ca (Walter Roberson) writes:
[...]
"Almost all nonnegative even numbers less than 1 google are nonprime."
[...]
Quibble: the number is "googol", not "google". Google "googol" to
verify.

Keith Thompson (The_Other_Keith) <ks***@mib.org>
Looking for software development work in the San Diego area.
"We must do something. This is something. Therefore, we must do this."
 Antony Jay and Jonathan Lynn, "Yes Minister"
On Dec 18, 12:43 am, deepak <deepakpj...@gmail.comwrote:
Hi,
Can someone give the standard function which can create positive
integer value in C?
int the_standard_function(void)
{
return 1;
}
It's always positive, but the randomness has something to be desired.
So QOI could use some help.
user923005 said:
On Dec 18, 12:43 am, deepak <deepakpj...@gmail.comwrote:
>Hi,
Can someone give the standard function which can create positive integer value in C?
int the_standard_function(void)
{
return 1;
}
It's always positive, but the randomness has something to be desired.
So QOI could use some help.
This is better, but still needs work.
unsigned long the_standard_function_mk2(unsigned long seed)
{
return seed ? seed : ++seed;
}

Richard Heathfield <http://www.cpax.org.uk>
Email: http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place"  dmr 29 July 1999
Walter Roberson wrote:
In article <eb**********************************@n20g2000hsh. googlegroups.com>,
<ja*********@verizon.netwrote:
I'm familiar with this meaning for "almost all", and I think you've
misapplied it. I don't remember the precise definition, but I believe
that the entire set has to be infinitely bigger than the set of
exceptions. For instance, a function that is 0 for all real values,
except that it is 1 for all integers, then that function is 0 "almost
everywhere". I don't believe that the set of mathematicians is
infinitely larger than the subset who hold those opinions.
"Almost all nonnegative even numbers less than 1 google are nonprime."
Is "1 google" infinite? No. Is the statement true? I think nearly
everyone (who knows what prime numbers are) would agree that it is
true.
Johannes was, very explicitly, invoking the definition within advanced
mathematics of that term, not the ordinary definition. And the
mathematical definition of "almost all" does not cover your example.
If I remember correctly, it requires definition of a measure that can
be applied to the base set, and that measure has to be greater than 0;
while the measure of the exception set has to be exactly 0. For
instance, the appropriate measure for my example would one which
defines the measure of a set of real numbers x such that a<=x && x<=b
as being ba. Using that measure, the measure of the set of integers
is 0, since that set is a union of a countable infinity of subsets of
measure 0. On the other hand, the measure of the set of real numbers
is infinite.
For your example, since you're describing only integers, the most
appropriate measure would appear to be the count of the number of
elements in each set. When you apply that measure to your exception
set, it gives a nonzero value.
The commonsense definition of "almost all" cannot cover both of the
uses that Johannes made of the term, because at least one of the two
describes a majority of mathematicians (though he didn't identify
which one that was.
Richard Heathfield schrieb:
>The status of zero in mathematics seems to be similar to that of the photon in physics. The "correct" definition in a particular case is the definition that yields good results!
The important thing is not what mathematicians think about 0, but what C
programmers think about 0. And it can be shown from the Standard that 0 is
neither positive nor negative.
This is a very good point. So in terms of C, we have an exact answer.
Greetings,
Johannes

"Viele der Theorien der Mathematiker sind falsch und klar
GotteslÃ¤sterlich. Ich vermute, dass diese falschen Theorien genau
deshalb so geliebt werden."  Prophet und VisionÃ¤r Hans Joss aka
HJP in de.sci.mathematik <47**********************@news.sunrise.ch> ja*********@verizon.net schrieb:
I personally have
never use "positive" in a context where the new proposed definition
would be an acceptable replacement, and I don't think I've ever seen
it used in such a context either.
Yes, your reasoning sounds well. It's just that your earlier posting
gave me a wrong impression on what you thought, I guess. And I've been
exposed to far too many people who proclaimed "absolute thruths" without
judging their usefulness.
>Then again  in a trueley mathematic sense  almost all mathematicians consider zero to be nonpositive. Almost all of them agree that zero is a positive number, too. This is because "almost" in a mathematic sense means "except for a finite number of exceptions" :)
I'm familiar with this meaning for "almost all", and I think you've
misapplied it. I don't remember the precise definition, but I believe
that the entire set has to be infinitely bigger than the set of
exceptions.
Yes, I believe you are right here, I forgot about this constraint.
And, as Richard pointed out: In terms of C, there is only one answer :)
Greetings,
Johannes

"Viele der Theorien der Mathematiker sind falsch und klar
GotteslÃ¤sterlich. Ich vermute, dass diese falschen Theorien genau
deshalb so geliebt werden."  Prophet und VisionÃ¤r Hans Joss aka
HJP in de.sci.mathematik <47**********************@news.sunrise.ch>
Johannes Bauer wrote:
Reminds me of all these stupid US Americans who believe Europe is a
country and who become angry when you tell them that Mexico is a part
of America.
If you don't have a problem referring to
Los Estados Unidos Mexicanos as just "Mexico",
then you shouldn't have too much of a problem referring to
The United States Of America as just "America".

pete
pete wrote:
Johannes Bauer wrote:
>Reminds me of all these stupid US Americans who believe Europe is a country and who become angry when you tell them that Mexico is a part of America.
If you don't have a problem referring to
Los Estados Unidos Mexicanos as just "Mexico",
then you shouldn't have too much of a problem referring to
The United States Of America as just "America".
Hey...
"America" is a CONTINENT that goes from Alaska to Tierra del Fuego
in Chile and Argentina.
U.S. citizens are a small part of that continent.
Canada is a part of North America, together with Mexico.
But they are so taken for granted, the poor Canadians.
And Mexicans, well, forget them...
And the rest of the continent?
They don't count anyway.
Europe?
Ah yes, The capital of that country is London isn't it?

jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique http://www.cs.virginia.edu/~lccwin32
pete schrieb:
Johannes Bauer wrote:
>Reminds me of all these stupid US Americans who believe Europe is a country and who become angry when you tell them that Mexico is a part of America.
If you don't have a problem referring to
Los Estados Unidos Mexicanos as just "Mexico",
then you shouldn't have too much of a problem referring to
The United States Of America as just "America".
America is a continent.
United States of America are a country.
Mexico is a country.
Continent America != Country America
Big difference.
Greetings,
Johannes

"Viele der Theorien der Mathematiker sind falsch und klar
GotteslÃ¤sterlich. Ich vermute, dass diese falschen Theorien genau
deshalb so geliebt werden."  Prophet und VisionÃ¤r Hans Joss aka
HJP in de.sci.mathematik <47**********************@news.sunrise.ch>
jacob navia schrieb:
Europe?
Ah yes, The capital of that country is London isn't it?
No. It's Paris, where they eat fogs and the Leaning Tower of Pisa is
located!
Greetings,
Johannes

"Viele der Theorien der Mathematiker sind falsch und klar
GotteslÃ¤sterlich. Ich vermute, dass diese falschen Theorien genau
deshalb so geliebt werden."  Prophet und VisionÃ¤r Hans Joss aka
HJP in de.sci.mathematik <47**********************@news.sunrise.ch>
Walter Roberson wrote:
In article <87************@blp.benpfaff.org>,
Ben Pfaff <bl*@cs.stanford.eduwrote:
>ro******@ibd.nrccnrc.gc.ca (Walter Roberson) writes:
>>"Almost all nonnegative even numbers less than 1 google are nonprime."
>s/google/googol/
Dang. Good thing this isn't school and I don't have to write out
"googol" one googol times!
No, you have to arrange electrons to spell it out one googolplex times!
Ben Pfaff wrote:
ro******@ibd.nrccnrc.gc.ca (Walter Roberson) writes:
>"Almost all nonnegative even numbers less than 1 google are nonprime."
s/google/googol/
Why this disregard for the venerable googolplex?

Merry Christmas, Happy Hanukah, Happy New Year
Joyeux Noel, Bonne Annee.
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>

Posted via a free Usenet account from http://www.teranews.com
jacob navia wrote:
>
.... snip ...
>
Europe?
Ah yes, The capital of that country is London isn't it?
True. Since 1814 (or is it 1815?)

Merry Christmas, Happy Hanukah, Happy New Year
Joyeux Noel, Bonne Annee.
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>

Posted via a free Usenet account from http://www.teranews.com
Tor Rustad wrote:
deepak wrote:
>Can someone give the standard function which can create positive integer value in C?
There is no standard C function that creates numbers out of nothing.
However, the sequence "i = N;" is fairly safe, as long as N
represents a sequence of numeric digits (not including the ''
sign) which represents a value <= INT_MAX. This even has the
elegant characteristic of allowing you to pick your own integer
value (within broad limits).
Another sophisticated sequence (which is not always possible) is:
if (i < 0) i = i;
HTH

Merry Christmas, Happy Hanukah, Happy New Year
Joyeux Noel, Bonne Annee.
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>

Posted via a free Usenet account from http://www.teranews.com
Richard Bos wrote:
....
The USA will just have to get used to being part of a greater world. I
Actually, no it doesn't. The USA is large enough and powerful enough to
get away with considering itself as separate from the rest of the world,
and that is precisely how most USA citizens feel about it. I'm not
advocating this, just pointing it out.
Johannes Bauer wrote:
Philip Potter schrieb:
>Really? At some point you just have to say "that's what I think everybody is doing" because all you're doing is agreeing on a common language. Which side of the road do you drive on? The same side everyone else does. There is no reason it should be left or right  it just is.
Well at exactly *that* problem (zero positive or not) there's *no*
"common opinion". Impressively demonstrated by the fact that even Peano
himself (Peano Axioms! A *great* mathematician in the field of integer
arithmetic) had a reason to change his opinion.
Individual mathematicians often differ from orthodoxy. But the "zero
nonpositive" crowd still far outnumber the rest.
Which fits your analogy nicely, as people in Great Britain drive on the
left side of the road and people in the US on the right side. So there
is obviously no dogmatic "correct way", but you have to ask: where
should I drive? In which environment is it *useful*? I will drive on the
left/right side because I an $WHEREEVER.
And everywhere I have been, 0 is nonpositive.
>I've never met anyone who considered zero to be positive.
You just did.
Do you consider it to be intrinsic to the number or just a useful
definition?
>Therefore, I do not consider zero to be positive. If I want to say "positive or zero" I'd generally say "nonnegative".
I've never met a person speaking Aymara, therefore I consider nobody is
speaking Aymara. Everyone who does is obviosly speaking the wrong language.
Not the same thing at all. It's not in my interests to even consider
learning a word of Aymara, but if people want to speak it then I don't
care, so long as they don't try and speak it with me, and if they do
they should expect not to be understood.
It's not something to argue about, actually: it's a definition (clear by
the meaning of the word "axiom", actually). It's just frustrating to
meet people over and over again who have never heared of any discussion
about this topic and therefore believe their opinion is the only/best
one. Reminds me of all these stupid US Americans who believe Europe is a
country and who become angry when you tell them that Mexico is a part of
America.
Who said I'd never heard discussion on this topic before?
0 is not positive unless stated otherwise. It doesn't have to be this
way, and may in fact change over time [1] but currently it is.
Why get so angry?
Phil
[1] I might have this wrong, but I believe 1 was once considered prime.
Back then it was definitely prime, and these days it is definitely not.
James Kuyper wrote:
Richard Bos wrote:
...
>The USA will just have to get used to being part of a greater world. I
Actually, no it doesn't. The USA is large enough and powerful enough
to get away with considering itself as separate from the rest of the
world, and that is precisely how most USA citizens feel about it. I'm
not advocating this, just pointing it out.
But the more powerful it becomes, the more it seems to feel the need to
link itself into everyone else' affairs. :)
santosh wrote:
James Kuyper wrote:
>Richard Bos wrote: ...
>>The USA will just have to get used to being part of a greater world. I
Actually, no it doesn't. The USA is large enough and powerful enough to get away with considering itself as separate from the rest of the world, and that is precisely how most USA citizens feel about it. I'm not advocating this, just pointing it out.
But the more powerful it becomes, the more it seems to feel the need to
link itself into everyone else' affairs. :)
Of course; every powerful country does this; it's not peculiar to the USA.
In article <fk**********@aioe.orgPhilip Potter <pg*@doc.ic.ac.ukwrites:
Johannes Bauer wrote:
....
Which fits your analogy nicely, as people in Great Britain drive on the
left side of the road and people in the US on the right side. So there
is obviously no dogmatic "correct way", but you have to ask: where
should I drive? In which environment is it *useful*? I will drive on the
left/right side because I an $WHEREEVER.
And everywhere I have been, 0 is nonpositive.
Apparently you have never been in France, French speaking Belgium or
French speaking Switzerland (and probably quite a few other places with
strong influence from French mathematics).

dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
Dik T. Winter wrote:
In article <fk**********@aioe.orgPhilip Potter <pg*@doc.ic.ac.ukwrites:
Johannes Bauer wrote:
...
Which fits your analogy nicely, as people in Great Britain drive on the
left side of the road and people in the US on the right side. So there
is obviously no dogmatic "correct way", but you have to ask: where
should I drive? In which environment is it *useful*? I will drive on the
left/right side because I an $WHEREEVER.
>
And everywhere I have been, 0 is nonpositive.
Apparently you have never been in France, French speaking Belgium or
French speaking Switzerland (and probably quite a few other places with
strong influence from French mathematics).
Not to mention the number of cases where machine instructions follow
your plan. The first machine I learned on, 30 years ago, designed in
USA, had 2's complement integer and float, and considered 0 as positive.
On Thu, 20 Dec 2007 01:14:12 +0100, Johannes Bauer
<df***********@gmx.dewrote:
>pete schrieb:
>Johannes Bauer wrote:
>>Reminds me of all these stupid US Americans who believe Europe is a country and who become angry when you tell them that Mexico is a part of America.
If you don't have a problem referring to Los Estados Unidos Mexicanos as just "Mexico", then you shouldn't have too much of a problem referring to The United States Of America as just "America".
America is a continent.
Well, yes and no. Some people classify North America and South
America as a single continent. However, geologically speaking,
they are two separate continents on separate plates that are
connected by a (geologically) recent land bridge. The existence
of a single continent called America is a by no means universal
linguistic convention
[snip] This discussion thread is closed Replies have been disabled for this discussion. Similar topics
10 posts
views
Thread by Virus 
last post: by

10 posts
views
Thread by Johnny Snead 
last post: by
 
13 posts
views
Thread by Peter Oliphant 
last post: by
          