-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwrkde.f
executable file
·2281 lines (2281 loc) · 70 KB
/
wrkde.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
*DBEJ
DOUBLE PRECISION FUNCTION DBEJ (X,N,M)
C
C ** NBS OMNITAB 1980 VERSION 6.01 1/ 1/81. DBEJ V 7.00 2/22/90. **
C
C ==================================================================
C
C *** GENERAL COMMENTS ***
C
C EVALUATE BESSEL FUNCTIONS ...
C
C L2 = 1 BJZERO OF (E) PUT IN COLUMN (C)
C L2 = 2 BJONE OF (E) PUT IN COLUMN (C)
C L2 = 3 BYZERO OF (E) PUT IN COLUMN (C)
C L2 = 4 BYONE OF (E) PUT IN COLUMN (C)
C L2 = 5 BIZERO OF (E) PUT IN COLUMN (C)
C L2 = 6 BIONE OF (E) PUT IN COLUMN (C)
C L2 = 6 BIONE OF (E) PUT IN COLUMN (C)
C L2 = 7 BKZERO OF (E) PUT IN COLUMN (C)
C L2 = 8 BKONE OF (E) PUT IN COLUMN (C)
C L2 = 9 EXIZERO OF (E) PUT IN COLUMN (C)
C L2 = 10 EXIONE OF (E) PUT IN COLUMN (C)
C L2 = 11 EXKZERO OF (E) PUT IN COLUMN (C)
C L2 = 12 EXKONE OF (E) PUT IN COLUMN (C)
C
C WRITTEN BY -
C BRADLEY A. PEAVY,
C NATIONAL INSTITUTE OF STANDARDS AND TECHNOLOGY,
C GAITHERSBURG, MD 20899
C
C ==================================================================
C
C *** SPECIFICATION STATEMENTS ***
C
COMMON /DCONST/ DEHT, DFOR, DHALF, DONE, DSIX, DTHRE, DTWO, DZERO
COMMON /DMCONS/ DMAXDP, DMXINT, DSNCOS, DXEXP
COMMON /DPICON/ DHLFPI, DPI, DSQRPI, D2BYSP
COMMON /DTCONS/ DALOG2, DEULER
COMMON /ICONST/ IFIVE, IFOUR, IHRD, IONE, ITEN, ITHRE, ITWO, IZERO
C
INCLUDE 'WRKSCR.H'
C
DOUBLE PRECISION DEHT, DFOR, DHALF, DONE, DSIX, DTHRE, DTWO, DZERO
DOUBLE PRECISION DHLFPI, DPI, DSQRPI, D2BYSP
DOUBLE PRECISION DMAXDP, DMXINT, DSNCOS, DXEXP
DOUBLE PRECISION DALOG2, DEULER
DOUBLE PRECISION S(120), ST(240), T(120)
DOUBLE PRECISION B, C, D, DA, E, H, Y, X
DOUBLE PRECISION FDCOS, FDDIV, FDEXP, FDLOG, FDSIN, FDSQRT
DOUBLE PRECISION DPCA, DPCB, DPCC, DPCD, DPCE, DPCF, DPCG
C
EQUIVALENCE (ST(1),A(1)), (S(1),ST(1)), (T(1),ST(121))
C
C ==================================================================
C
C *** DATA INITIALIZATION STATEMENTS ***
C
DATA DPCA / 16.5D0 /
DATA DPCB / 0.4D0 /
DATA DPCC / 6.8D0 /
DATA DPCD / 0.91D0 /
DATA DPCE / 0.636619772368D0 /
DATA DPCF / 0.5D-10 /
DATA DPCG / 6.283185307D0 /
C
C ==================================================================
C
IF (DABS(X)-DPCA) 10,10,90
10 DA = FDDIV (X,DTWO,IND)**2
J = FDDIV (X,DPCB,IND) + DPCC
B = J
C = J + N
D = -DONE
IF (M.GT.IONE) D = DONE
IF (M.GT.ITHRE) GO TO 30
Y = DONE
DO 20 I=1,J
Y = DONE + FDDIV(Y*DA,B*C,IND)*D
B = B - DONE
C = C - DONE
20 CONTINUE
C
IF (N.GT.IZERO) Y = FDDIV (X*Y,DTWO,IND)
GO TO 240
C
30 E = DONE
S(1) = DEULER
S(61) = S(1) - DHALF
DO 40 I=2,60
S(I) = S(I-1) - FDDIV (DONE,E,IND)
S(I+60) = S(I) - FDDIV (DONE,DTWO*(E+DONE),IND)
E = E + DONE
40 CONTINUE
C
E = FDLOG ( FDDIV (X,DTWO,IND) )
DO 50 I=1,120
T(I) = S(I) + E
50 CONTINUE
C
IF (M.LT.6) GO TO 60
IF (X-DEHT) 60,60,90
60 IA = IZERO
IF (N.GT.IZERO) IA = 60
IF (M.GT.IFIVE) D = -DONE
I = J + IA + IONE
Y = T(I)
DO 70 IB=1,J
I = J - IB + IA + IONE
Y = T(I) - FDDIV (D*DA*Y,B*C,IND)
B = B - DONE
C = C - DONE
70 CONTINUE
C
IF (N.GT.IZERO) Y = FDDIV (X*Y,DTWO,IND)
IF (M.GT.IFIVE) GO TO 80
Y = Y*DPCE
IF (N.NE.IZERO) Y = FDDIV (-DPCE,X,IND) + Y
GO TO 240
C
80 Y = -Y
IF (N.NE.IZERO) Y = FDDIV (DONE,X,IND) - Y
GO TO 240
C
90 DA = DEHT * X
H = N
H = (DTWO*H) ** 2
T(1) = FDDIV (H-DONE,DA,IND)
D = T(1)
DO 120 I=2,20
K = I
B = I
C = (ITWO*I-IONE) ** 2
T(I) = FDDIV (H-C,DA*B,IND)
E = D
D = T(I) * D
E = DABS ( FDDIV (D,E,IND) )
IF (DABS(D)-DPCF) 130,100,100
100 IF (E-DPCD) 110,110,130
110 T(I+2) = DZERO
120 CONTINUE
C
130 DA = -DONE
IF (M.LE.IONE ) GO TO 190
IF (M.LE.ITHRE) GO TO 140
IF (M.LE.IFIVE) GO TO 190
DA = DONE
140 Y = DONE
DO 150 I=1,K
J = K - I + IONE
Y = DONE + DA*Y*T(J)
150 CONTINUE
C
DA = DONE
IF (X-DXEXP) 160,170,170
160 DA = FDEXP(X)
170 IF (M.LE.IFIVE) GO TO 180
Y = FDDIV (Y,DA * FDSQRT (DPCE*X),IND)
GO TO 240
C
180 Y = FDDIV (Y*DA,FDSQRT(DPCG*X),IND)
GO TO 240
C
190 Y = FDSQRT (DPI*X)
J = IDIV (K,ITWO,IND)
K = ITWO * J
J = J - IONE
DA = DONE
H = DA
DO 200 I=1,J
IA = K - ITWO*I + IONE
DA = DONE - DA * T(IA) * T(IA+1)
H = DONE - H * T(IA) * T(IA-1)
200 CONTINUE
C
DA = FDDIV (DONE-T(1)*T(2)*DA,Y,IND)
H = FDDIV (T(1)*H,Y,IND)
B = FDSIN (X)
C = FDCOS (X)
D = DA - H
E = DA + H
IF (M.GT.ITWO) GO TO 220
IF (N.EQ.IZERO) GO TO 210
Y = E*B - D*C
GO TO 240
C
210 Y = D*B + E*C
GO TO 240
C
220 IF (N.EQ.IZERO) GO TO 230
Y = -D*B - E*C
GO TO 240
C
230 Y = E*B - D*C
C
240 DBEJ = Y
RETURN
C
C ==================================================================
C
END
*DEFINZ
SUBROUTINE DEFINZ
C
C ** NBS OMNITAB 1980 VERSION 6.01 1/ 1/81. DEFINZ V 7.00 2/22/90. **
C
C ==================================================================
C
C *** GENERAL COMMENTS ***
C
C DEFINE (K) INTO COLUMN (C)
C DEFINE (K) INTO ROW (C), COL (C)
C DEFINE ROW (C), COL (C) INTO ROW (C), COL (C)
C DEFINE ROW (C), COL (C) INTO COL (C).
C
C ==================================================================
C
C *** SPECIFICATION STATEMENTS ***
C
COMMON /ARGMTS/ ARGS(100), IARGS(100), KIND(100), NARGS
COMMON /ICONST/ IFIVE, IFOUR, IHRD, IONE, ITEN, ITHRE, ITWO, IZERO
COMMON /INSTRN/ L1, L2, NCOL, NERROR, NRMAX, NROW
C
INCLUDE 'WRKSCR.H'
C
C ==================================================================
C
IF (NARGS.NE.ITWO) GO TO 10
J = IONE
IF (KIND(1).EQ.IZERO) CALL ADRESS(1,J)
CALL ADRESS (ITWO,I)
IF (I.LT.IZERO) GO TO 110
IF (J.LT.IZERO) GO TO 110
GO TO 60
10 IF (NARGS.EQ.IFOUR) GO TO 40
IF (NARGS.LT.ITHRE .OR. NARGS.GT.IFOUR) GO TO 100
IF (KIND(1).EQ.IZERO) GO TO 40
C
20 I = NARGS
GO TO 80
C
30 IF (NERROR.EQ.IZERO) RC(L) = ARGS(1)
RETURN
C
C ..................................................................
C
40 I = ITWO
GO TO 80
50 ARGS(1) = RC(L)
IF (NARGS.EQ.IFOUR) GO TO 20
CALL ADRESS (ITHRE,I)
IF (I.LT.IZERO) GO TO 110
60 IF (NERROR.NE.IZERO) RETURN
IF (NRMAX.EQ.IZERO) GO TO 70
IF (KIND(1).EQ.IZERO .AND. NARGS.EQ.ITWO) GO TO 120
CALL VECTOR (ARGS(1),I)
RETURN
C
C ..................................................................
C
70 CALL ERROR (9)
RETURN
C
C CHECK AND CALCULATE WORKSHEET ENTRY LOCATION INTO L
C
80 CALL ADRESS (I,L)
IF (L.LT.IZERO) GO TO 110
IF (KIND(I-1).EQ.IZERO .AND. IARGS(I-1).GT.IZERO
1 .AND. IARGS(I-1).LE.NROW) GO TO 90
CALL ERROR (16)
RETURN
C
C ..................................................................
C
90 L = L + IARGS(I-1) - IONE
IF (I.GT.ITWO) GO TO 30
IF (I.LE.ITWO) GO TO 50
100 CALL ERROR (10)
RETURN
C
C ..................................................................
C
110 CALL ERROR (20)
RETURN
C
C ..................................................................
C
120 DO 130 IJ=1,NRMAX
RC(I) = RC(J)
I = I + IONE
J = J + IONE
130 CONTINUE
C
RETURN
C
C ==================================================================
C
END
*DEXPLT
SUBROUTINE DEXPLT (X,Y,W,N)
C
C ** NBS OMNITAB 1980 VERSION 6.01 1/ 1/81. DEXPLT V 7.00 12/ 7/89. **
C
C ==================================================================
C
C *** GENERAL COMMENTS ***
C
C PURPOSE--THIS SUBROUTINE GENERATES A DOUBLE EXPONENTIAL (LAPLACE)
C PROBABILITY PLOT.
C THE PROTOTYPE DOUBLE EXPONENTIAL DISTRIBUTION USED HEREIN
C HAS MEAN = 0 AND STANDARD DEVIATION = SQRT(2).
C THIS DISTRIBUTION IS DEFINED FOR ALL X AND HAS
C THE PROBABILITY DENSITY FUNCTION
C F(X) = 0.5 * EXP(-ABS(X)).
C AS USED HEREIN, A PROBABILITY PLOT FOR A DISTRIBUTION
C IS A PLOT OF THE ORDERED OBSERVATIONS VERSUS
C THE ORDER STATISTIC MEDIANS FOR THAT DISTRIBUTION.
C THE DOUBLE EXPONENTIAL PROBABILITY PLOT IS USEFUL IN
C GRAPHICALLY TESTING THE COMPOSITE (THAT IS,
C LOCATION AND SCALE PARAMETERS NEED NOT BE SPECIFIED)
C HYPOTHESIS THAT THE UNDERLYING DISTRIBUTION
C FROM WHICH THE DATA HAVE BEEN RANDOMLY DRAWN
C IS THE DOUBLE EXPONENTIAL DISTRIBUTION.
C IF THE HYPOTHESIS IS TRUE, THE PROBABILITY PLOT
C SHOULD BE NEAR-LINEAR.
C A MEASURE OF SUCH LINEARITY IS GIVEN BY THE
C CALCULATED PROBABILITY PLOT CORRELATION COEFFICIENT.
C
C INPUT ARGUMENTS--X = THE SINGLE PRECISION VECTOR OF
C (UNSORTED OR SORTED) OBSERVATIONS.
C --N = THE INTEGER NUMBER OF OBSERVATIONS
C IN THE VECTOR X.
C OUTPUT--A ONE-PAGE DOUBLE EXPONENTIAL PROBABILITY PLOT.
C PRINTING--YES.
C RESTRICTIONS--NONE.
C OTHER DATAPAC SUBROUTINES NEEDED--SORT, UNIMED, PLOT.
C FORTRAN LIBRARY SUBROUTINES NEEDED--SQRT, ALOG.
C MODE OF INTERNAL OPERATIONS--SINGLE PRECISION.
C LANGUAGE--ANSI FORTRAN.
C REFERENCES--FILLIBEN, 'TECHNIQUES FOR TAIL LENGTH ANALYSIS',
C PROCEEDINGS OF THE EIGHTEENTH CONFERENCE
C ON THE DESIGN OF EXPERIMENTS IN ARMY RESEARCH
C DEVELOPMENT AND TESTING (ABERDEEN, MARYLAND,
C OCTOBER, 1972), PAGES 425-450.
C --HAHN AND SHAPIRO, STATISTICAL METHODS IN ENGINEERING,
C 1967, PAGES 260-308.
C --JOHNSON AND KOTZ, CONTINUOUS UNIVARIATE
C DISTRIBUTIONS--2, 1970, PAGES 22-36.
C WRITTEN BY--JAMES J. FILLIBEN
C STATISTICAL ENGINEERING DIVISION
C NATIONAL INSTITUTE OF STANDARDS AND TECHNOLOGY
C GAITHERSBURG, MD 20899
C PHONE: 301-975-2845
C ORIGINAL VERSION--JUNE 1972.
C UPDATED --SEPTEMBER 1975.
C
C ADAPTED TO OMNITAB COMPUTING SYSTEM BY -
C DAVID HOGBEN,
C STATISTICAL ENGINEERING DIVISION,
C CENTER FOR COMPUTING AND APPLIED MATHEMATICS,
C A337 ADMINISTRATION BUILDING,
C NATIONAL INSTITUTE OF STANDARDS AND TECHNOLOGY,
C GAITHERSBURG, MD 20899
C TELEPHONE 301-975-2845
C ORIGINAL VERSION - NOVEMBER, 1975.
C CURRENT VERSION - DECEMBER, 1989.
C
C ==================================================================
C
C *** SPECIFICATION STATEMENTS ***
C
DIMENSION M(10), MT(50)
C
COMMON /ICONST/ IFIVE, IFOUR, IHRD, IONE, ITEN, ITHRE, ITWO, IZERO
COMMON /RCONST/ RFIVE, RFOR, RHALF, RONE, RTEN, RTHRE, RTWO, RZERO
COMMON /TOPRNT/ IPRINT, ISIGD, LENGTH, LWC, LWIDE, NCW
COMMON /TPRNTC/ LHEAD(96)
C
INCLUDE 'WRKSCR.H'
C
C ==================================================================
C
C *** TYPE STATEMENTS ***
C
REAL W(*), X(*), Y(*)
REAL ATEMP(1), YINT(1), YSLOPE(1)
REAL AN, CC, Q, SUM1, SUM2, SUM3, WBAR, YBAR
REAL FDIV, FLOG, FSQRT
C
C ..................................................................
C
CHARACTER MT*1, M*1
CHARACTER LHEAD*1
C
C ==================================================================
C
C *** DATA INITIALIZATION STATEMENTS ***
C
DATA M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10) /
1 ',', ' ', 'S', 'L', 'O', 'P', 'E', ' ', '=', ' ' /
C
C ==================================================================
C
AN = N
CALL SORTPP (X,N,Y)
CALL UNIMED (N,W)
DO 10 I=1,N
Q = W(I)
IF (Q.LE.RHALF) W(I) = FLOG (RTWO*Q)
IF (Q.GT.RHALF) W(I) = -FLOG (RTWO*(RONE-Q))
10 CONTINUE
C
IF (LWIDE.GE.88) WRITE (IPRINT,100) N, (LHEAD(I),I=1,12)
IF (LWIDE.GE.76 .AND. LWIDE.LT.88) WRITE (IPRINT,110)
1 (LHEAD(I),I=1,12), N
IF (LWIDE.LT.76) WRITE (IPRINT,120) N, (LHEAD(I),I=1,12)
CALL PRPLOT (Y,W)
CALL SUMMAL (Y,N,SUM1)
IF (N.EQ.IONE) SUM1 = Y(1)
YBAR = FDIV (SUM1,AN,IND)
WBAR = RZERO
CALL SUMMAL (Y,IZERO,SUM1)
DO 20 I=1,N
ATEMP(1) = (Y(I)-YBAR)**2
CALL SUMMAL (ATEMP,-IONE,SUM1)
20 CONTINUE
C
CALL SUMMAL (Y, IONE,SUM1)
CALL SUMMAL (Y,IZERO,SUM2)
DO 30 I=1,N
ATEMP(1) = Y(I) * W(I)
CALL SUMMAL (ATEMP,-IONE,SUM2)
30 CONTINUE
C
CALL SUMMAL (Y, IONE,SUM2)
CALL SUMMAL (W,IZERO,SUM3)
DO 40 I=1,N
ATEMP(1) = W(I)**2
CALL SUMMAL (ATEMP,-IONE,SUM3)
40 CONTINUE
C
CALL SUMMAL (W, IONE,SUM3)
CC = FDIV (SUM2,FSQRT(SUM3*SUM1),IND)
YSLOPE(1) = FDIV (SUM2,SUM3,IND)
YINT(1) = YBAR - YSLOPE(1) * WBAR
CALL RFORMT (0,ISIGD,YINT,A(1),1,20,NW,ND,MT(1),IRF)
CALL RFORMT (1,ISIGD,A,YINT(1),0,0,NW,ND,MT(1),IRF)
K = NW + IONE
DO 50 I=1,10
MT(K) = M(I)
K = K + IONE
50 CONTINUE
C
CALL RFORMT (0,ISIGD,YSLOPE,A(1),1,20,NW,ND,MT(1),IRF)
CALL RFORMT (1,ISIGD,A,YSLOPE(1),0,0,NW,ND,MT(K),IRF)
K = K + NW - IONE
IF (K+73.GT.LWIDE) GO TO 60
WRITE (IPRINT,130) CC, (MT(J),J=1,K)
GO TO 90
60 CALL RFORMT (0,ISIGD,YINT,A(1),1,20,NW,ND,MT(1),IRF)
CALL RFORMT (1,ISIGD,A,YINT(1),0,0,NW,ND,MT(1),IRF)
K = NW + IONE
DO 70 I=1,10
MT(K) = M(I)
K = K + IONE
70 CONTINUE
C
CALL RFORMT (0,ISIGD,YSLOPE,A(1),1,20,NW,ND,MT(1),IRF)
CALL RFORMT (1,ISIGD,A,YSLOPE(1),0,0,NW,ND,MT(K),IRF)
K = K + NW - IONE
IF (K+38.GT.LWIDE) GO TO 80
WRITE (IPRINT,140) CC, (MT(J),J=1,K)
GO TO 90
80 IF (LWIDE.LT.37) GO TO 90
WRITE (IPRINT,150) CC
90 IF (IND.NE.IZERO) CALL ERROR (106)
RETURN
C
C ==================================================================
C
C *** FORMAT STATEMENTS ***
C
100 FORMAT (15X,18HDOUBLE EXPONENTIAL,21H PROBABILITY PLOT OF ,
1 I5,17H MEASUREMENTS IN ,12A1)
110 FORMAT (15X,18HDOUBLE EXPONENTIAL,21H PROBABILITY PLOT OF ,
1 12A1,5H, N =,I5)
120 FORMAT ( 1X,3HN =,I5,6X,18HDOUBLE EXPONENTIAL,14H PROB PLOT OF ,
1 12A1)
130 FORMAT (15X,26HPROB. PLOT CORR. COEFF. = ,F6.4,
1 26H, ESTIMATES * INTERCEPT = ,50A1)
140 FORMAT ( 1X,16HPLOT COR COEF = ,F6.4,
1 14H, EST* INT. = ,35A1)
150 FORMAT (15X,38HPROBABILITY PLOT CORRELATION COEFF. = ,F6.4)
C
C ==================================================================
C
END
*DIFFER
SUBROUTINE DIFFER
C
C ** NBS OMNITAB 1980 VERSION 6.01 1/ 1/81. DIFFER V 7.00 12/ 7/89. **
C
C ==================================================================
C
C *** GENERAL COMMENTS ***
C
C L2 = 7, DIFFERENCES Y IN (C), PUT IN (C),...,(C)
C 8, DIVDIFFERENCES X IN (C), Y IN (C), PUT IN (C),...,(C)
C 9, SDIFFERENCES Y IN (C), PUT IN (C),...,(C)
C 10, SDIVDIFFERENCES X IN (C), Y IN (C), PUT IN (C),...,(C)
C
C WRITTEN BY -
C DAVID HOGBEN,
C STATISTICAL ENGINEERING DIVISION,
C CENTER FOR COMPUTING AND APPLIED MATHEMATICS,
C A337 ADMINISTRATION BUILDING,
C NATIONAL INSTITUTE OF STANDARDS AND TECHNOLOGY,
C GAITHERSBURG, MD 20899
C TELEPHONE 301-975-2845
C ORIGINAL VERSION - DECEMBER, 1975.
C CURRENT VERSION - DECEMBER, 1989.
C
C ==================================================================
C
C *** SPECIFICATION STATEMENTS ***
C
COMMON /ARGMTS/ ARGS(100), IARGS(100), KIND(100), NARGS
COMMON /ICONST/ IFIVE, IFOUR, IHRD, IONE, ITEN, ITHRE, ITWO, IZERO
COMMON /INSTRN/ L1, L2, NCOL, NERROR, NRMAX, NROW
COMMON /TOPRNT/ IPRINT, ISIGD, LENGTH, LWC, LWIDE, NCW
C
INCLUDE 'WRKSCR.H'
C
C ==================================================================
C
C *** TYPE STATEMENTS ***
C
REAL FDIV
C
C ==================================================================
C
C *** DATA INITIALIZATION STATEMENTS ***
C
DATA NX / 15 /
C
C ==================================================================
C
C ERROR CHECKING
C
IF (NRMAX.GT.IZERO) GO TO 10
CALL ERROR ( 9)
RETURN
C
C L = 1, FOR DIFFERENCES
C 2, FOR DIVIDED DIFFERENCES
C
10 L = 1
IF (L2.EQ.8 .OR. L2.EQ.ITEN) L = ITWO
IF (NARGS.GE.L) GO TO 30
20 CALL ERROR (10)
RETURN
30 CALL ADRESS (L,K)
IF (K.GE.IZERO) GO TO 50
40 CALL ERROR (20)
RETURN
50 IF (NARGS.GE.NRMAX+L) GO TO 20
IF (L.EQ.IONE) GO TO 60
CALL ADRESS (IONE,L0)
IF (L0.LT.IZERO) GO TO 40
60 IF (L2.EQ.7 .OR. L2.EQ.8) GO TO 80
IF (NARGS.GT.L) GO TO 80
CALL ERROR (236)
RETURN
70 CALL ERROR (245)
RETURN
80 IF (NERROR.NE.IZERO) RETURN
C
C ..................................................................
C
C NCOMP = NUMBER OF DIFFERENCES COMPUTED
C
N1 = IDIV (LWIDE,NX,IND) - L
NCOMP = MAX0 (N1,NARGS-L)
NCOMP = MIN0 (NCOMP,NRMAX-IONE)
IF (NCOMP.LT.IONE) GO TO 70
C
C CHECK ON AMOUNT OF SCRATCH AREA NEEDED.
C
IEND = NCOMP
NSMAX = NRMAX
DO 90 I=1,IEND
NSMAX = NSMAX + (NRMAX-I)
IF (NSMAX.LE.NS) GO TO 90
CALL ERROR (214)
NCOMP = I - IONE
GO TO 100
90 CONTINUE
100 IF (NCOMP.LT.IONE) GO TO 20
C
C STORE Y IN SCRATCH AREA.
C
J = K
DO 110 I=1,NRMAX
A(I) = RC(J)
J = J + IONE
110 CONTINUE
GO TO (120,150), L
C
C ..................................................................
C
C COMPUTE DIFERENCES
C
120 JEND = NRMAX
M = NRMAX + IONE
N = IONE
DO 140 I=1,NCOMP
JEND = JEND - IONE
N = N + IONE
DO 130 J=1,JEND
A(M) = A(N) - A(N-1)
M = M + IONE
N = N + IONE
130 CONTINUE
140 CONTINUE
GO TO 180
C
C COMPUTE DIVIDED DIFERENCES
C
150 JEND = NRMAX
IND = IZERO
M = NRMAX + IONE
N = IONE
DO 170 I=1,NCOMP
JEND = JEND - IONE
N = N + IONE
LU = L0 + I
LV = L0
DO 160 J=1,JEND
A(M) = A(N) - A(N-1)
A(M) = FDIV (A(M),RC(LU)-RC(LV),IND)
LU = LU + IONE
LV = LV + IONE
M = M + IONE
N = N + IONE
160 CONTINUE
170 CONTINUE
IF (IND.NE.IZERO) CALL ERROR (106)
180 IF (L2.EQ.9 .OR. L2.EQ.ITEN) GO TO 190
C
C ..................................................................
C
C PRINT RESULTS.
C
CALL PRTDD (L,NCOMP)
IF (L2.EQ.7 .AND. NARGS.EQ.IONE) RETURN
IF (L2.EQ.8 .AND. NARGS.EQ.ITWO) RETURN
C
C ..................................................................
C
C STORE RESULTS.
C
190 CALL STREDD (L)
RETURN
C
C ==================================================================
C
END
*DIMENS
SUBROUTINE DIMENS
C
C ** NBS OMNITAB 1980 VERSION 6.01 1/ 1/81. DIMENS V 7.00 2/22/90. **
C
C ==================================================================
C
C *** GENERAL COMMENTS ***
C
C EXECUTE DIMENSION INSTRUCTION.
C
C ==================================================================
C
C *** SPECIFICATION STATEMENTS ***
C
COMMON /ARGMTS/ ARGS(100), IARGS(100), KIND(100), NARGS
COMMON /ERRMES/ ISE, KMES, LLIST, MESS(15), MNOE, NERR, NRM, NROLD
COMMON /ICONST/ IFIVE, IFOUR, IHRD, IONE, ITEN, ITHRE, ITWO, IZERO
COMMON /INSTRN/ L1, L2, NCOL, NERROR, NRMAX, NROW
C
INCLUDE 'WRKSCR.H'
C
C ==================================================================
C
IF (NARGS.EQ.ITWO .AND. KIND(1)+KIND(2).NE.IZERO) GO TO 10
IF (NARGS.EQ.ITWO .AND. KIND(1)+KIND(2).EQ.IZERO) GO TO 20
CALL ERROR (10)
RETURN
C
C ..................................................................
C
10 CALL ERROR (20)
RETURN
C
C ..................................................................
C
20 IF (IARGS(1).GT.IZERO .AND. IARGS(2).GT.IZERO .AND.
1 IARGS(1)*IARGS(2).LE.NRC) GO TO 30
CALL ERROR (15)
RETURN
C
C ..................................................................
C
30 NROW = IARGS(1)
NCOL = IARGS(2)
NROLD = NRMAX
NRMAX = MIN0 (NROW,NRMAX)
CALL ERROR (252)
RETURN
C
C ==================================================================
C
END
*EDITDA
SUBROUTINE EDITDA
C
C ** NBS OMNITAB 1980 VERSION 6.01 1/ 1/81. EDITDA V 7.00 2/22/90. **
C
C ==================================================================
C
C *** GENERAL COMMENTS ***
C
C PROCEDURE FOR EDITING DATA.
C
C ***** INSTRUCTIONS - WITH VALUES OF L2 *****
C
C (6) OMIT ROWS WITH (K) IN COLUMN (C) AND PUT IN COLUMN (C)
C OMIT ROWS WITH VALUES BETWEEN (K) AND (K) IN (C) PUT IN (C)
C OMIT (K) FROM (C) CORR ROWS FROM (C)...(C) PUT IN (C)...(C)
C OMIT (K) TO (K) FROM (C) CORR ROWS FROM (C)...(C) IN (C)...(C)
C (7) DELETE ALL ROWS HAVING (K) IN COLS (C)...(C) PUT IN (C)...(C)
C DELETE FROM (K) TO (K) IN COLS (C)...(C) PUT IN COLS (C)...(C)
C (8) CHOOSE ROWS = (K) IN (C) CORR ROWS OF (C)...(C) INTO (C)...(C)
C CHOOSE FROM (K) TO (K) IN (C) CORR (C)...(C) PUT IN (C)...(C)
C (9) RETAIN FROM (K) TO (K) IN COLS (C)...(C) PUT IN COLS (C)...(C)
C
C NO PRINTING.
C
C WRITTEN BY -
C DAVID HOGBEN,
C STATISTICAL ENGINEERING DIVISION,
C CENTER FOR COMPUTING AND APPLIED MATHEMATICS,
C A337 ADMINISTRATION BUILDING,
C NATIONAL INSTITUTE OF STANDARDS AND TECHNOLOGY,
C GAITHERSBURG, MD 20899
C TELEPHONE 301-975-2845
C ORIGINAL VERSION - AUGUST, 1976.
C CURRENT VERSION - FEBRUARY, 1990
C
C ==================================================================
C
C *** SPECIFICATION STATEMENTS ***
C
COMMON /ARGMTS/ ARGS(100), IARGS(100), KIND(100), NARGS
COMMON /ERRMES/ ISE, KMES, LLIST, MESS(15), MNOE, NERR, NRM, NROLD
COMMON /ICONST/ IFIVE, IFOUR, IHRD, IONE, ITEN, ITHRE, ITWO, IZERO
COMMON /INSTRN/ L1, L2, NCOL, NERROR, NRMAX, NROW
COMMON /RCONST/ RFIVE, RFOR, RHALF, RONE, RTEN, RTHRE, RTWO, RZERO
C
INCLUDE 'WRKSCR.H'
C
C ==================================================================
C
C ERROR CHECKING.
C
IF (NRMAX.GT.IZERO) GO TO 10
CALL ERROR ( 9)
RETURN
10 N = IDIV(NARGS-IONE,ITWO,IND)
IF (N.GT.IZERO) GO TO 30
20 CALL ERROR (10)
RETURN
30 NMOD = MOD (NARGS,ITWO)
IF (KIND(1).EQ.IONE) GO TO 50
40 CALL ERROR (20)
RETURN
50 IF (KIND(2).EQ.IZERO .AND. NMOD.EQ.IZERO) GO TO 40
IF (L2.EQ.9 .AND. NMOD.NE.IZERO) GO TO 20
M = NARGS - ITWO + NMOD
DO 60 I=1,M
K = I + ITWO - NMOD
IARGS(I) = IARGS(K)
60 CONTINUE
NARGS = M
KIND(1) = IZERO
KIND(2) = IZERO
CALL CHKCOL
IF (NERROR.NE.IZERO) RETURN
C
C STORE COLUMNS IN SCRATCH AREA.
C
KA = IONE
DO 80 I=1,N
KW = IARGS(I)
DO 70 J=1,NRMAX
A(KA) = RC(KW)
KA = KA + IONE
KW = KW + IONE
70 CONTINUE
80 CONTINUE
NEWRMX = NRMAX
JBEG = IDIV(NARGS,ITWO,IND) + IONE
IF (L2.LT.8) GO TO 90
GO TO 240
C
C ==================================================================
C
C COMPUTING FOR OMIT AND DELETE.
C
90 IF (L2.EQ.6) GO TO 160
IF (N.EQ.IONE) GO TO 160
DO 150 I=2,N
KA = IONE
KW = IARGS(I)
DO 140 J=1,NRMAX
IF (RC(KW)-ARGS(1)) 130,100,110
100 A(KA) = ARGS(1)
GO TO 130
110 IF (NMOD.EQ.IONE) GO TO 130
IF (RC(KW)-ARGS(2)) 120,120,130
120 A(KA) = ARGS(2)
130 KA = KA+IONE
KW = KW+IONE
140 CONTINUE
150 CONTINUE
C
160 M = IZERO
KA = IONE
DO 230 I=1,NRMAX
IF (A(KA)-ARGS(1)) 200,170,180
170 IF (NMOD.EQ.IONE) GO TO 190
180 IF (NMOD.EQ.IONE) GO TO 200
IF (A(KA)-ARGS(2)) 190,190,200
C
C SUBTRACT ONE FROM NEWRMX BECAUSE ROW OMITTED.
C
190 NEWRMX = NEWRMX - IONE
GO TO 220
C
C MOVE DATA FROM SCRATCH AREA TO WORKSHEET
C
200 DO 210 J=JBEG,NARGS
KW = IARGS(J) + M
KK = I + NRMAX*(J-N-IONE)
RC(KW) = A(KK)
210 CONTINUE
M = M+IONE
220 KA = KA+IONE
230 CONTINUE
GO TO 300
C
C ==================================================================
C
C COMPUTING FOR CHOOSE AND RETAIN.
C
240 L = IONE
IF (L2.EQ.9) L = N
M = IZERO
DO 290 I=1,NRMAX
DO 270 K=1,L
KA = I + NRMAX*(K-IONE)
IF (A(KA)-ARGS(1)) 290,250,260
250 IF (NMOD.EQ.IONE) GO TO 270
260 IF (NMOD.EQ.IONE) GO TO 290
IF (A(KA)-ARGS(2)) 270,270,290
270 CONTINUE
C
C MOVE DATA FROM SCRATCH AREA TO WORKSHEET.
C
DO 280 J=JBEG,NARGS
KW = IARGS(J) + M
KK = I + NRMAX*(J-N-IONE)
RC(KW) = A(KK)
280 CONTINUE
M = M+IONE
290 CONTINUE
C
NEWRMX = M
C
C ==================================================================
C
C RESET AREA BELOW NEWRMX TO 0.0.
C
300 IBEG = NEWRMX+IONE
DO 320 J=JBEG,NARGS
KW = IARGS(J) + NEWRMX
DO 310 I=IBEG,NRMAX
RC(KW) = RZERO
KW = KW+IONE
310 CONTINUE
320 CONTINUE
C
C RESET NRMAX AND CALL INFORMATIVE DIAGNOSTIC.
C
NROLD = NRMAX
NRMAX = NEWRMX
CALL ERROR (252)
RETURN
C
C ==================================================================
C
END
*ELLIPT
SUBROUTINE ELLIPT
C
C ** NBS OMNITAB 1980 VERSION 6.01 1/ 1/81. ELLIPT V 7.00 2/22/90. **
C
C ==================================================================
C
C *** GENERAL COMMENTS ***
C
C EXECUTE ELLIPTICAL FIRST AND ELLIPTICAL SECOND INSTRUCTIONS.
C
C L2=30, K=1
C ELLIPTICAL FIRST OF (E) PUT IN (C)
C L2=31, K=2
C ELLIPTICAL SECOND OF (E) PUT IN (C)
C
C WRITTEN BY -
C DAVID HOGBEN,
C STATISTICAL ENGINEERING DIVISION,
C CENTER FOR COMPUTING AND APPLIED MATHEMATICS,
C A337 ADMINISTRATION BUILDING,
C NATIONAL INSTITUTE OF STANDARDS AND TECHNOLOGY,
C GAITHERSBURG, MD 20899
C TELEPHONE 301-975-2845
C ORIGINAL VERSION - JANUARY, 1978.
C CURRENT VERSION - FEBRUARY, 1990.
C
C ==================================================================
C
C *** SPECIFICATION STATEMENTS ***
C
COMMON /ARGMTS/ ARGS(100), IARGS(100), KIND(100), NARGS
COMMON /ICONST/ IFIVE, IFOUR, IHRD, IONE, ITEN, ITHRE, ITWO, IZERO
COMMON /INSTRN/ L1, L2, NCOL, NERROR, NRMAX, NROW
C
INCLUDE 'WRKSCR.H'
C
DOUBLE PRECISION X
DOUBLE PRECISION COMELL
C
REAL FDPCON
C
C ==================================================================
C
C ERROR CHECKING.
C
IF (NARGS.EQ.ITWO) GO TO 10
CALL ERROR (10)
RETURN
C
C ..................................................................
C
10 CALL ADRESS (ITWO,J)
IF (J.LT.IZERO) CALL ERROR (20)
IF (NRMAX.LE.IZERO) CALL ERROR (9)
X = ARGS(1)
IF (KIND(1).EQ.IONE) GO TO 20
CALL ADRESS (IONE,JA)
IF (JA.LT.IZERO) CALL ERROR (20)
20 IF (NERROR.NE.IZERO) RETURN
C
C ..................................................................
C
K = IONE
IF (L2.EQ.31) K = ITWO
C
DO 40 N=1,NRMAX
IF (KIND(1).EQ.IONE) GO TO 30
X = RC(JA)
JA = JA + IONE
30 RC(J) = FDPCON (COMELL(X,K) )
J = J + IONE
40 CONTINUE
RETURN
C
C ==================================================================
C
END
*EVAL
SUBROUTINE EVAL (IW2,IWW2,W2,ITYPE,ISTART,ISTOP,ANS,ISUB,IND)
C
C ** NBS OMNITAB 1980 VERSION 6.01 2/20/81. EVAL V 7.00 11/02/89. **
C
C ==================================================================
C
C *** GENERAL COMMENTS ***
C
C PURPOSE--EVALUATE A STRING OF CODE THAT CONTAINS ONLY
C VALUES, OPERATIONS, AND LIBRARY FUNCTIONS.
C DATE--NOVEMBER 1, 1976.
C
C ADAPTED TO OMNITAB BY -