retroforth/doc/decimal-glossary.txt
crc e39551bf4c add a glossary for the decimal device (nga-python specific)
FossilOrigin-Name: 77c361f541d925b60dffbfcb35e9bf24ad583a916196fa19cfdef6e3719bf86d
2021-02-02 16:11:16 +00:00

296 lines
4.9 KiB
Text

dec:*
Data: -
Addr: -
Decimal: FF-F
Multiply two decimal numbers, returning the result.
Class: class:word | Namespace: dec | Interface Layer: retro/python
Example #1:
,3.1415 ,22 dec:*
dec:+
Data: -
Addr: -
Decimal: FF-F
Add two decimal numbers, returning the result.
Class: class:word | Namespace: dec | Interface Layer: retro/python
Example #1:
,3.1 ,22 dec:+
dec:-
Data: -
Addr: -
Decimal: FF-F
Subtract F2 from F1 returing the result.
Class: class:word | Namespace: dec | Interface Layer: retro/python
Example #1:
,22.3 ,0.12 dec:-
dec:-INF
Data: -
Addr: -
Decimal: -n
Return a value corresponding to negative infinity
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:-eq?
Data: -f
Addr: -
Decimal: FF-
Compare two decimal values for inequality. Returns `TRUE` if they are not equal or `FALSE` otherwise.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:/
Data: -
Addr: -
Decimal: FF-F
Divide decimal value F1 by F2.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:INF
Data: -
Addr: -
Decimal: -n
Return a value corresponding to positive infinity
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:ceiling
Data: -
Addr: -
Decimal: F-F
Return the smallest integral value greater than or equal to the specified value.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:drop
Data: -
Addr: -
Decimal: F-
Discard the top item on the decimal stack.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:dup
Data: -
Addr: -
Decimal: F-FF
Duplicate the top item on the decimal stack.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:dup-pair
Data: -
Addr: -
Decimal: nm-nmnm
Duplicate the top two items on the stack.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:eq?
Data: -f
Addr: -
Decimal: FF-
Compare two decimal values for equality. Returns `TRUE` if they are equal or `FALSE` otherwise.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:floor
Data: -
Addr: -
Decimal: F-F
Perform a mathmatical floor operation on the decimal value.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:gt?
Data: -f
Addr: -
Decimal: FF-
Compare two decimal values for greater than.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:limit
Data: -
Addr: -
Decimal: nlu-m
Return n if it is within the lower (l) and upper (u) bounds. If outside the bounds, return the closes boundary value.
Class: class:word | Namespace: dec | Interface Layer: retro/python
Example #1:
,-10 ,5 ,8 dec:limit
,10 ,1 ,15 dec:limit
dec:lt?
Data: -f
Addr: -
Decimal: FF-
Compare two decimal values for less than.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:max
Data: -
Addr: -
Decimal: mn-o
Return the greater of two values.
Class: class:word | Namespace: dec | Interface Layer: retro/python
Example #1:
,1 ,7 dec:max
,-8 ,-10 dec:max
dec:min
Data: -
Addr: -
Decimal: mn-o
Return the lesser of two values.
Class: class:word | Namespace: dec | Interface Layer: retro/python
Example #1:
,1 ,7 dec:min
,-8 ,-10 dec:min
dec:negative?
Data: -f
Addr: -
Decimal: F-
Return `TRUE` if decimal value is negative or `FALSE` if not.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:over
Data: -
Addr: -
Decimal: FG-FGF
Put a copy of the second decimal value over the top one.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:pop
Data: -
Addr: -
Decimal: -F
Pop a decimal value from the alternate stack.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:push
Data: -
Addr: -
Decimal: F-
Push a decimal value to an alternative stack.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:rot
Data: -
Addr: -
Decimal: abc-bca
Rotate the top three values.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:swap
Data: -
Addr: -
Decimal: FG-GF
Exchange the top and second items on the decimal stack.
Class: class:word | Namespace: dec | Interface Layer: retro/python
dec:to-string
Data: -s
Addr: -
Decimal: F-
Convert a decimal value into a string.
Class: class:word | Namespace: dec | Interface Layer: retro/python
decimal:operation
Data: ,..n-
Addr: -
Decimal: -
Trigger a decimal operation. This is not intended to be used directly.
Class: class:word | Namespace: dec | Interface Layer: retro/python
prefix:,
Data: s-
Addr: -
Decimal: -F
Interpret time: convert string to a decimal value. Compile time: convert string to a decimal value and compile code to push this value to the float stack.
Class: class:macro | Namespace: prefix | Interface Layer: retro/python