home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / fish / disks / d1110.lha / Programs / eCalc / eCalc.Doc < prev    next >
Encoding:
Text File  |  1995-07-14  |  6.2 KB  |  176 lines

  1. ***********************************************
  2. eCalc - A program to find e - about 2.718281828
  3. ***********************************************
  4.  
  5. Requirements to using eCalc V2.5:
  6. - Amiga with 68020 or better CPU  (a FPU is not needed and not used anyway)
  7. - Workbench/Kickstart 2.04 or better (I haven't tested it with less than 3.0)
  8. - About twice as much bytes memory as the accuracy you want e
  9. - Time (and patience!)
  10.  
  11. It uses no external libraries.
  12.  
  13. This program is Freeware: It may be distributed freely for non-commercial
  14. purposes. It should be free and a copying fee must not exceed £2.
  15. This program may not be distributed with any magazine-coverdisk without
  16. written permission. It may be included in any PD-library or on CDs including
  17. PD software, such as the Fish, Aminet and other series including similar
  18. free software.
  19.  
  20. The program and this docfile may not be changed or modified!
  21.  
  22. YOU USE THIS PROGRAM ON YOUR OWN RISK. THE AUTHOR CAN NOT AND WILL NOT
  23. GUARANTEE ITS ACCURACY, NOR ANY OTHER DAMAGES ARISING FROM ANY USE OR
  24. MISUSE OF THIS PROGRAM AND DOCUMENTATION.
  25.  
  26. If publishing a result produced by eCalc, please give credit to the author
  27. and state which version of the program you used (V2.5).
  28.  
  29. History
  30. -------
  31.  
  32. This program was originally made in only 20 minutes modifying the sourcecode
  33. of my piCalc program (calculates pi). It is many times faster than piCalc
  34. though and should be able to calculate
  35.  
  36. How to use it
  37. -------------
  38.  
  39. eCalc is Shell/CLI-only utility. To use it you have to open a shell-window.
  40. In its simplest form you write (from Shell)
  41.  
  42. You can always stop the program with Ctrl-C.
  43.  
  44. "eCalc XXXXX" where XXXXX is the number of decimals eCalc should calculate.
  45.  
  46. The higher number of decimals the more time the calculation will take. If you
  47. think of calculating many decimals (more than 20000) you should run eCalc
  48. with the "ESTIMATE" option:
  49.  
  50. "eCalc estimate 100000" will estimate how much time a calculation of 100000
  51. decimals will take, so that you won't be surprised by how slow things are
  52. going.
  53.  
  54. If you want to save the result to a file, use "SAVEFILE=filename", the result
  55. will be written to this file when it has finished.
  56.  
  57.  
  58. Those options in full
  59. ---------------------
  60.  
  61. Type "eCalc ?" for the eCalc Template:
  62.  
  63. DECIMALS/N,EVERY/N,SAVEFILE,SAVEEVERY/N,NOTIFY/S,NOOUTPUT/S,ESTIMATE/S
  64.  
  65.  
  66. DECIMALS
  67. is the number of decimal places you want eCalc to calculate, this must be
  68. between 1 and 2,147,483,647. Except when "ESTIMATE" is selected, you will
  69. need just below twice as much memory free as the number of decimals you
  70. want to calculate e to. (e.g. 1,000,000 decimals requires almost 2 MB
  71. memory.)
  72. (If not specified, the program uses 45 decimals)
  73.  
  74. EVERY
  75. is how often you want eCalc to output its current calculation of e. If you
  76. use "EVERY 10000" eCalc will output to screen (StdOut) when it has 10000, 
  77. 20000, 30000 and so on of decimals. This option is probably most useful when
  78. used with the "NOTIFY" option.
  79.  
  80. SAVEFILE
  81. when specified eCalc will save its calculation to the specified file, this
  82. it a much nicer method than running eCalc with a ">" redirection file.
  83. Beware: If eCalc can't create this file it would not give any error messages,
  84. just continue on!
  85.  
  86. SAVEEVERY
  87. specifies how often eCalc should save its current calculation to SAVEFILE.
  88.  
  89. NOTIFY
  90. is a very useful option in conjunction with the EVERY and SAVEFILE
  91. options. It notifies you how far it has come, writing "Dec: XXXX"  to the
  92. Shell-window, where XXXX is how many decimals it has calculated so far, so
  93. you have some kind of control of the process. Write NOTIFY EVERY 1000 to
  94. have eCalc notify you every time it has calculated 1000 new decimals.
  95.  
  96. NOOUTPUT
  97. is useful when you use the SAVEFILE option and don't want e to be
  98. echoed to screen as this can take quite a while with many decimals.
  99.  
  100. ESTIMATE
  101. will estimate the TIME needed to calculate e. The estimating may take
  102. a number of seconds (2-6) but will display a rough indication on how
  103. long the calculation will take: You should not touch the mouse or keyboard
  104. during this test, as this will cause eCalc to over-estimate the time needed.
  105.  
  106.  
  107. Is eCalc calculating the right value for e?
  108. ---------------------------------------------
  109.  
  110. Actually I don't know, it uses the same routines as piCalc and piCalc seems
  111. calculate pi correctly. The first decimals of e seems to be correct, as I
  112. have made another (extremely much slower) program using the definition and
  113. got the same value. You should not depend on eCalc giving you the right
  114. value, but it is probably correct (I hope).
  115.  
  116. Please don't have a large number of other programs running when eCalc
  117. is busy calculating. A single bug in any of the programs running alongside
  118. eCalc could accidentally write to a memory location used by eCalc and
  119. giving a wrong result as eCalc does absolutely NONE checking on the
  120. result as this would decrease performance considerably.
  121.  
  122.  
  123. Program technicals (programmers)
  124. ---------------------------------
  125.  
  126. This program uses 32/64 bit integer math, using the Mulu.L/Divu.L instructions
  127. heavily. The speed of this program therefore is largely dependent on the speed
  128. the CPU carries out such multiplications and dividitions. The program stores
  129. e in longwords, each containing 9 digits. This limits the program to values
  130. multiple by 9. (9,18,27,36...)
  131.  
  132. Why is 68020 required?
  133.  
  134. Just because I was able to make the program 3 times faster when I could
  135. 68020 instructions instead of 68000 only.
  136.  
  137.  
  138. Program technicals (math)
  139. -------------------------
  140.  
  141. Calculation method:
  142.  
  143. e = 1/0! + 1/1! + 1/2! + 1/3! + 1/4! + 1/5! ...
  144.  
  145. where
  146. 0! = 1
  147. 1! = 1
  148. 2! = 1 * 2 = 2
  149. 3! = 1 * 2 * 3 = 6
  150. 4! = 1 * 2 * 3 * 4 = 24 and so on
  151.  
  152. If you know a better formula/method or know another e-calculation program
  153. (that is faster), please write to me!
  154.  
  155.  
  156. Author
  157. ------
  158.  
  159. Write if you know of any SERIOUS bugs (e is not accurate, fails on 68060,
  160. etc.) If you have calculated e with more than 1,000,008 decimals using this
  161. program or know a more efficient formula or another Amiga program that is
  162. faster, please write! 
  163.  
  164. PS: Also try my program piCalc V2.5 that is identical to eCalc V2.5 except
  165. that it calculates pi=3.14159265358979323846264338327950... (I only know
  166. the number this far by heart!)
  167.  
  168.  
  169. My address:
  170. Steffen Thorsen
  171. Fjordgt. 8a
  172. N-4300 Sandnes
  173. Norway
  174.  
  175. (No EMail yet, but I'll have Internet access from September 1995)
  176.