Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/TR/html4/strict.dtd"><html><head><title>RPN Calculator Model n0</title><link rel="stylesheet" type="text/css" href="rpn.css"><meta http-equiv="Content-type" content="text/html;charset=UTF-8"></head><body><h1>RPN Calculator Model n0</h1><form id="calc" method="get" action="rpn-n0.cgi"><div class="disp">0</div><table><tr><td colspan=2><input class="buttontw2" type="submit" name="button" value="ENTER" /></td><td><input class="buttontw" type="submit" name="button" value="clx" /></td><td><input class="buttontw" type="submit" name="button" value="clr" /></td></tr><tr><td><input class="buttontw" type="submit" name="button" value="-" /></td><td><input class="buttonwb" type="submit" name="button" value="7" /></td><td><input class="buttonwb" type="submit" name="button" value="8" /></td><td><input class="buttonwb" type="submit" name="button" value="9" /></td></tr><tr><td><input class="buttontw" type="submit" name="button" value="+" /></td><td><input class="buttonwb" type="submit" name="button" value="4" /></td><td><input class="buttonwb" type="submit" name="button" value="5" /></td><td><input class="buttonwb" type="submit" name="button" value="6" /></td></tr><tr><td><input class="buttontw" type="submit" name="button" value="*" /></td><td><input class="buttonwb" type="submit" name="button" value="1" /></td><td><input class="buttonwb" type="submit" name="button" value="2" /></td><td><input class="buttonwb" type="submit" name="button" value="3" /></td></tr><tr><td><input class="buttontw" type="submit" name="button" value="/" /></td><td><input class="buttontw" type="submit" name="button" value="mod" /></td><td><input class="buttonwb" type="submit" name="button" value="0" /></td><td><input class="buttontw" type="submit" name="button" value="neg" /></td></tr><tr><td><input class="buttonbw" type="submit" name="button" value="rld" /></td><td><input class="buttonbw" type="submit" name="button" value="swp" /></td><td><input class="buttonbw" type="submit" name="button" value="sto" /></td><td><input class="buttonbw" type="submit" name="button" value="rcl" /></td></tr></table><div class="stat">S<input readonly name="s" value="0" /><br />T<input readonly name="t" value="0" /><br />Z<input readonly name="z" value="0" /><br />Y<input readonly name="y" value="0" /><br />X<input readonly name="x" value="0" /><input type="hidden" name="mode" value="0" /></div><div class="label">RPN CALCULATOR n0</div></form><div id="inst"><h3>Instructions</h3><p class="instp">Enter numbers separated by ENTER key, then press operation key to display the result (= key is not needed). Numbers are stored in a LIFO stack (registers X, Y, Z, T). Display shows the last number (input or result) on the stack (register X). Register S is for storing constants.</p><p class="instp"><strong>STACK EFFECTS:</strong> (<em>x, y, z, t, s,</em> are current register values.)</p><table><tr><td class="instblk"><br /><input class="buttontwj" type="button" disabled value="ENTER" /><br /><em>z</em> → T<br /><em>y</em> → Z<br /><em>x</em> → Y,X</td><td class="instblk"><em>op</em><br />(<input class="buttontwj" type="button" disabled value="+" /><input class="buttontwj" type="button" disabled value="-" /><input class="buttontwj" type="button" disabled value="*" /><input class="buttontwj" type="button" disabled value="/" /><input class="buttontwj" type="button" disabled value="mod" />)<br /><em>t</em> → T,Z<br /><em>z</em> → Y<br /><em>y op x</em> → X</td><td class="instblk"><br /><input class="buttontwj" type="button" disabled value="neg" /><br /><em>-x</em> → X</td><td class="instblk"><br /><input class="buttonbwj" type="button" disabled value="sto" /><br /><em>x</em> → S</td><td class="instblk"><br /><input class="buttonbwj" type="button" disabled value="rcl" /><br /><em>z</em> → T<br /><em>y</em> → Z<br /><em>x</em> → Y<br /><em>s</em> → X</td></tr></table><table><tr><td class="instblk"><input class="buttonbwj" type="button" disabled value="rld" /><br /><em>x</em> → T<br /><em>t</em> → Z<br /><em>z</em> → Y<br /><em>y</em> → X</td><td class="instblk"><input class="buttonbwj" type="button" disabled value="swp" /><br /><em>x</em> → Y<br /><em>y</em> → X</td><td class="instblk"><input class="buttontwj" type="button" disabled value="clx" /><br />0 → X</td><td class="instblk"><input class="buttontwj" type="button" disabled value="clr" /><br />0 → X,Y,Z,T,S</td></tr></table></div><div id="addl"><p><strong>Reverse Polish Notation:</strong> Operations on n0 follow Reverse Polish Notation (RPN) in which operators are entered after the necessary operands. This allows for an unambiguous and concise representation of arithmetic statements without the need for parentheses or rules of operator precedence to specify the order of operations. In standard notation, it is ambiguous whether the statement <em>1 + 2 * 3</em> should be computed as <em>(1 + 2) * 3</em> or <em>1 + (2 * 3)</em>, but can be specified unambiguously in RPN by <em>1 2 + 3 *</em> or <em>2 3 * 1 +</em>, respectively.</p><p><strong>Precision and Non-Integer Arithmetic:</strong> n0 processes all numbers as single-precision signed integers, and supports numbers in the range -2,147,483,648 to 2,147,483,647 without fractional portions (there is no decimal point key). It is possible to operate on non-integer numbers by using the technique of <strong>fixed-point arithmetic</strong>: The user multiplies input arguments and mentally divides results by appropriate powers of 10 to obtain the required precision.</p><p><a href="rpn-n0.cgi.txt">Program source.</a></p><p>Model n0 is the first of a series of online calculators inspired by the Hewlett-Packard line of slide rule pocket calculators produced in the 1970s (n0 was designed with refrence to the <a href="
http://www.hpmuseum.org/hp35.htm">HP-35</a> in particular) and the <a href="
http://www.forth.org/whatis.html">Forth programming language</a> invented by <a href="
http://www.colorforth.com/bio.html">Chuck Moore</a> in 1968.</p><p>RPN Calculator Model n0 is powered by <a href="
http://bernd-paysan.de/gforth.html">Gforth</a> 0.6.2 on the MetaArray host at <a href="
http://www.sdf.org">SDF</a>.</p><p class="ctr"><a href="
http://www.catholic.org/clife/prayers/prayer.php?p=1378">+JMJ</a></p></div></body></html>