dc: Introduction

 
 1 Introduction
 **************
 
 'dc' is a reverse-polish desk calculator which supports unlimited
 precision arithmetic.  It also allows you to define and call macros.
 Normally 'dc' reads from the standard input; if any command arguments
 are given to it, they are filenames, and 'dc' reads and executes the
 contents of the files instead of reading from standard input.  All
 normal output is to standard output; all error messages are written to
 standard error.
 
    To exit, use 'q'.  'C-c' (or whatever other keystroke your system
 uses to generate a 'SIGINT') does not exit; it is used to abort macros
 that are looping, etc.
 
    A reverse-polish calculator stores numbers on a stack.  Entering a
 number pushes it on the stack.  Arithmetic operations pop arguments off
 the stack and push the results.
 
    To enter a number in 'dc', type the digits (using upper case letters
 'A' through 'F' as "digits" when working with input bases greater than
 ten), with an optional decimal point.  Exponential notation is not
 supported.  To enter a negative number, begin the number with '_'.  '-'
 cannot be used for this, as it is a binary operator for subtraction
 instead.  To enter two numbers in succession, separate them with spaces
 or newlines; these have no meaning as commands.