to quit, for help, orto abort an operation. Command keys have different meanings as inputs or actions. Upper/lower case doesn't matter. Here are the details: Commands that always work: -------------------------- h or ? help (this screen) i info on memory use q quit the program repeat last input or action emergency exit if it hangs, but try first Input Commands: --------------- clear input line +6 or +-6 add (etc) 6 or -6 to last input - change the sign of last input 6.06... 6.060606... to digits places 66a 66 degree angle in radians 6ab16 enter value 6A in base 16, bases to 32K are ok 66,6b100 enter 66*100+6 in base 100 a or -a last answer or its negative d or w decimal or whole part of last answer e10 e to 10 (or digits) places 6.6e6 6.6 x 10^6 in scientific notation k66 66th prime (2 is the first) m[0-9] get value from memory cell 0-9 66m[0-9] enter value and store it in memory cell 0-9 (m=0) o10 pi to 10 (or digits) places ("o" for circle) p66 smallest prime >= 66 r6.6 random with 6 digits before decimal and 6 after r66. random with 66 digits and random decimal point s66,6 string of 66 6s for big test numbers x exchange last input (a=last b or b=last a) z pop value from stack (or 0) Action Commands (a is FIRST, b is SECOND): ------------------------------------------ abort calculation (maybe), also try + - * / as expected \ % integer and remainder of division ^ % ! a^b, a mod b, and a! *66 a*b (mod 66), also + - \ but not ^ /66 divide (etc) and figure 66 digits for this calc only = compare, return 1 if a>b, 0 if a=b, -1 if a v 1/a inverse w integer square root of a x do nothing Result Commands: ---------------- + - * / add (etc) memory cell 0 with result and store b change number base f factor result m or 0-9 put result in memory cell 0-9 (m=0) p print to LPT1: r ratio of result s save to Log file z push result to stacknumber theory info or continue p primality test working factor after abort s save to Log file b d s p t take biggest factor (etc) as answer There's lot of commands, but this HELP is always available by pressing or . File list: ------------ BIGNUM.EXE DOS executable for x286 or better BIGNUM.ICO an icon for Win3.1 BIGNUM.PIF Win3.1 pif file, works well in a window BNLOG.LOG log file for saved calculations BNPRMCNT.DAT prime number table, not needed but speeds up factoring README.TXT this file TBVAULT.TXT about Treebeard's Basic Vault ------------ BIGNUMxx.BAS Basic source code PRMCNT.BAS Basic program to build BNPRMCNT table MAKE.BAT batch file to compile and link from DOS prompt XQB.BAT batch file to start PDS and load code Guidance from: ---------------- H. Davenport, The Higher Arithmetic, Dover, 1983 (reprint of 1952) Martin Gardner, Tests of Divisibility, The Unexpected Hanging, p.160 Robert T. Kurosaka, Euclid's Algorithm, Byte, Jan 1986, p.397 Paul A. Nilson, Algorithms for a Variable-Precision Calculator, Byte, Jan 1985, p.211 Paulo Ribenboim, The Little Book of Prime Numbers, Springer-Verlag, 1991 Peter Rice, Arithmetic on your PC, Byte, Mar 1985, p.119 Neville Robbins, Beginning Number Theory, Wm.C.Brown Publishers Dan Sandberg, An Algorithm That Converts Decimals To Fractions, Byte, May, 1985, p.429 Bruce Schneier, Applied Cryptography, John Wiley & Sons, 1996, chap.11 Samuel Selby, CRC Standard Mathematical Tables, CRC Press, Inc. John Smith, Public Key Cryptography, Byte, Jan 1983, p.198 John David Stone, Fundamentals of Computer Science II: Bignums, http://www.math.grin.edu/~stone/courses/fundamentals/bignums.html David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, 1986 Various posts in sci.math, sci.math.num-analysis, and sci.crypt Conditions: ------------- This program and source code are yours to use and modify as you will, but they are offered as freeware with no warranty whatsoever. Give me credit, but do not distribute any changes under my name, or attribute such changes to me in any way. You're on your own! Send comments and fixes to: Marc Kummel aka Treebeard mkummel@rain.org http://www.rain.org/~mkummel/ For more interesting Basic software with source code, check out Treebeard's Basic Vault at http://www.rain.org/~mkummel/basic/