# Re: random ints on a large symmetric interval

*From*: Ron Ford <ron@xxxxxxxxxxxxxxx>*Date*: Wed, 24 Sep 2008 21:42:54 -0600

On Mon, 22 Sep 2008 13:56:17 -0600, Ron Ford posted:

On Sat, 20 Sep 2008 15:38:42 -0600, Ron Ford posted:

One thing about producing symmetric integers like this is that the expected

value is zero. Anyways, I just wanted to throw this out there and see what

other eyes say. I've got almost all of the integers in the right place

now, and I'll need to fiddle with the intervals, but I think I've got all

all the parts declared right now to get a flat distribution on an interval

that is appropraitely declared i13.

Why is my expected value the maximum value of the smaller interval instead

of zero?

The intervals needed tweaking. I think I have a better version now:

[code elided]

I became interested in the process of getting this done and took a couple

screenshots as I was working on this. As I've had a good interaction with

gfortran people, I was thinking of it from a gfortran.pdf point of view.

In short, I think it needs more pictures. I think this one shows what an

incredible tool an IDE can be:

http://i36.tinypic.com/281y8np.jpg

We see good behavior in this program by virtue of the expected value being

about negative fifty thousand with a much larger trial size. That's pretty

close to zero and south of the border.

§

How does one invoke gfortran? The answer differs among persons. For me,

gfortran is on a stick that belongs in my left pocket during transit. It

could be my shadow in that it seems to follow me in interesting ways. I've

been down for two days because my bios were set wrong with respect to usb

devices. My sysadmin buddy who believes that linux is one of the unices

resolved this conflict as I cooked noodles, sauteed onions and garlic, and

sliced the spam. (Gray spam doesn't taste good but probably will sustain

you. I had the luxury of spitting it out)

This screenshot shows how to get the better part of gfortran:

http://i35.tinypic.com/2hfumgm.jpg

I've got the correct goocher commented out by silverfrost for when I have

to make a transition. The transition is complete when the goocher comment

is dereferenced onto the gfortran command line. Since the compile time was

"fresh," I could tell that the gfortran compile time was a tenth or less.

I've got to clean and vamoose. I'll put output I don't understand entirely

after the man who procephied of George Bush: H. L. Mencken.

--

To die for an idea; it is unquestionably noble. But how much nobler it

would be if men died for ideas that were true!

H. L. Mencken

F:\gfortran\source>gfortran -o pop -Wall freeformat65.f95

F:\gfortran\source>pop

imax 2= 100000 itot2= 5800001

interval2= 200001 imax3= 2900000

n= 8

clock= 392856272

seed= 392856272 392856309 392856346 392856383 392856420

392856457

392856494 392856531

1 0.32027084

2 0.97826737

3 0.81613988

4 0.93265474

first ten elements of m are -2993973 -2983444

-2973165 -2969731 -2966185

-2965202

-2962094 -2960391 -2954718

-2954452

middle ten elements of m are 24606 24764

25242 25282 25894

26176

26472 26611 26661

2670

4 28361

last ten elements of m are 2956947 2957125

2959302 2964377 2964469 2969397

2971846 2972435 2980298

2990450

inbounds = 10000

outbounds = 0

percent = 0.0000000 %

summa s is 57129888.

expected value s is 5146.0068

summa t is -5669819.0

expected value t is -566.98187

expected value m is 5146.0068

F:\gfortran\source>gfortran -o pop -Wall freeformat65_2.f95

F:\gfortran\source>pop

imax 2= 100000 itot2= 599800001

interval2= 200001 imax3= 299900000

n= 8

clock= 393293210

seed= 393293210 393293247 393293284 393293321 393293358

393293395

393293432 393293469

1 0.85002458

2 0.90149671

3 3.28981876E-02

4 0.99657613

5 0.62373912

6 0.59350926

7 0.27234364

8 0.38576776

first ten elements of m are -299952257 -299932839

-299867276 -299846131 -299825164

-299684548

-299631558 -299586402 -299582002

-299572535

middle ten elements of m are 1027719 1034455

1122756 1168688 1170192

1205908

1277206 1331485 1478138

154620

7 1731935

last ten elements of m are 299297665 299357591

299440467 299576302 299594248 299620852

299647812 299774317 299785210

299949267

inbounds = 10000

outbounds = 0

percent = 0.0000000 %

summa s is 1.38257367E+10

expected value s is 1383326.9

summa t is 7532900.0

expected value t is 753.28998

expected value m is 1383326.9

F:\gfortran\source>gfortran -o pop -Wall freeformat65_2.f95

F:\gfortran\source>pop

imax 2= 100000 itot2= 599800001

interval2= 200001 imax3= 299900000

n= 8

clock= 393343694

seed= 393343694 393343731 393343768 393343805 393343842

393343879

393343916 393343953

1 0.79422665

2 0.84918892

3 0.86512077

4 0.73312682

first ten elements of m are -299795732 -299782552

-299779615 -299700986 -299611716

-299531467

-299529348 -299523347 -299337737

-299284777

middle ten elements of m are 906616 938294

1070461 1249044 1317141

1360340

1618146 1629768 1661720

169409

9 1727858

last ten elements of m are 299405761 299418433

299480691 299480809 299514328 299539477

299595019 299615084 299837463

299851716

inbounds = 10000

outbounds = 0

percent = 0.0000000 %

summa s is -6.75681178E+09

expected value s is -676210.06

summa t is -5289079.0

expected value t is -528.90790

expected value m is -676210.06

F:\gfortran\source>

.

**References**:**random ints on symmetric interval***From:*Ron Ford

**Re: random ints on symmetric interval***From:*e p chandler

**Re: random ints on symmetric interval***From:*Ron Ford

**Re: random ints on symmetric interval***From:*e p chandler

**Re: random ints on symmetric interval***From:*Ron Ford

**Re: random ints on symmetric interval***From:*e p chandler

**Re: random ints on a large symmetric interval***From:*Ron Ford

**Re: random ints on a large symmetric interval***From:*Ron Ford

- Prev by Date:
**Re: Scope of implicit none** - Next by Date:
**Re: Scope of implicit none** - Previous by thread:
**Re: random ints on a large symmetric interval** - Next by thread:
**OT: Determining the size of plotting area** - Index(es):