GEORGE (programming language): Difference between revisions

Content deleted Content added
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 the the remaining components of the expression. The final operation, namely (y), returned the value of the expression to storage without changing the status of the accumulator stack.
 
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
| , || // || 1 || 17 || b || r || (b) || (r) || exp || (P)
|-
! scope="row" | 2
Line 122:
 
==Historical note==
In the the first version running by May 1957 on an English Electric DEUCE, all values were stored in binary fixed-point form in a 32-bit word, with 16 binary places.
 
In the second version introduced by 1958, values were held in floating-point form, with