ChipMaster's bwBASIC
This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- 10 PRINT "GEOMETRIC MEAN AND DEVIATION"
- 20 PRINT
- 30 PRINT "(TO END PROGRAM ENTER 0 OBSEVATIONS)"
- 40 PRINT "NUMBER OF OBSERVATIONS";
- 50 INPUT N
- 59 REM - TEST FOR END OF PROGRAM
- 60 IF N=0 THEN 200
- 69 REM - COMPUTE WHICH ROOT TO USE
- 70 P=1/N
- 80 M=1
- 90 FOR I=1 TO N
- 100 PRINT "ITEM";I;
- 110 INPUT D
- 119 REM - ITERATIVELY COMPUTE MEAN
- 120 M=M*D[P
- 129 REM - ACCUMULATE INTERMEDIATE TERM FOR DEVIATION
- 130 Q=Q+LOG(D)[2
- 140 NEXT I
- 149 REM - COMPUTE DEVIATION
- 150 R=EXP(SQR(Q/(N-1)-(N/(N-1)*(LOG(M))[2)))
- 160 PRINT "GEOMETRIC MEAN =";M
- 170 PRINT "GEOMETRIC DEVIATION =";R
- 180 PRINT
- 189 REM - RESTART PROGRAM
- 190 GOTO 40
- 200 END
|