Инструкция dc

инструкция dc
The fraction part of the exponent is ignored. Email bug reports to Be sure to include the word «dc» somewhere in the «Subject:» field. The default precision value is zero, which means that all arithmetic except for addition and subtraction produces integer results. `c’ Clears the stack, rendering it empty. `d’ Duplicates the value on the top of the stack, pushing another copy of it.


The output radix is used for printing numbers. Entering a number pushes it on the stack. All normal output is to standard output; all error messages are written to standard error. To exit, use `q’. C-c does not exit; it is used to abort macros that are looping, etc. (Currently this is not true; C-c does exit.) A reverse-polish calculator stores numbers on a stack.

The precision of the result is determined only by the values of the arguments, and is enough to be exact. `-‘ Pops two values, subtracts the first one popped from the second one popped, and pushes the result. `*’ Pops two values, multiplies them, and pushes the result. The previous value in register r’s stack, if any, is now accessible via the `lr’ command. DC has three parameters that control its operation: the precision, the input radix, and the output radix. The quotient is pushed first, and the remainder is pushed next.

Похожие записи: