473,883 Members | 2,581 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

rolling dice

Let's say I have m dice having n sides, such that n^m is not going to bust
int as a datatype. With m=4 and n=6, an outcome might be {2, 5, 1, 2}.
What is a good way to represent this in c so that I can check cases by brute
force? EC
Sep 30 '06
101 6441

Keith Thompson <ks***@mib.orgw rote in message
news:ln******** ****@nuthaus.mi b.org...
"Bill Reid" <ho********@hap pyhealthy.netwr ites:
[...]
You know, it just struck me about the whole stalking thing: when you
went on your insano rant about NASDAQ not allowing shorting, there
had to more than few people who immediately knew you didn't know
what you were talking about. But unlike stupid me, they "averted their
eyes", and just hurried along with their business...I could learn
something
from them, just let the kooks lay, everybody sane knows who they
are anyway...

Perhaps most of us "averted our eyes" because we realized that this
entire discussion is OFF TOPIC.
Perhaps for many...but, of course, not for you, since you read 17K of
post to make this response. Right?
Would you consider taking it someplace else?
Apparently, I don't have that power. When you were slavishly
reading the 17K post, you may have noted that I suggested the
individual in question share his remarkable knowledge with
the people on misc.invest.sto cks, so that they may comment
on his "revelation s". Not surprisingly, he chose not to do so, but
rather he chose to entertain YOU (and a few others who have
explicitly expressed interest) with a further 17K of insane
ramblings.

Maybe if YOU made the same suggestion to him, he would
vacate these premises and provide his valuable stock-picking
services to a more appropriate audience...

....of course, if I believed that, I'D be the crazy one. But
I am STRONGLY suggesting that you give it the "old college try"
anyway. Frankly, at this point, I'd be mortified to call myself
a "profession al" programmer with this guy on "my team", but
then I actually have just a SHRED of self-respect...

---
William Ernest Reid

Oct 20 '06 #81
"Bill Reid" <ho********@hap pyhealthy.netwr ites:
Keith Thompson <ks***@mib.orgw rote in message
news:ln******** ****@nuthaus.mi b.org...
>"Bill Reid" <ho********@hap pyhealthy.netwr ites:
[...]
You know, it just struck me about the whole stalking thing: when
you went on your insano rant about NASDAQ not allowing shorting,
there had to more than few people who immediately knew you didn't
know what you were talking about. But unlike stupid me, they
"averted their eyes", and just hurried along with their
business...I could learn something from them, just let the kooks
lay, everybody sane knows who they are anyway...

Perhaps most of us "averted our eyes" because we realized that this
entire discussion is OFF TOPIC.
Perhaps for many...but, of course, not for you, since you read 17K of
post to make this response. Right?
Wrong. I've barely skimmed some of it, which was more than enough to
know that it's off-topic.
>Would you consider taking it someplace else?
Apparently, I don't have that power. When you were slavishly
reading the 17K post, you may have noted that I suggested the
individual in question share his remarkable knowledge with
the people on misc.invest.sto cks, so that they may comment
on his "revelation s". Not surprisingly, he chose not to do so, but
rather he chose to entertain YOU (and a few others who have
explicitly expressed interest) with a further 17K of insane
ramblings.
I was addressing my suggestion to *both* of you. You have the power
to stop discussing it in comp.lang.c, whatever the other participant
chooses to do. And so does he (I don't even remember who the other
participant is). The fact that I responded to one of your articles
rather than one of his doesn't mean anything.
Maybe if YOU made the same suggestion to him, he would
vacate these premises and provide his valuable stock-picking
services to a more appropriate audience...
I don't *care* whether either of you talks about it somewhere else or
not. I am asking each of your, or either of you, to stop talking
about it here.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Oct 20 '06 #82
"Bill Reid" <ho********@hap pyhealthy.netwr ote:
Keith Thompson <ks***@mib.orgw rote in message
Would you consider taking it someplace else?
Apparently, I don't have that power.
So you don't know about Followup-To? Odd. I do.

Richard
Oct 20 '06 #83
While it was refreshing 15 messages ago to hear in clc that MS exists, the
quitting bell sounded when Heathfield said "enough already." Rolling dice
has crapped out. EC
Oct 20 '06 #84

Rod Pemberton <do*********@bi tfoad.cmmwrote in message
news:eh******** **@main.corriga .net...
"Bill Reid" <ho********@hap pyhealthy.netwr ote in message
news:Wt******** ***********@bgt nsc04-news.ops.worldn et.att.net...
Rod Pemberton <do*********@bi tfoad.cmmwrote in message
news:eh******** **@main.corriga .net...
"Bill Reid" <ho********@hap pyhealthy.netwr ote in message
news:Ly******** ***********@bgt nsc04-news.ops.worldn et.att.net...

Shorting
and the short interest you see could be simulated by other executions
services.
Uh-oh, I don't like where this is going...man, do you have a hard head.
Never say die, eh?

Of course, shorting is done by brokers, not by exchanges. This is
true of ALL short sales, not just NASDAQ. As far as the exchange
is concerned, it's just another transaction, aside from any member
broker restrictions or SEC rules governing how brokers may implement
short sales.
Like I said, I'll look it up someday... Or, you could point me
to the press release on one of NASDAQ websites.
>
OK, here it is:

10/16/2006 (Rootyrs) - In a surprise move, NASDAQ today
announced that brokers may now continue to provide short sale
transactions to customers just as they have since the inception of
NASDAQ in the '70s. There was widespread doubt that they
would continue to allow the popular practice because some
Usenet kook claimed that NASDAQ didn't allow short sales
in a goofy post. In related news, God is considering switching
the period in which the sun shines to nighttime...
Amazing, you declare it to be true, me to be false, and yet, the _simple_
task of posting something proving your truth eludes you... I see why they
called you "Reidiot": no basis in fact.
OK, you want a "press release", here it is. I got this "press release"
from NASDAQ by typing "NASDAQ short sales" into the "Search"
box of http://www.google.com, and it was the second unsponsered
link (note that all the top links are from the http://www.nasdaq.com
web site which provide the current and historical NASDAQ "short
interest" that you claim doesn't exist). This is something that an
eight-year-old girl could and would do in a matter of seconds to
ascertain a "fact", but seems to completely elude you, you "profession al
programmer", you:

http://www.nasdaq.com/newsroom/news/...tion06_113.stm

THE NASDAQ STOCK MARKET ANNOUNCES
OPEN SHORT INTEREST POSITIONS IN NASDAQ
STOCKS FOR SEPTEMBER 2006

New York, NY, September 26, 2006 -As of mid-September,
short interest in 2,730 NASDAQ Global MarketSM securities
totaled 7,209,431,128 shares compared with 7,112,973,390
shares in 2,718 Global Market issues for the month of August.

The September short interest represents 4.39 days average
daily NASDAQ Global Market share volume for the reporting
period, compared with 3.72 days in August. Short interest in 564
securities on The NASDAQ Capital MarketSM totaled
144,343,205 shares for September, compared with 155,133,038
shares in 568 securities for the month of August. This represents
3.33 days average daily volume, compared with last month's
figure of 3.06.

In summary, short interest in all 3,294 NASDAQ® securities
totaled 7,353,774,333 shares for September, compared with
3,286 issues and 7,268,106,428 shares in August. This is 4.36
days average daily volume, compared with last month's average
of 3.70 days.

The open short-interest positions reported for each NASDAQ
security reflect the total number of shares sold short by all
broker/dealers regardless of their exchange affiliations. A short sale
is generally understood to mean the sale of a security that the seller
does not own or any sale that is consummated by the delivery of a
security borrowed by or for the account of the seller.

The monthly NASDAQ short-interest figures are current as of the
14th of the month and are released to the media after the market
close on the seventh business day following that date. The figures
this month include all short-interest positions reported from
August 10, 2006 through September 12, 2006 and settled
as of September 15, 2006.

The total NASDAQ short positions for the preceding 12 months
and current month follow:

Settlement Date Total Short Interest Number of
Securities
September 15, 2005 5,811,842,432 3,337
October 14, 2005 5,944,351,614 3,316
November 15, 2005 5,913,634,842 3,302
December 15, 2005 5,882,483,998 3,311
January 13, 2006 5,885,355,970 3,312
February 15, 2006 5,801,377,970 3,305
March 15, 2006 6,198,926,815 3,295
April 13, 2006 6,286,025,884 3,282
May 15, 2006 6,451,337,395 3,301
June 15, 2006 7,188,384,593 3,299
July 14, 2006 7,139,899,294 3,300
August 15, 2006 7,268,106,428 3,286
September 15, 2006 7,353,774,333 3,294

For more information on NASDAQ Short-Interest positions, including
publication dates, visit www.nasdaqtrader.com/asp/short_interest.asp.
# # #

Media Contacts:
Wayne Lee, NASDAQ
301.978.4875

---end of "non-existent" press release

I've asked you to take this discussion somewhere else more
appropriate...m aybe you could just "crank call" Mr. Wayne Lee
at NASDAQ press relations 301.978.4875 and bug him
for a while? Although your "profession al programmer" colleagues
seem to be quite charmed with your tenacious pursuit of the
non-truth, I do grow weary talking to looney retards and
would prefer to just "fire" you and get back to making money...

---
William Ernest Reid

Oct 20 '06 #85

Keith Thompson <ks***@mib.orgw rote in message
news:ln******** ****@nuthaus.mi b.org...
"Bill Reid" <ho********@hap pyhealthy.netwr ites:
Keith Thompson <ks***@mib.orgw rote in message
news:ln******** ****@nuthaus.mi b.org...
"Bill Reid" <ho********@hap pyhealthy.netwr ites:
[...]
You know, it just struck me about the whole stalking thing: when
you went on your insano rant about NASDAQ not allowing shorting,
there had to more than few people who immediately knew you didn't
know what you were talking about. But unlike stupid me, they
"averted their eyes", and just hurried along with their
business...I could learn something from them, just let the kooks
lay, everybody sane knows who they are anyway...

Perhaps most of us "averted our eyes" because we realized that this
entire discussion is OFF TOPIC.
Perhaps for many...but, of course, not for you, since you read 17K of
post to make this response. Right?

Wrong. I've barely skimmed some of it, which was more than enough to
know that it's off-topic.
Sure, whatever you say...
Would you consider taking it someplace else?
Apparently, I don't have that power. When you were slavishly
reading the 17K post, you may have noted that I suggested the
individual in question share his remarkable knowledge with
the people on misc.invest.sto cks, so that they may comment
on his "revelation s". Not surprisingly, he chose not to do so, but
rather he chose to entertain YOU (and a few others who have
explicitly expressed interest) with a further 17K of insane
ramblings.

I was addressing my suggestion to *both* of you.
Wrong. You specifically replied to my post. I waited patiently
to see if you would make the same request of the alleged "Jurassic
Park programmer", but disappointingly , your vigilance on the topic
of off-topicality wavered.

You've mischaracterize d this "discussion " as being about the
"stock market". It has nothing to do with the "stock market".
It has to do with "profession al" programmers ripping off their
employers, or with severe mental illness. If this guy actually
worked for three years for a brokerage as he claimed, he
STOLE every single penny they paid him, and he's revealing
exactly the behavior he used to steal it.

Or he's just a complete looney fake with a resume and life
history that exists only in his rich imagination and Usenet. Now
here's the problem: I can't tell which. The thing is, he wouldn't
be the first "profession al" programmer I've encountered who
ripped off their employer, sometimes for upwards of a decade,
and never produced a single bit of working code.

Of course, that was all in my post that you claim you never
read, but by "skimming" it you decided suddenly it was "off-topic",
after about 200K of "skimming" and even your active participation
on the topic of "Bill Gates is not Microsoft".

So as a rational person, I developed a theory: you actually
have a dog in this hunt, and question is, what color is the dog,
and just how mangy is it?
You have the power
to stop discussing it in comp.lang.c, whatever the other participant
chooses to do.
That's correct, and it's always a waste of time arguing with a
whack job, they have "insane strength" that a "normal" just doesn't
possess, and I've actually got better things to do. If he has
managed to rip off any employers with this behavior, I gotta
say, it's a job skill of some sort, a very peculiar job "skill",
but one I certainly don't possess (that damn SHRED of
self-respect again)...
And so does he (I don't even remember who the other
participant is).
You know, I just don't fully believe you, doesn't seem credible
somehow...
The fact that I responded to one of your articles
rather than one of his doesn't mean anything.
Well, I have my "theory", and I put it to an experimental test...
Maybe if YOU made the same suggestion to him, he would
vacate these premises and provide his valuable stock-picking
services to a more appropriate audience...

I don't *care* whether either of you talks about it somewhere else or
not. I am asking each of your, or either of you, to stop talking
about it here.
And this concludes my test, and even contains additional "evidence".
You obviously CARE because you post. Riiiiiiiiiiight ? The question
is: what exactly is it that you care about?

---
William Ernest Reid

Oct 20 '06 #86

Elijah Cardon <in*****@invali d.netwrote in message
news:12******** *****@corp.supe rnews.com...
While it was refreshing 15 messages ago to hear in clc that MS exists, the
quitting bell sounded when Heathfield said "enough already." Rolling dice
has crapped out. EC
Of course, no such message was ever sent. Here is the actual
message, which has a completely different intent to what you aver
(reading incomprehension much?):

From: Richard Heathfield <in*****@invali d.invalid>
Subject: Re: rolling dice
Date: Sunday, October 15, 2006 6:09 PM

Rod Pemberton said:

<lots, all snipped>

Rod, this is why I don't agree with the "party line" that claims you're a
troll. Okay, the subject of this discussion has long since stopped being
topical, but so what? Topics do drift. Okay, so you were close to losing
your temper with this guy once or twice, but so what? Tempers do sometimes
fray. Okay, so I wasn't all that interested in the subject matter, but so
what? We can't all be interested in everything.

Mostly, it was an excellent, well-reasoned, and good-tempered rebuttal.

Yeah, okay, so we don't always see eye to eye. But so what?

BTW I owe you an apology for a snide one-liner I posted rather thoughtlessly
- yesterday, I think. Sorry about that. I do try not to say such things,
but I don't always manage it.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)

---end of archived post

Not only did he not call a halt to the proceedings, he seemed to
want to "egg them on".

The mind is a funny thing. Any idea why somebody would actively
encourage an "off-topic discussion", and why somebody else would
characterize that as "enough already"?

---
William Ernest Reid

Oct 20 '06 #87
Richard Bos <rl*@hoekstra-uitgeverij.nlwr ote in message
news:45******** ********@news.x s4all.nl...
"Bill Reid" <ho********@hap pyhealthy.netwr ote:
Keith Thompson <ks***@mib.orgw rote in message
Would you consider taking it someplace else?
>
Apparently, I don't have that power.

So you don't know about Followup-To? Odd. I do.
Odd that you don't understand it only moves the NEXT response
to another group, and only for the unwary. A cagy nutjob will be
back here faster than you can say "padded cell". Odd that some
people can't seem to accomplish anything useful in life, even the
simplest of things, but can manage to peck out Usenet posts...

But, always the rational scientific mind, let's see what happens...

---
William Ernest Reid

Oct 20 '06 #88
"Bill Reid" <ho********@hap pyhealthy.netwr ites:
[BIG SNIP]
And this concludes my test, and even contains additional "evidence".
You obviously CARE because you post. Riiiiiiiiiiight ? The question
is: what exactly is it that you care about?
The *only* think I care about, in this context, is that two people are
carrying on a lengthy discussion that has nothing at all to do with
the C programming language. (It might have something to do with
programming in general; that doesn't make it appropriate for
comp.lang.c.)

To Rod Pemberton *and* Bill Reid:

This entire discussion is off-topic. Each of you obviously thinks
he's right and the other person is wrong. That's not the point.
Please stop discussing whatever it is that you're discussing *in
comp.lang.c*. If only one of you stops posting, the other probably
will as well. If that means letting the other person have the last
word, so be it; sometimes that's the only way to kill an off-topic
thread. I don't know or care which of you is right, so please don't
try to convince me.

If you feel you must continue the discussion, you can either find a
mutually agreeable newsgroup or carry on in e-mail. I don't care
whether you do that or not. I am asking each of you to stop
discussing it here.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Oct 20 '06 #89
Bill Reid said:

<snip>
>
Not only did he not call a halt to the proceedings, he seemed to
want to "egg them on".
Well, no. There is nothing between the lines here. I was simply impressed by
the measured response Rod Pemberton was giving at that point. I don't know
or care enough about the stock market to know whether he was right or
wrong, but he was arguing, it seemed to me, rationally and sensibly.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Oct 20 '06 #90

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

Similar topics

1
1965
by: lawentzel | last post by:
I am new to PHP and am an avid RPG gamer. I am looking to use PhpMyChat to be able to game with friends all over the US. With that having been said, PhpMyChat seems to offer a lot of what I am looking for. It allows you to send a message to individual players (chatters). It allows for actions using "/me". The only thing it really needs is the capability to do a dice roll. Can someone point me to a site which might have some examples...
4
6387
by: dpp4669 | last post by:
I need help with writing a program to use randmax and the standard deviation when u roll the dice 10000 times I know you will need the standard dev. and the average where do i put the randmax and do i use 1+6 after it ? LOST!
17
9621
by: Jose Durazo | last post by:
Hello, I'm doing an exercise to simulate rolling a pair of dice 36,000 times, then count and display how many times the simulation rolls each possible sum. For some reason each time I run my simulation, one or more of my sums is zero, which is highly unlikely. So I'm sure there's a bug in my code. But I can't tell what it is, even after re-reading it several times. Can someone give me a hint? Here is my code:
4
4136
by: vegtard | last post by:
simple question. is it possible to write a script that rolls a six sided dice? if this is possible, is it possible to tell it to roll the six sided dice 4 times and ignore the dice that rolled the lowest score? if you want to know, i am working on a script to create a dungeons and dragons character :)
2
3402
by: sunnydude | last post by:
Anybody know how to write a 3 dice rolling program like this Sample output Welcome to the dice roller! First of all, please enter a seed for the random number generator. This should be a positive integer: 3 How many times would you like me to roll the 3 dice?
2
6492
by: cowboyjeff05 | last post by:
the question is 1) build a Die class (6 sided). Then create a driver that tests your class. Start with one die in your driver then add a second die and notify the user and count when he or she rolls 7, 11, or a double. When the user is done rolling, output the results of the session. Create a child class from the Die class called MultisidedDie. This die should allow the programmer using the class to decide how many sides the die has. ...
0
9933
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9786
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11125
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10734
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7962
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5982
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4607
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4211
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3230
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.