What is calc ?
--------------

calc is (yet another) console calculator. It intends to emulate a HP28S,
a popular scientific calculator from Hewlett-Packard.

I wrote it, for two reasons:
i)  as an exercise in learning C, and
ii) I wanted to have a simple, RPN calculator.
    (bc is too big and too complicated in my opinion ;-)


Installation
------------

If you want to recompile calc, type "make".


Type "make install", and "make install.man" (as root).


Features of calc
----------------

calc is intended for every-day purposes, not for complex calculations, 
for which gnuplot should be used.
These HP28-specialties have not been implemented:

 - complex numbers,
 
 - vector, matrices, lists and arrays,
 
 - "normal" algebraic input,
 
 - variables.

Calc recognizes the following functions and operations:

Stack operations:

 push  pop  pick  swap	over  roll  dup  dupn  drop  dropn  depth
 
Functions and algebraic operators: 

chs	+	-	*	/	&	|	
inv	sqrt	sqr
sin	cos	tan     asin	acos	atan	atan2
sinh	cosh	tanh	asinh	acosh	atanh
ln	log	ld	exp	alog	shl
j0	j1	jn	y0	y1	yn
erf	erfc	lgamma
abs	ceil	fact	mod	gcd
hex	dec
pi      e

Delimiters are ",", "space", "tab" and "newline".

A few things have been added with respect to a HP28: the prefixes 0x 
resp. 0 stand for hexadecimal resp. octal constants, as in C. 
Bessel Functions and error functions are new, in order to make better 
use of the math library.


Specialties and hints for porting to other unices
--------------------------------------------------

The Floating Point Exception Handling relies on the math library and 
may be site-dependent.

calc makes good use of Linux's math library, in other words:
if you're running another flavor of unix than Linux, some of the 
following functions might not be available on your system:

 acosh, asinh, atanh, pow2, pow10,
 j0, j1, jn, y0, y1, yn, erf, erfc, lgamma
 
Rewrite the missing functions, but add a correct exception handling, 
e.g. return EDOM, ERANGE etc. in errno! Calc relies on correct return 
values in errno.


Copyrights
----------

Copyright (C) 1993 by David Frey.

calc is released under the GNU Public License, read the file 'COPYRIGHT' 
for further information.

HP 28S is a trademark of Hewlett Packard Instruments.

Acknowledgments
---------------

Linus Torvalds for writing such a wonderful operating system.

Richard Stallman et. al for their GNU Software,
  
 ...and all the other people writing free software!

Michael Weller, the author of xpalette, wrote:

 "This work and much more would not have been possible without 
  the Linux project initiated by Linus Torvalds (and of course
  all other people contributing their work to this project).  
  This project together with the GNU project made it possible 
  for capable computer users of my generation to choose a free, 
  reliable  and state of the art operating system and to get rid 
  of the arbitrariness  of  commercial software	vendors and 
  business people squeezing just money out of people that have to 
  rely on them instead  of supplying working and useful software."

That's exact my opinion. I have nothing to add.
 

How to reach the author:
------------------------

By surface mail:

 David Frey
 Urdorferstr. 30
 CH-8952 Schlieren
 Switzerland
 
