473,399 Members | 3,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

time()

I have no idea what to do with time () or another function to change the
time_t data type to int to get numbers say from 0-20 that are ints. time()
reports a huge number of seconds and when using rand() truely produce a fake
randomness. I want smaller numbers. We have functions like strtod and strtol
to change chars into doubles or longs why not change time_t to int?

Bill
Jun 27 '08 #1
23 1646
Bill Cunningham wrote:
I have no idea what to do with time () or another function to change the
time_t data type to int to get numbers say from 0-20 that are ints.
What units do you want? gmtime() will convert time_t into struct tm
fields. Standard C doesn't define the encoding of time_t values.
time()
reports a huge number of seconds
maybe
and when using rand() truely produce a fake
randomness.
A pseudo random numbergenerator does not generate true random values.

I want smaller numbers.

Take 0 -- it's a small number. If that isn't sufficient, define your
requirements more precisely.

We have functions like strtod and strtol
to change chars into doubles or longs why not change time_t to int?
gmtime() and localtime() do that.

--
Thad
Jun 27 '08 #2
"Bill Cunningham" <no****@nspam.comwrites:
I have no idea what to do with time () or another function to change the
time_t data type to int to get numbers say from 0-20 that are ints.
What for? If you want numbers in the range 0-20, what does that have
to do with time()?
time()
reports a huge number of seconds and when using rand() truely produce a fake
randomness.
I don't know what you mean by that. You're using time() and rand()
together somehow? How exactly? Presumably srand() is involved
somehow, but you didn't mention it.
I want smaller numbers. We have functions like strtod and strtol
to change chars into doubles or longs why not change time_t to int?
time_t is an arithmetic type capable of representing times. That's
*all* the standard tells you about it. You can convert a time_t value
to int the same way you'd convert any numeric type to another one
(just assign it), but that's not a useful thing to do; for one thing,
the result of time() may or may not fit within the range of int.

Let's back off a bit. You're trying to accomplish something, but you
haven't actually told us exactly what it is. Instead, you've thrown
together a few things that you might *use* to accomplish something
(time(), type time_t, type int, numbers in the range 0-20, rand(),
"smaller numbers") -- things that apparently aren't doing what you
want them to do.

It's like asking "Should I use a hammer or a screwdriver? What about
a staple gun?" without saying what you're trying to build.

First, tell us *exactly* what you want to accomplish. State your
problem without referring to any possible solution or piece of a
solution.

Then, *separately*, you might ask whether some proposed solution, or
something like it, will do what you want. If you can express the
proposed solution in C code, even if it doesn't work or is incorrect,
that's great. But we can't help without knowing what you're trying to
do.

Have you read <http://www.catb.org/~esr/faqs/smart-questions.html>?

You might also take a look at section 13 in the comp.lang.c FAQ,
particularly the questions on random numbers.

--
Keith Thompson (The_Other_Keith) <ks***@mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 27 '08 #3
[snip]
We have functions like strtod and strtol
>to change chars into doubles or longs why not change time_t to int?

gmtime() and localtime() do that.
OK Thad I'll try that. THanks.

Bill
Jun 27 '08 #4
[snip]
Let's back off a bit. You're trying to accomplish something, but you
haven't actually told us exactly what it is. Instead, you've thrown
together a few things that you might *use* to accomplish something
(time(), type time_t, type int, numbers in the range 0-20, rand(),
"smaller numbers") -- things that apparently aren't doing what you
want them to do.

It's like asking "Should I use a hammer or a screwdriver? What about
a staple gun?" without saying what you're trying to build.

First, tell us *exactly* what you want to accomplish. State your
problem without referring to any possible solution or piece of a
solution.

Then, *separately*, you might ask whether some proposed solution, or
something like it, will do what you want. If you can express the
proposed solution in C code, even if it doesn't work or is incorrect,
that's great. But we can't help without knowing what you're trying to
do.
Say you have two dice of six sides. Can you use rand() to create 12
options by rolling the die. Now there's another way you can do this simply
but using arrays but I do not know how. Something like this.

int a [12];

Ok there's 12 objects or

int a [20];

like I want. I can use for to loop over them but I can't get randomness.
That's a feature I do not know how to reproduce. It will have to someway
depend on the system and most use the system time.

Bill
Jun 27 '08 #5
I have no idea what to do with time () or another function to change the
>time_t data type to int to get numbers say from 0-20 that are ints. time()
What does the time have to do with the ints? Do you live on a
planet where there are 20 hours in a day?

If you want to convert the time to human-readable form (month, day,
year, hour, minute, second) use localtime(), although none of those
numbers run from 0-20 inclusive without also including some outside
that range.
>reports a huge number of seconds and when using rand() truely produce a fake
randomness. I want smaller numbers.
If you are trying to use time() as a pseudo-random seed generator
to get fake randomness, consider what the % operator does. What
number range might time() % 21 produce? What might happen if you
use it twice in the same second?
>We have functions like strtod and strtol
to change chars into doubles or longs why not change time_t to int?
time_t *is* an integer type, although it need not represent a "number
of <time unitsince <epoch>". It might not fit in an int.

Jun 27 '08 #6
Say you have two dice of six sides. Can you use rand() to create 12
>options by rolling the die.
Note that rolling two dice of six sides each (adding the results)
and rolling one die of 12 sides does NOT generate the same probability
distribution.
>Now there's another way you can do this simply
but using arrays but I do not know how. Something like this.

int a [12];

Ok there's 12 objects or

int a [20];

like I want. I can use for to loop over them but I can't get randomness.
Ok, you can use an array of N elements to translate from a number from
0 .. N-1 to something you want, where a[3] might be the code for the
"+1 sword of troll slaying".

Computers do not generate *real* random numbers without hardware
support. Common ways of getting random numbers include measuring
radioactive decay, measuring thermal noise, or fine-grained typing
of manual events like keystrokes.
>That's a feature I do not know how to reproduce. It will have to someway
depend on the system and most use the system time.
Note that if you use pseudo-random numbers to implement casino games
and let the public play these games, betting REAL money, you're going
to lose your shirt.

Something like rand() % 21 will generate numbers from 0 .. 20, inclusive,
but the distribution will not be exactly even since 21 does not divide
RAND_MAX+1 evenly.

Seeding rand() is often done with the system time, like:

srand((unsigned) time() );

Jun 27 '08 #7
[snip]
Note that if you use pseudo-random numbers to implement casino games
and let the public play these games, betting REAL money, you're going
to lose your shirt.

Something like rand() % 21 will generate numbers from 0 .. 20, inclusive,
but the distribution will not be exactly even since 21 does not divide
RAND_MAX+1 evenly.

Seeding rand() is often done with the system time, like:

srand((unsigned) time() );
I want to create a utility for playing online game like RPGs. So I was
wanting to write a "dice rolling" utility. That's exactly what I am wanting.

Bill
Jun 27 '08 #8
"Bill Cunningham" <no****@nspam.comwrites:
[snip]
>Let's back off a bit. You're trying to accomplish something, but you
haven't actually told us exactly what it is. Instead, you've thrown
together a few things that you might *use* to accomplish something
(time(), type time_t, type int, numbers in the range 0-20, rand(),
"smaller numbers") -- things that apparently aren't doing what you
want them to do.

It's like asking "Should I use a hammer or a screwdriver? What about
a staple gun?" without saying what you're trying to build.

First, tell us *exactly* what you want to accomplish. State your
problem without referring to any possible solution or piece of a
solution.

Then, *separately*, you might ask whether some proposed solution, or
something like it, will do what you want. If you can express the
proposed solution in C code, even if it doesn't work or is incorrect,
that's great. But we can't help without knowing what you're trying to
do.
I wrote the above. When you posted your followup, your newsreader
should have provided an attribution line, something like

Keith Thompson <ks***@mib.orgwrites:

Please leave that line in place. Quoting somebody without attribution
is considered rude. (I think I've told you this before.)
Say you have two dice of six sides. Can you use rand() to create 12
options by rolling the die. Now there's another way you can do this simply
but using arrays but I do not know how. Something like this.

int a [12];

Ok there's 12 objects or

int a [20];

like I want. I can use for to loop over them but I can't get randomness.
That's a feature I do not know how to reproduce. It will have to someway
depend on the system and most use the system time.
You're still not making sense.

If I roll two six-sided dice, there are 36 (6*6) possible outcomes,
not 12. I suppose you could divide these up into 12 sets of 3
outcomes each, but I suspect that's not what you had in mind.

You stated your problem extremely vaguely, and mixed it with a
mishmash of possible pieces of a solution (rand(), a 12-element or
20-element array, a for loop, the system time). That's exactly what I
asked you not to do.

Please start by stating the problem you're trying to solve *without*
reference to the method used to solve it. Don't talk about rand(), or
time_t, or time(). Tell us what result you're trying to achieve. You
should be able to do that in one sentence or one short paragraph.

An example:

I want to generate a sequence of 73 uniformly distributed random
numbers, each in the range 37 to 153. I want the sequence to be
different each time I run my program.

(I've deliberately written something that differs from what you seem
to be looking for. You need to tell us what you want.)

Once you've done that, and *only* after you've done that, you can ask
whether certain tools (rand(), time(), a for loop) might or might not
be part of a solution.

--
Keith Thompson (The_Other_Keith) <ks***@mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 27 '08 #9
go***********@burditt.org (Gordon Burditt) writes:
[...]
time_t *is* an integer type, although it need not represent a "number
of <time unitsince <epoch>". It might not fit in an int.
time_t is an integer type on most implementations. The standard only
guarantees that it's an arithmetic type capable of representing times.
It could be floating-point. (It could even, in a sufficiently
perverse implementation, be complex or imaginary.)

(I do not give permission to quote this article, or any other article
I post to Usenet, without attribution.)

--
Keith Thompson (The_Other_Keith) <ks***@mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 27 '08 #10

"Keith Thompson" <ks***@mib.orgwrote in message
news:87************@kvetch.smov.org...
I wrote the above. When you posted your followup, your newsreader
should have provided an attribution line, something like

Keith Thompson <ks***@mib.orgwrites:

Please leave that line in place. Quoting somebody without attribution
is considered rude. (I think I've told you this before.)
Now is this how it should be. I'm using outlook express :( It took me
awhile way way back to learn not to top post. Sorry I will work on this. I
have to do it all manually.

Bill
Jun 27 '08 #11

"Keith Thompson" <ks***@mib.orgwrote in message
news:87************@kvetch.smov.org...
(I do not give permission to quote this article, or any other article
I post to Usenet, without attribution.)
What do you mean by this Keith? Do you not want to be quoted in clc's
message threads?

Bill
Jun 27 '08 #12

"Keith Thompson" <ks***@mib.orgwrote in message
news:87************@kvetch.smov.org...
"Bill Cunningham" <no****@nspam.comwrites:
>[snip]
Say you have two dice of six sides. Can you use rand() to create 12
options by rolling the die. Now there's another way you can do this
simply
but using arrays but I do not know how. Something like this.

int a [12];

Ok there's 12 objects or

int a [20];

like I want. I can use for to loop over them but I can't get randomness.
That's a feature I do not know how to reproduce. It will have to someway
depend on the system and most use the system time.

You're still not making sense.

If I roll two six-sided dice, there are 36 (6*6) possible outcomes,
not 12. I suppose you could divide these up into 12 sets of 3
outcomes each, but I suspect that's not what you had in mind.
I make it only 11 outcomes (1+1 to 6+6). Although if you listed all
combinations there would be 36.

If certain combinations are important, then you can list the 6 outcomes for
each die separately, totalling 12 outcomes.

--
Bartc

Jun 27 '08 #13
Bill Cunningham wrote:
I want to create a utility for playing online game like RPGs. So I was
wanting to write a "dice rolling" utility. That's exactly what I am wanting.
/* BEGIN dice.c */

#include <stdio.h>
#include <stdlib.h>

#define THROWS 1000
#define str(s) # s
#define xstr(s) str(s)

int main(void)
{
int sum[13] = {0};
unsigned count = THROWS;

while (count-- != 0) {
++sum[rand() % 6 + 1 + rand() % 6 + 1];
}
puts("Dice totals from "xstr(THROWS)" throws of a pair of dice:");
puts("value count");
for (count = 0; count != sizeof sum / sizeof *sum; ++count) {
printf("%2u %2d\n", count, sum[count]);
}
return 0;
}

/* END dice.c */

--
pete
Jun 27 '08 #14

"pete" <pf*****@mindspring.comwrote in message
news:ws******************************@earthlink.co m...
>
/* BEGIN dice.c */

#include <stdio.h>
#include <stdlib.h>

#define THROWS 1000
#define str(s) # s
#define xstr(s) str(s)

int main(void)
{
int sum[13] = {0};
unsigned count = THROWS;

while (count-- != 0) {
++sum[rand() % 6 + 1 + rand() % 6 + 1];
}
puts("Dice totals from "xstr(THROWS)" throws of a pair of dice:");
puts("value count");
for (count = 0; count != sizeof sum / sizeof *sum; ++count) {
printf("%2u %2d\n", count, sum[count]);
}
return 0;
}

/* END dice.c */
Thanks Pete but I can't read some of the program. What does int sum
[13]={0}; mean? Why is there a zero in parenthesis? Also
#define str(s) # s
#define xstr(s) str(s)
What does that code do?

The rest I can pretty much make out. But what does the % after rand mean?

This is how to learn C.

Bill

Jun 27 '08 #15
Bill Cunningham wrote:
"pete" <pf*****@mindspring.comwrote in message
news:ws******************************@earthlink.co m...
>/* BEGIN dice.c */

#include <stdio.h>
#include <stdlib.h>

#define THROWS 1000
#define str(s) # s
#define xstr(s) str(s)

int main(void)
{
int sum[13] = {0};
unsigned count = THROWS;

while (count-- != 0) {
++sum[rand() % 6 + 1 + rand() % 6 + 1];
}
puts("Dice totals from "xstr(THROWS)" throws of a pair of dice:");
puts("value count");
for (count = 0; count != sizeof sum / sizeof *sum; ++count) {
printf("%2u %2d\n", count, sum[count]);
}
return 0;
}

/* END dice.c */

Thanks Pete but I can't read some of the program.
The program shows the results of a thousand pair of dice tosses
in terms of the sum of the pair of dice.
It shows the relative frequency of the sums,
such as 7 being the most commonly rolled sum,
with 2 and 12 being the least rolled.

On my machine, the output looks like this:

Dice totals from 1000 throws of a pair of dice:
value count
0 0
1 0
2 29
3 52
4 82
5 113
6 145
7 167
8 130
9 122
10 78
11 57
12 25
What does int sum [13]={0}; mean?
That's an array for recording how many times each number is rolled.
The sum of the two dice is going to be somewhere from 2 to 12.

int sum [13] gives me an array of elements from sum[0] to sum[12].
Why is there a zero in parenthesis?
Parentheses are required for array initializers.
A single zero in parenthesis,
initializes every element of the array with a value of zero.

The array elements record how many times each number was rolled.
If a pair of dice sum up to two , then ++sum[ 2].
If a pair of dice sum up to twelve, then ++sum[12].
Also
#define str(s) # s
>#define xstr(s) str(s)

What does that code do?
Small picture:
with
#define THROWS 1000
it makes (xstr(THROWS)) equivalent to ("1000")

That makes
#define THROWS 1000
puts("Dice totals from "xstr(THROWS)" throws of a pair of dice:");
act like
puts("Dice totals from 1000 throws of a pair of dice:");

I copied the xstr() macro from the standard.
But what does the % after rand mean?
rand() returns a value from 0 to RAND_MAX.
RAND_MAX is always at least 0x7fff.

(rand() % 6) is a value from 0 to 5.

(rand() % 6 + 1) is a value from 1 to 6.

(rand() % 6 + 1 + rand() % 6 + 1) is a value from 2 to 12.

--
pete
Jun 27 '08 #16
"Bill Cunningham" <no****@nspam.comwrites:
"Keith Thompson" <ks***@mib.orgwrote in message
news:87************@kvetch.smov.org...
>(I do not give permission to quote this article, or any other article
I post to Usenet, without attribution.)
What do you mean by this Keith? Do you not want to be quoted in clc's
message threads?
No, I do not want to be quoted *without attribution*.

Gordon Burditt deliberately deletes attribution lines from quoted
material when he posts followups. The above was directed primarily at
him. He's welcome to quote me (as is anyone else), but not without
giving me credit for my words.

--
Keith Thompson (The_Other_Keith) <ks***@mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 27 '08 #17
In comp.lang.c, Bill Cunningham wrote:
>
"pete" <pf*****@mindspring.comwrote in message
news:ws******************************@earthlink.co m...
>>
/* BEGIN dice.c */

#include <stdio.h>
#include <stdlib.h>

#define THROWS 1000
#define str(s) # s
#define xstr(s) str(s)

int main(void)
{
int sum[13] = {0};
unsigned count = THROWS;

while (count-- != 0) {
++sum[rand() % 6 + 1 + rand() % 6 + 1];
}
puts("Dice totals from "xstr(THROWS)" throws of a pair of dice:");
puts("value count");
for (count = 0; count != sizeof sum / sizeof *sum; ++count) {
printf("%2u %2d\n", count, sum[count]);
}
return 0;
}

/* END dice.c */

Thanks Pete but I can't read some of the program. What does int sum
[13]={0}; mean? Why is there a zero in parenthesis?
int sum[13] = {0};

declares sum to be an array of 13 integers, and initializes all elements of
the array to zero. The
{0}
is short form for
{0,0,0,0,0,0,0,0,0,0,0,0,0}

Also
#define str(s) # s
>#define xstr(s) str(s)

What does that code do?
The first #define defines a macro that expands into the macro argument
preceded by the "stringize" macro operator. The second #define defines a
macro that uses the first macro to change it's argument into a string.

Together, they make it such that, with
#define THROWS 1000
the macro invocation
xstr(THROWS)
expands to
str(1000)
which expands to
# 1000
which "stringizes" into the C string
"1000"
The rest I can pretty much make out. But what does the % after rand mean?
That's the C "modulo" operator. It provides the remainder of an integer
division. 3 / 2 == 1
3 % 2 == 1 == (3 - ((3/2)*2))

This is how to learn C.
--
Lew Pitcher

Master Codewright & JOAT-in-training | Registered Linux User #112576
http://pitcher.digitalfreehold.ca/ | GPG public key available by request
---------- Slackware - Because I know what I'm doing. ------
Jun 27 '08 #18
"Bartc" <bc@freeuk.comwrites:
"Keith Thompson" <ks***@mib.orgwrote in message
news:87************@kvetch.smov.org...
>"Bill Cunningham" <no****@nspam.comwrites:
>>[snip]
Say you have two dice of six sides. Can you use rand() to create 12
options by rolling the die. Now there's another way you can do this
simply
but using arrays but I do not know how. Something like this.

int a [12];

Ok there's 12 objects or

int a [20];

like I want. I can use for to loop over them but I can't get randomness.
That's a feature I do not know how to reproduce. It will have to someway
depend on the system and most use the system time.

You're still not making sense.

If I roll two six-sided dice, there are 36 (6*6) possible outcomes,
not 12. I suppose you could divide these up into 12 sets of 3
outcomes each, but I suspect that's not what you had in mind.

I make it only 11 outcomes (1+1 to 6+6). Although if you listed all
combinations there would be 36.
Exactly. 1+6 is distinct from 2+5, for example.
If certain combinations are important, then you can list the 6 outcomes for
each die separately, totalling 12 outcomes.
Only if you first randomly choose one of the two dice to throw by
itself.

--
Keith Thompson (The_Other_Keith) <ks***@mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 27 '08 #19
Keith Thompson wrote:
"Bartc" <bc@freeuk.comwrites:
>"Keith Thompson" <ks***@mib.orgwrote in message
news:87************@kvetch.smov.org...
>>"Bill Cunningham" <no****@nspam.comwrites:
[snip]
Say you have two dice of six sides. Can you use rand() to create 12
options by rolling the die. Now there's another way you can do this
simply
but using arrays but I do not know how. Something like this.

int a [12];

Ok there's 12 objects or

int a [20];

like I want. I can use for to loop over them but I can't get randomness.
That's a feature I do not know how to reproduce. It will have to someway
depend on the system and most use the system time.
You're still not making sense.

If I roll two six-sided dice, there are 36 (6*6) possible outcomes,
not 12. I suppose you could divide these up into 12 sets of 3
outcomes each, but I suspect that's not what you had in mind.
I make it only 11 outcomes (1+1 to 6+6). Although if you listed all
combinations there would be 36.

Exactly. 1+6 is distinct from 2+5, for example.
But more controversially, 1+6 is distinct from 6+1,
if you think that there are 36 (6*6) possible outcomes.

--
pete
Jun 27 '08 #20
pete <pf*****@mindspring.comwrites:
Keith Thompson wrote:
>"Bartc" <bc@freeuk.comwrites:
>>"Keith Thompson" <ks***@mib.orgwrote in message
news:87************@kvetch.smov.org...
"Bill Cunningham" <no****@nspam.comwrites:
[snip]
Say you have two dice of six sides. Can you use rand() to create 12
options by rolling the die. Now there's another way you can do
this simply
but using arrays but I do not know how. Something like this.
>
int a [12];
>
Ok there's 12 objects or
>
int a [20];
>
like I want. I can use for to loop over them but I can't get randomness.
That's a feature I do not know how to reproduce. It will have to someway
depend on the system and most use the system time.
You're still not making sense.

If I roll two six-sided dice, there are 36 (6*6) possible outcomes,
not 12. I suppose you could divide these up into 12 sets of 3
outcomes each, but I suspect that's not what you had in mind.
I make it only 11 outcomes (1+1 to 6+6). Although if you listed all
combinations there would be 36.

Exactly. 1+6 is distinct from 2+5, for example.

But more controversially, 1+6 is distinct from 6+1,
if you think that there are 36 (6*6) possible outcomes.
There are 36 equally probable outcomes. Use differently colored dice
to make this clearer.

But the point is that the OP was talking about 12 outcomes, which
doesn't make any sense unless he wants to divide the 36 outcomes into
12 sets of 3 each. I seriously doubt that that's what he had in mind,
though; he probably was thinking that 6 outcomes for one die plus 6
for the other equals 12 possible outcomes.

--
Keith Thompson (The_Other_Keith) <ks***@mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 27 '08 #21

"Keith Thompson" <ks***@mib.orgwrote in message
news:87************@kvetch.smov.org...
"Bartc" <bc@freeuk.comwrites:
>"Keith Thompson" <ks***@mib.orgwrote in message
news:87************@kvetch.smov.org...
>>"Bill Cunningham" <no****@nspam.comwrites:
[snip]
Say you have two dice of six sides. Can you use rand() to create 12
options by rolling the die. Now there's another way you can do this
simply
but using arrays but I do not know how. Something like this.

int a [12];

Ok there's 12 objects or

int a [20];

like I want. I can use for to loop over them but I can't get
randomness.
That's a feature I do not know how to reproduce. It will have to
someway
depend on the system and most use the system time.

You're still not making sense.

If I roll two six-sided dice, there are 36 (6*6) possible outcomes,
not 12. I suppose you could divide these up into 12 sets of 3
outcomes each, but I suspect that's not what you had in mind.

I make it only 11 outcomes (1+1 to 6+6). Although if you listed all
combinations there would be 36.

Exactly. 1+6 is distinct from 2+5, for example.
>If certain combinations are important, then you can list the 6 outcomes
for
each die separately, totalling 12 outcomes.

Only if you first randomly choose one of the two dice to throw by
itself.
They're identical. It doesn't matter which one is thrown first. Just program
the machine 'not to look' until the second one is thrown.

Anyway it's not clear why arrays are needed. Each double throw can be
represented by a single char value.

--
Bartc
Jun 27 '08 #22
Gordon Burditt wrote:
> Say you have two dice of six sides. Can you use rand() to create
12 options by rolling the die.

Note that rolling two dice of six sides each (adding the results)
and rolling one die of 12 sides does NOT generate the same probability
distribution.
Esp. the probabily of a 1 is 0 with 2 dice.

Bye, Jojo
Jun 27 '08 #23
Bill Cunningham wrote:
"Keith Thompson" <ks***@mib.orgwrote in message
news:87************@kvetch.smov.org...
>I wrote the above. When you posted your followup, your newsreader
should have provided an attribution line, something like

Keith Thompson <ks***@mib.orgwrites:

Please leave that line in place. Quoting somebody without
attribution is considered rude. (I think I've told you this before.)

Now is this how it should be. I'm using outlook express :( It
Me too, and I never had that issue.
took me awhile way way back to learn not to top post. Sorry I will
work on this. I have to do it all manually.
Have a look at OE-QuoteFix. It solves several weaknesses of OE

Bye, Jojo
Jun 27 '08 #24

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

Similar topics

8
by: Bart Nessux | last post by:
am I doing this wrong: print (time.time() / 60) / 60 #time.time has been running for many hours if time.time() was (21600/60) then that would equal 360/60 which would be 6, but I'm not getting...
5
by: David Stockwell | last post by:
I'm sure this has been asked before, but I wasn't able to find it. First off I know u can't change a tuple but if I wanted to increment a time tuple by one day what is the standard method to do...
6
by: David Graham | last post by:
Hi I have asked this question in alt.php as the time() function as used in setcookie belongs to php - or does it belong equally in the javascript camp - bit confused about that. Anyway, can anyone...
3
by: Szabolcs Nagy | last post by:
I have to measure the time of a while loop, but with time.clock i always get 0.0s, although python manual sais: "this is the function to use for benchmarking Python or timing algorithms" So i...
6
by: Rebecca Smith | last post by:
Today’s question involves two time text boxes each set to a different time zone. Initially txtCurrentTime will be set to Pacific Time or system time. This will change with system time as we travel...
3
by: luscus | last post by:
Thanks for all the responses on my first question. Unfortunately the answers I was given were too complicated for my small brain , and neophite condition to understand. So if you could talk down to...
3
by: cj | last post by:
If I want to check to see if it's after "11:36 pm" what would I write? I'm sure it's easy but I'm getting tired of having to work with dates and times. Sometimes I just want time or date. And...
1
by: davelist | last post by:
I'm guessing there is an easy way to do this but I keep going around in circles in the documentation. I have a time stamp that looks like this (corresponding to UTC time): start_time =...
2
by: Roseanne | last post by:
We are experiencing very slow response time in our web app. We run IIS 6 - windows 2003. I ran iisstate. Here's what I got. Any ideas?? Opened log file 'F:\iisstate\output\IISState-812.log'...
9
by: Ron Adam | last post by:
I'm having some cross platform issues with timing loops. It seems time.time is better for some computers/platforms and time.clock others, but it's not always clear which, so I came up with the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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

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