Content deleted Content added
Sun Creator (talk | contribs) m Typo fixing and checking, typos fixed: ,
→ , (2), the the → the (2) using AWB (8097) |
|||
Line 8:
and similarly for the other arithmetic operations of subtraction, multiplication, and division.
The algebraic expression <math>ax^2 + bx + c</math> was written a x dup × × b x × + c +
where 'dup' meant 'duplicate the value'.
Following the reverse Polish form, an assignment statement to evaluate the formula <math>y = ax^2 + bx + c</math> was written as a x dup × × b x × + c + (y) .
The computer evaluated the expression as follows: the values of a, then b, were pushed onto the top of the accumulator stack; 'dup' caused a copy of the top-most value (x) to be pushed onto the top of the accumulator stack; Multiply (×) caused the top two values, namely, x and x, to be removed (popped) and multiplied, returning the product to the top of the accumulator stack. The second multiply (×) then caused the top two values on the stack (namely, a and x**2) to be popped and multiplied, and the product (a×x**2) to be pushed onto the top of the accumulator stack. And so on
Assuming that the value on the top of the accumulator stack was not required immediately, it would be removed (cleared) by using the operator (;).
Line 64:
|-
! scope="row" | 1
|
|-
! scope="row" | 2
Line 122:
==Historical note==
In
In the second version introduced by 1958, values were held in floating-point form, with
|