RDD - Round Down #
Round Down uses similar logic to Round Nearest, but rounds down to the last level specified in Operand 3
Examples
Operand 2 | Operand 3 | Result (stored in Operand 1) |
---|---|---|
1.10011 | 1 | 1 |
1.10011 | 0.001 | 1.100 |
1.1 | 0.5 | 1.0 |
1.0 | 0.5 | 1.0 |
1.9 | 0.5 | 1.5 |
As with RDN, it is acceptable to round down to the next .25, or any other amount such as to the next 2, 3, etc.
- Statement
- Round the value of PC 500 down to the nearest quarter hour and store it back into itself.
Line | CMD | OT | Operand 1 | OPER | OT | Operand2 | OT | Operand3 | If Goto | Else GoTo |
---|---|---|---|---|---|---|---|---|---|---|
00010 | LET | PC | 500 | RDD | PC | 500 | N | .25 | 99999 | |
99999 | EXIT | 99999 |