August 1999
Intermediate to advanced
1000 pages
83h 9m
English
/usr/bin/dc [filename] The dc desktop calculator is an arbitrary-precision arithmetic package. Ordinarily, it operates on decimal integers, but you can specify an input base, output base, and a number of fractional digits to be maintained. The dc command uses postfix notation (so-called reverse Polish). With postfix notation, first you type two numbers, one on each line, and then the operator. To print the results on the screen, you type the p command as shown in the following example.
castle% dc 2 2 + p 4 q castle%
Type q to exit dc.
The dc command also can accept several commands on a single line. You must delimit numbers by white space, but you can run other commands together. For example, you ...
Read now
Unlock full access