<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://gunkies.org/index.php?action=history&amp;feed=atom&amp;title=32v_1m_dc</id>
		<title>32v 1m dc - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://gunkies.org/index.php?action=history&amp;feed=atom&amp;title=32v_1m_dc"/>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=32v_1m_dc&amp;action=history"/>
		<updated>2026-05-11T17:25:40Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.1</generator>

	<entry>
		<id>https://gunkies.org/w/index.php?title=32v_1m_dc&amp;diff=6950&amp;oldid=prev</id>
		<title>Neozeed: New page: DC(1)               UNIX Programmer's Manual                DC(1)    == NAME ==      dc - desk calculator  == SYNOPSIS ==      dc [ file ]  == DESCRIPTION ==      _D_c is an arbitrary prec...</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=32v_1m_dc&amp;diff=6950&amp;oldid=prev"/>
				<updated>2009-10-26T13:42:39Z</updated>
		
		<summary type="html">&lt;p&gt;New page: DC(1)               UNIX Programmer&amp;#039;s Manual                DC(1)    == NAME ==      dc - desk calculator  == SYNOPSIS ==      dc [ file ]  == DESCRIPTION ==      _D_c is an arbitrary prec...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;DC(1)               UNIX Programmer's Manual                DC(1)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== NAME ==&lt;br /&gt;
     dc - desk calculator&lt;br /&gt;
&lt;br /&gt;
== SYNOPSIS ==&lt;br /&gt;
     dc [ file ]&lt;br /&gt;
&lt;br /&gt;
== DESCRIPTION ==&lt;br /&gt;
     _D_c is an arbitrary precision arithmetic package.  Ordinarily&lt;br /&gt;
     it operates on decimal integers, but one may specify an&lt;br /&gt;
     input base, output base, and a number of fractional digits&lt;br /&gt;
     to be maintained.  The overall structure of _d_c is a stacking&lt;br /&gt;
     (reverse Polish) calculator.  If an argument is given, input&lt;br /&gt;
     is taken from that file until its end, then from the stan-&lt;br /&gt;
     dard input.  The following constructions are recognized:&lt;br /&gt;
&lt;br /&gt;
     number&lt;br /&gt;
           The value of the number is pushed on the stack.  A&lt;br /&gt;
           number is an unbroken string of the digits 0-9.  It&lt;br /&gt;
           may be preceded by an underscore _ to input a negative&lt;br /&gt;
           number.  Numbers may contain decimal points.&lt;br /&gt;
&lt;br /&gt;
     +  - /  *  %  ^&lt;br /&gt;
           The top two values on the stack are added (+), sub-&lt;br /&gt;
           tracted (-), multiplied (*), divided (/), remaindered&lt;br /&gt;
           (%), or exponentiated (^).  The two entries are popped&lt;br /&gt;
           off the stack; the result is pushed on the stack in&lt;br /&gt;
           their place.  Any fractional part of an exponent is&lt;br /&gt;
           ignored.&lt;br /&gt;
&lt;br /&gt;
     s_x    The top of the stack is popped and stored into a&lt;br /&gt;
           register named _x, where _x may be any character.  If&lt;br /&gt;
           the s is capitalized, _x is treated as a stack and the&lt;br /&gt;
           value is pushed on it.&lt;br /&gt;
&lt;br /&gt;
     l_x    The value in register _x is pushed on the stack.  The&lt;br /&gt;
           register _x is not altered.  All registers start with&lt;br /&gt;
           zero value.  If the l is capitalized, register _x is&lt;br /&gt;
           treated as a stack and its top value is popped onto&lt;br /&gt;
           the main stack.&lt;br /&gt;
&lt;br /&gt;
     d     The top value on the stack is duplicated.&lt;br /&gt;
&lt;br /&gt;
     p     The top value on the stack is printed.  The top value&lt;br /&gt;
           remains unchanged.  P interprets the top of the stack&lt;br /&gt;
           as an ascii string, removes it, and prints it.&lt;br /&gt;
&lt;br /&gt;
     f     All values on the stack and in registers are printed.&lt;br /&gt;
&lt;br /&gt;
     q     exits the program.  If executing a string, the recur-&lt;br /&gt;
           sion level is popped by two.  If q is capitalized, the&lt;br /&gt;
           top value on the stack is popped and the string execu-&lt;br /&gt;
           tion level is popped by that value.&lt;br /&gt;
&lt;br /&gt;
     x     treats the top element of the stack as a character&lt;br /&gt;
           string and executes it as a string of dc commands.&lt;br /&gt;
&lt;br /&gt;
     X     replaces the number on the top of the stack with its&lt;br /&gt;
           scale factor.&lt;br /&gt;
&lt;br /&gt;
     [ ... ]&lt;br /&gt;
           puts the bracketed ascii string onto the top of the&lt;br /&gt;
           stack.&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;_x  &amp;gt;_x  =_x&lt;br /&gt;
           The top two elements of the stack are popped and com-&lt;br /&gt;
           pared.  Register _x is executed if they obey the stated&lt;br /&gt;
           relation.&lt;br /&gt;
&lt;br /&gt;
     v     replaces the top element on the stack by its square&lt;br /&gt;
           root.  Any existing fractional part of the argument is&lt;br /&gt;
           taken into account, but otherwise the scale factor is&lt;br /&gt;
           ignored.&lt;br /&gt;
&lt;br /&gt;
     !     interprets the rest of the line as a UNIX command.&lt;br /&gt;
&lt;br /&gt;
     c     All values on the stack are popped.&lt;br /&gt;
&lt;br /&gt;
     i     The top value on the stack is popped and used as the&lt;br /&gt;
           number radix for further input.  I pushes the input&lt;br /&gt;
           base on the top of the stack.&lt;br /&gt;
&lt;br /&gt;
     o     The top value on the stack is popped and used as the&lt;br /&gt;
           number radix for further output.&lt;br /&gt;
&lt;br /&gt;
     O     pushes the output base on the top of the stack.&lt;br /&gt;
&lt;br /&gt;
     k     the top of the stack is popped, and that value is used&lt;br /&gt;
           as a non-negative scale factor: the appropriate number&lt;br /&gt;
           of places are printed on output, and maintained during&lt;br /&gt;
           multiplication, division, and exponentiation.  The&lt;br /&gt;
           interaction of scale factor, input base, and output&lt;br /&gt;
           base will be reasonable if all are changed together.&lt;br /&gt;
&lt;br /&gt;
     z     The stack level is pushed onto the stack.&lt;br /&gt;
&lt;br /&gt;
     Z     replaces the number on the top of the stack with its&lt;br /&gt;
           length.&lt;br /&gt;
&lt;br /&gt;
     ?     A line of input is taken from the input source (usu-&lt;br /&gt;
           ally the terminal) and executed.&lt;br /&gt;
&lt;br /&gt;
     ; :   are used by _b_c for array operations.&lt;br /&gt;
&lt;br /&gt;
     An example which prints the first ten values of n! is&lt;br /&gt;
&lt;br /&gt;
        [la1+dsa*pla10&amp;gt;y]sy&lt;br /&gt;
        0sa1&lt;br /&gt;
        lyx&lt;br /&gt;
&lt;br /&gt;
== SEE ALSO ==&lt;br /&gt;
     [[32v 1m bc|bc(1)]], which is a preprocessor for _d_c providing infix nota-&lt;br /&gt;
     tion and a C-like syntax which implements functions and rea-&lt;br /&gt;
     sonable control structures for programs.&lt;br /&gt;
&lt;br /&gt;
== DIAGNOSTICS ==&lt;br /&gt;
     `x is unimplemented' where x is an octal number.&lt;br /&gt;
     `stack empty' for not enough elements on the stack to do&lt;br /&gt;
     what was asked.&lt;br /&gt;
     `Out of space' when the free list is exhausted (too many&lt;br /&gt;
     digits).&lt;br /&gt;
     `Out of headers' for too many numbers being kept around.&lt;br /&gt;
     `Out of pushdown' for too many items on the stack.&lt;br /&gt;
     `Nesting Depth' for too many levels of nested execution.&lt;br /&gt;
&lt;br /&gt;
[[Category:32v man section 1]]&lt;/div&gt;</summary>
		<author><name>Neozeed</name></author>	</entry>

	</feed>