Lakefield, Que., August 24, 1992 The Fleabyte Accessories The basic set of "Fleabyte" extended calculator accessories now carry version number 1.0, which signifies confidence in their reliability (see note at end of this document). Appended hereto is an abbreviated listing of the procedure "calculator" to facilitate critical examination. In accord with my "Fleabyte" philosophy full listings of these accessories, produced in GFA BASIC v. 3.07, are available so that any user may comment on them or modify them to suit his or her own interests. No, they are not offered as examples of good programming; I am a generalist, not a professional programmer. My primary concern is what these accessories thrive for: to be tools that help our students and ourselves cope better in a world rapidly complexing. That, I believe, must be the principal purpose of personal computing. The "Fleabyte" project is in essence a development project, not a commercial one. The work demands that various routes be explor- ed. On desktop computers these are travelled by two types of vehicles, "Fleabyte" and the "Wormhole." Fleabyte accessories are visible, on-screen calculators that can, if one wants them to, transfer information directly to other applications such as wordprocessors. The Wormhole accessories are invisible and can be made to work with data showing on the screen image of an application. I have worked mostly with 1st Word Plus, which I believe to be as suitable a wordprocessor for this kind of work as I am now aware of, but suitable also are WordWriter and Word Up. Wordperfect is OK with monochrome. Among the accessories, EdHak is a marvellous teammate for Fleabyte, but less so for the Wormhole. The same goes for that outstanding German text editor 7-Up, which, incidentally, uses still another vehicle, the marked block of data on which certain calculations are done by a routine of the program itself. For beginning these explorations I made a set of four calculators of somewhat increasing complexity from one to the next: "Simplex" (sx) for ordinary arithmetic and with some elemen- tary features of a financial calculator. "Full-function" (ffs) compares with today's hand-held, full-function scientific calculators. "Significant figures" (sf) copes with uncertainties in nume- rical data. Initially I am referring here to measurement uncer- tainties, a subject I will get into a little deeper within a few paragraphs and which is more fully introduced in the user guide for this model. "Basic natural science" (bns) provides the above calculator with direct access to atomic weights and scientific constants. I use abbreviations such as FBSX_10.ACC; FB for "Fleabyte," SX to identify the "simplex" series, and 10 for version 1.0. Minor enhancements and corrections will lead to FBSX_11.ACC, etc. Major feature changes will reflect in stepping up from 1.0, 1.1, etc. to 2.0, 2.1, etc. In addition, an extra letter serves as a mnemonic for the main feature added, e.g. FBSX_20F.ACC, which features "quick focus," a simple spreadsheet extension to the "sx" calculator. It is available as freeware. Also going out as freeware is the WHSX_10D.ACC (the "D" for "demo") which demonstrates a fast way of obtaining statistical information on data on a wordprocessor. "Where there is choice there is chaos." I am well aware that a proliferation of symbolic representations may be cause of some confusion. Ultimately I shall have to try to do something about this. In the meantime these models serve as stepping stones toward automated problem-solving. As they now stand these acces- sories are simply tools that offer a higher than ordinary degree of calculating efficiency - along with some features for explora- tive purposes - and it is my hope, if not expectation, to see them one day applied, especially in on-the-person computers. The Fleabyte and Wormhole calculators have some rather unorthodox aspects that I should think ought to become increasingly useful. Touched on already is the accounting for measuring or estimating uncertainty, which, incidentally, I intend to apply eventually in a financial calculator useful to investors. Let me illustrate with some simple examples. Given that the measures of a hard rubber cylinder are 2.6 cm diameter and 12.0 cm length. The cylinder weighs 75.43 g. What is the density of its material? Consider that the measuring uncertainty of the linear measurements is 1 mm, i.e. 1 in the last reported digit and that the weighing uncertainty is 0.02 g, i.e. 2 in the last digit reported. Density = mass/volume. The calculation shown below was done with Fleabyte FBSF_10.ACC and transferred in full to the wordprocessor I am using: 75.43~2/[ã x (2.6~/2)^2 x 12.0~] = 1.2~2 (Yes, I typed in "pi," but this is converted automatically to the corresponding Greek character on the way out to the wordproces- sor.) Thus the density of the material is between 1.1 and 1.3 g/cu.cm. The tilde (~) denotes uncertainty with a default value of 1; hence 75.43~2 indicates a value between 75.42 and 75.44, whereas 12.0~ represents a value between 11.95 and 12.05. As an application for financial calculators contemplate a stock bought for $25.875 per share. If "Value Line" predicts a market price of $27 - $28.50 a year hence then the expected percent gain is: [(27.75~150 - 25.875)/25.875] x 100 = 7~7 that is between 3.5 and 10.5%. The "7" after the tilde repre- sents a range of uncertainty about the "7." This may not yet look quite sensible to you, but read on. I use the so-called "method of bounding values." However its application to finan- cial calculations requires a small modification because finan- cial prudence and scientific prudence are by tradition not quite identical. Until a more suitable instrument is developed the press of a button will provide a rather more delimited answer: 7.246376811594 plm. 2.898550724638, whence the conservative investor can pick something with a more agreeable feel, say 7.25% plm. 2.90%. Fleabyte has an unusual and yet - savor the contradiction! - a most ordinary way of calculating logarithms. Do you perceive the meaning of 1000`10 = 3? (Pronounce "1000 from 10 takes 3.") It takes the power 3 to raise 10 to 1000; or 10^3 = 1000. Thus the answer is the ordinary log of 10, which, incidentally, may also be gotten by typing in log(1000) or lg(1000). I chose the symbol ` for various reasons not the least of which is its presence on the computer keyboard. (It also reminds me of "dŠs" and it is part of ^.) Dealing with logarithms as an operation in the arithmetic rather than a function of 10 - a venerable method from the days people consulted log tables instead of typing on computer keyboards - vastly expands its scope as these examples show: 1234.5678`2 = 10.26979035325 and, contrary to the notion of most people "familiar" with logarithms, you DO have logs of negative numbers - certain negative numbers that is. For example, -96889010407`- 7 = 13. Ever thought of logarithms this way? Clears the mental sinuses, doesn't it? Maybe educators will find this feature useful. For a bit more on the subject see the user manual for the "simplex" model. Upon considering criticism and suggestions I hope will come my way, I intend to include with a next version, v. 1.1, all the roots an extraction ought to produce, e.g. 9^(1/2) + 64^(1/3) + 256^(1/4) = 11, 5, 3, -3. That ought to be fairly instructive also, but it is really done in anticipation of automated problem solving where all roots ought to be available. FBSX_20F.ACC features "quick focus" which can produce a spread- sheet on disk for subsequent pick-up by a wordprocessor. Stu- dents no longer not need a one-semester course to learn how to make spreadsheets and may, therefore, concentrate on more impor- tant subject matter. "Quick focus" is ready for use without prior instruction beyond a few sentences in the manual. Here is the raw output of a spreadsheet produced within a minute from an expression for compounded interest, (1 + percent/100)years x capital: 5. | $1050.00 | $1102.50 | $1157.63 | $1215.51 5.25 | $1052.50 | $1107.76 | $1165.91 | $1227.12 5.5 | $1055.00 | $1113.03 | $1174.24 | $1238.82 5.75 | $1057.50 | $1118.31 | $1182.61 | $1250.61 6. | $1060.00 | $1123.60 | $1191.02 | $1262.48 6.25 | $1062.50 | $1128.91 | $1199.46 | $1274.43 6.5 | $1065.00 | $1134.22 | $1207.95 | $1286.47 6.75 | $1067.50 | $1139.56 | $1216.48 | $1298.59 7. | $1070.00 | $1144.90 | $1225.04 | $1310.80 7.25 | $1072.50 | $1150.26 | $1233.65 | $1323.09 7.5 | $1075.00 | $1155.63 | $1242.30 | $1335.47 A little tabbing and dressing-up with the wordprocessor produces Capital and interest annually compounded (per $1000) ==================================================== % 1 year 2 years 3 years 4 years ==================================================== 5.00 | $1050.00 | $1102.50 | $1157.63 | $1215.51 5.25 | $1052.50 | $1107.76 | $1165.91 | $1227.12 5.50 | $1055.00 | $1113.03 | $1174.24 | $1238.82 5.75 | $1057.50 | $1118.31 | $1182.61 | $1250.61 6.00 | $1060.00 | $1123.60 | $1191.02 | $1262.48 6.25 | $1062.50 | $1128.91 | $1199.46 | $1274.43 6.50 | $1065.00 | $1134.22 | $1207.95 | $1286.47 6.75 | $1067.50 | $1139.56 | $1216.48 | $1298.59 7.00 | $1070.00 | $1144.90 | $1225.04 | $1310.80 7.25 | $1072.50 | $1150.26 | $1233.65 | $1323.09 7.50 | $1075.00 | $1155.63 | $1242.30 | $1335.47 ==================================================== The percentages were obtained by first typing in "5," then "7.5," and then the desired interval, .25. The rest is pretty well automated. But if you want to do calculations with empirical data, then ignore typing in 7.5. You will then be asked to feed in individual data instead. Plainly, "Fleabyte" is hardly "yet another desktop calculator." This is not all, but I'll leave it to the user guides to tell the rest of the story, except for a few words about the "Worm- hole." The ordinary version WHSX_10.ACC does calculations directly on the wordprocessor, including obtaining sums of numbers neatly placed in rows or columns, or sums of numbers scatterd all over the screen. But WHSX_10D.ACC lets one in addition to all of that also obtain their average, the mean deviation from the average, the standard deviation, variance, as well as the skew and kurtosis of the curves representing their aggregate. Use the mouse to lasso the word "stats" along with the numbers and off you go: stats 109 111 82 105 134 113 90 79 100 117 80 90 121 75 93 99 90 92 96 82 101 104 80 81 83 104 93 109 72 110 111 91 109 111 81 122 83 92 101 77 99 103 93 91 67 102 84 96 89 81 102 84 96 89 81 107 95 91 107 102 109 93 82 103 116 86 78 73 104 104 103 108 76 94 108 72 87 121 80 127 105 103 106 119 90 93 89 110 103 100 99 79 117 114 117 93 82 98 89 119 Mean: 96.81 Mean deviation: 11.646 Variance: 193.074 Standard deviation: 13.895 Corrected std dev.: 13.965 Skew: 0.157 Kurtosis: -0.561 The method used may well be "illegal" in terms of official software guidelines, but, by golly! is it ever efficient. If illegal now, it better be legalized pronto! Clearly, Fleabyte and the Wormhole have something to offer, especially in the domain of education. Students can now concen- trate on their subject matter instead of worry about their tools. Using a wordprocessor such as 1st Word Plus is easy to learn. Nobody needs a computer course for that. Add Fleabyte and the Wormhole and you have a package of educational tools that ought to put the Atari ST right in our schools! As an Atarist of long standing I hope the executive of the Atari Corporation will be alert to this fact. Henry K. van Eyken 11, ch Falcon, Lakefield, Que. J0V 1K0, Canada NOTE (September 21): A correction still had to be made; hence the versions 1.1 and 1.2 of FBSF and FBNS. The corrected ver- sions are being mailed without charge to registered owners of version 10 of these accessories. All I feel I can reasonably do to correct any wrongs in the calculating aspects of the Fleabyte and Wormhole accessories is being done. Nevertheless the common caveat that goes with computer software applies. I make no representation or warranty with respect to the accessories and documentation and I provide this software without any warranty of any kind, either expressed or implied. P.S. Interested commercial or educational parties who are in principle willing to support the project or take a hand in it may obtain a set of the six accessories mentioned with user guides and code for $15 shipping and handling. A limited number of sets are freely available to editors of Atari ST publications. *************************************************************** The phrase "1-2-3" appears to be a trademark. In this document Fleabyte's spreadsheet feature is now referred to as "Quick Focus." - September 17, 1992. *************************************************************** APPENDIX Extract from the procedure "Calculator" in the "simplex" and "full-function" models (Solutions are found in the variable bb$; commentary is found in response$) CASE "^" IF y*LOG10(ABS(x))>=1000 response$="off limits: "+STR$(x)+"^"+STR$(y) ENDIF IF x>0 z=x^y bb$=STR$(z) ENDIF IF x=0 IF y>0 bb$="0" ELSE IF y=0 response$="0^0 undefined" ELSE IF y<0 response$=STR$(x)+"^"+STR$(y)+" div. by 0" ENDIF ENDIF IF x<0 IF y=0 bb$="1" ELSE IF ABS((ROUND(y)-y)/y)<1.0E-12 y%=ROUND(y) z=x^y% bb$=STR$(z) ELSE IF ABS((ROUND(1/(2*y),1)-1/(2*y))/(1/(2*y)))<1.0E-12 AND ABS(FRAC(ROUND(1/(2*y),1)))=0.5 yy%=ROUND(1/y) y=1/yy% bb=(-x)^ABS(y) round%=LEN(STR$(bb))-INSTR(STR$(bb),".")-1 bb=ROUND(bb,round%) IF y>0 bb$=STR$(-bb) ELSE IF y<0 z=-1/bb bb$=STR$(z) ENDIF ELSE response$="try x^"+CHR$(241)+"(1/q)^p; p even, q odd" ENDIF ENDIF CASE "`" IF y=1 IF x=1 response$="1`1 = {numbers}" ELSE response$=STR$(x)+"`1 invalid" ENDIF ELSE IF y>0 IF x>0 z=LOG10(x)/LOG10(y) bb$=STR$(z) ELSE IF x<=0 response$=STR$(x)+"`"+STR$(y)+" invalid" ENDIF ENDIF IF y=0 IF x=1 bb$="0" ELSE IF x=0 response$="0`0 = {numbers>0}" ELSE response$=STR$(x)+"`0 invalid" ENDIF ENDIF IF y=-1 IF x=1 response$="1`-1 = {0,"+CHR$(241)+"(p/q); p even}" ELSE IF x=-1 response$="-1`-1 = {"+CHR$(241)+"(p/q); p odd, q odd}" ELSE response$=STR$(x)+"`-1 invalid" ENDIF ELSE IF y<0 IF x=1 bb$="0" ELSE IF x<>0 z=LOG10(ABS(x))/LOG10(-y) zf=z-ROUND(z) zg=1/z-ROUND(1/z) IF (zf<1.0E-11 AND zf>-1.0E-11) OR (zg<1.0E-11 AND zg>-1.0E-11) IF (x>0 AND FRAC(z/2)==0) OR (x<0 AND FRAC(ABS(z/2))==0.5) bb$=STR$(ROUND(z)) ELSE IF (x<0 AND FRAC(1/z/2)==0) OR (x>0 AND FRAC(1/z/2)==0.5) bb$=STR$(ROUND(z)) ELSE response$="can't (yet) do "+STR$(x)+"`"+STR$(y) ENDIF ELSE response$="can't (yet) do "+STR$(x)+"`"+STR$(y) ENDIF ELSE response$="0`"+STR$(y)+" invalid" ENDIF ENDIF CASE "*" z=x*y bb$=STR$(z) CASE "/" IF y=0 response$=STR$(x)+"/0: division by 0" ELSE z=x/y bb$=STR$(z) ENDIF CASE "-" z=x-y bb$=STR$(z) CASE "+" z=x+y bb$=STR$(z) ENDSELECT