CALC100 version 1.2 CALC100 is a 100 digit calculator program. It can do arithmetic, Fortran-style algebraic syntax, and various built-in mathematical functions. Its fast floating point arithmetic takes advantage of the computer's unsigned integer multiply and divide instructions. Division uses a Newton-Raphson iteration, which is much faster than the shift-and-subtract approach. Algebraic expressions are entered in the same syntax as Fortran or other high level language statements. Multiple statements can be entered on the same line but must be separated by semicolons. Thus the entry 'x=2; y=x+4' sets the variables x and y as indicated and also displays the numeric results. There are 7 algebraic variables named t, u, v, w, x, y, and z. The constant pi is also represented as a variable. All of calc100's commands have the syntax of C language functions. For example, to display the logarithm of 2, you may enter the command 'log(2)' followed by a carriage return. The parentheses may be omitted if there is no ambiguity; thus 'log 2' gives the same result. acos Radian inverse circular cosine acosh Inverse hyperbolic cosine asin Radian inverse circular sine asinh Inverse hyperbolic sine atan Radian inverse circular tangent atanh Inverse hyperbolic tangent bits Display floating point number as array of integers cbrt Cube root cos Circular radian cosine cosh Hyperbolic cosine cot Circular radian cotangent digits N Set number of digits in the numeric display to N dm Define macro command (see text below) em N Execute macro N times exit Terminate program - use at end of command files exp Base e exponential function fac Factorial of integer argument gamma Gamma function (accuracy >= 55 decimals) h or help Display list of commands hex Display integer argument in radix 8, 10, and 16 jv(v,x) Bessel function Jv(x) (accuracy about 40 decimals) log Natural logarithm pow(x,y) exp( y log x ) = x raised to the yth power save filename Save session in file 'filename' or in 'calc.sav' if no file name given sin Circular radian sine sinh Hyperbolic sine sqrt Square root system command Execute operating system 'command' and return take filename Read commands from indicated disc file tan Circular radian tangent tanh Hyperbolic tangent tm Type (display) currently defined macro command yn(n,x) Bessel function Yn(x) (accuracy about 40 decimals) To define a macro expression, enter 'dm' and type the expression on the next line. The expression must fit on one line, but multiple statements can be entered if they are separated by a semicolon (;). Execute the defined macro N times by the command 'em N'. Display the current macro definition by 'tm'. Example: x=y=v=z=1 dm z=z*x/v; v=v+1; y=y+z em 10 is a power series for exp(1). You can put the above into an ASCII file named, say, sample.tak and execute the program from the file by the command 'take sample.tak'. You can also redirect input or output, for example: 'calc answer.dat'. But in that case there shoud be an 'exit' command at the end of the input file. The 'system' command passes the rest of the command line to the computer's operating system to execute as a command. After the command has finished executing, control will return to the calc100 program. The 'save' command starts logging most of what appears on the screen into a disc file. Certain error printouts and the help menus will not be written into the file. A repeated invocation of 'save' closes the old save file and opens a new one (or possibly the same one if the file name argument is the same). Printout generated by a 'system' command will not go into the save file, but it probably will go into a file that was created by redirecting the standard output as in 'calc answer.dat'. The rigorous way of calling a function is to put the argument in parentheses. However if no expression decoding is implied, the parentheses can be omitted. For example 2 + sin x means 2 + sin(x), but sin x + 2 means sin(x) + 2. If a function has more than one argument, the parentheses must be there. For example pow(2,3) is 8, but pow 2,3 is an error. By default, the numeric display gives 70 digits after the decimal point. This may be varied from N = 1 to 99 digits by the command 'digits N'. -- Steve Moshier September, 1988