! ( FLOAT CODE -> 1ST -- )
Store FLOAT at address CODE as 64-bit floating-point number.
! ( FLOAT CONST -> 1ST -- )
Store FLOAT at address CONST as 64-bit floating-point number.
! ( FLOAT DATA -> 1ST -- )
Store FLOAT at address DATA as 64-bit floating-point number.
! ( FLOAT DFCODE -> 1ST -- )
Store FLOAT at address DFCODE as 64-bit IEEE floating-point number.
! ( FLOAT DFCONST -> 1ST -- )
Store FLOAT at address DFCONST as 64-bit IEEE floating-point number.
! ( FLOAT DFDATA -> 1ST -- )
Store FLOAT at address DFDATA as 64-bit IEEE floating-point number.
! ( FLOAT DFFAR-ADDRESS -> 1ST -- )
Store FLOAT at address DFFAR-ADDRESS as 64-bit IEEE floating-point number.
! ( FLOAT FAR-ADDRESS -> 1ST -- )
Store FLOAT at address FAR-ADDRESS as 64-bit floating-point number.
! ( FLOAT SFCODE -> 1ST -- )
Store FLOAT at address SFCODE as 32-bit IEEE floating-point number.
! ( FLOAT SFCONST -> 1ST -- )
Store FLOAT at address SFCONST as 32-bit IEEE floating-point number.
! ( FLOAT SFDATA -> 1ST -- )
Store FLOAT at address SFDATA as 32-bit IEEE floating-point number.
! ( FLOAT SFFAR-ADDRESS -> 1ST -- )
Store FLOAT at address SFFAR-ADDRESS as 32-bit IEEE floating-point number.
(+LOOP) ( INTEGER ADDRESS -> FLOAT -- )
An ambiguous condition exists if the loop control parameters are unavailable. Add INTEGER, multiplied by the size of a floating-point number in address units, to the loop index. If the loop index crosses the boundary between the loop limit minus one and the loop limit, discard the loop control parameters and continue execution. Otherwise, branch to the beginning of the loop. ADDRESS -> FLOAT is a dummy parameter indicating the data type of the loop index.
(+LOOP) is an internal definition compiled by +LOOP.
(+LOOP) ( INTEGER DFADDRESS -- )
An ambiguous condition exists if the loop control parameters are unavailable. Add INTEGER, multiplied by the size of a 64-bit IEEE floating-point number in address units, to the loop index. If the loop index crosses the boundary between the loop limit minus one and the loop limit, discard the loop control parameters and continue execution. Otherwise, branch to the beginning of the loop. DFADDRESS is a dummy parameter indicating the data type of the loop index.
(+LOOP) is an internal definition compiled by +LOOP.
(+LOOP) ( INTEGER SFADDRESS -- )
An ambiguous condition exists if the loop control parameters are unavailable. Add INTEGER, multiplied by the size of a 32-bit IEEE floating-point number in address units, to the loop index. If the loop index crosses the boundary between the loop limit minus one and the loop limit, discard the loop control parameters and continue execution. Otherwise, branch to the beginning of the loop. SFADDRESS is a dummy parameter indicating the data type of the loop index.
(+LOOP) is an internal definition compiled by +LOOP.
(>R) ( FLOAT -- )
Push FLOAT onto the return stack.
(>R) is an internal definition compiled by >R and (LOCAL).
(CATCH) ( TOKEN INTEGER INTEGER -- SIGNED )
Push an exception frame onto the return stack and then execute the execution token TOKEN in such a way that control can be transferred to a point just after CATCH if THROW is executed during the execution of TOKEN. The first INTEGER is the difference of the data stack depth (in cells) before and after normal execution of TOKEN. The second INTEGER is the difference of the hardware floating-point stack depth before and after normal execution of TOKEN. Both parameters INTEGER are positive if executing TOKEN decreases the stack size, negative if executing TOKEN increases the stack size, and zero if executing TOKEN does not change the stack size.
If the execution of TOKEN completes normally (i.e., the exception frame pushed by CATCH is not popped by an execution of THROW) pop the exception frame and return zero as SIGNED on top of the data stack, above whatever stack items would have been returned by executing TOKEN. Otherwise, the remainder of the execution semantics are given by THROW.
Note: (CATCH) is a low-level word that is executed or compiled by CATCH.
(FR@) ( -- FLOAT )
Fetch FLOAT from the return stack. The return stack remains unchanged.
(FR@) is an internal definition compiled by LOCAL,.
(FRDROP) ( -- )
Pop FLOAT from the return stack and discard it.
(FRDROP) is an internal definition compiled by R>.
(LOOP) ( ADDRESS -> FLOAT -- )
An ambiguous condition exists if the loop control parameters are unavailable. Add the size of a floating-point number in address units to the loop index. If the loop index is then equal to the loop limit, discard the loop control parameters and continue execution. Otherwise, branch to the beginning of the loop. ADDRESS -> FLOAT is a dummy parameter indicating the data type of the loop index.
(LOOP) is an internal definition compiled by LOOP.
(LOOP) ( DFADDRESS -- )
An ambiguous condition exists if the loop control parameters are unavailable. Add the size of a 64-bit IEEE floating-point number in address units to the loop index. If the loop index is then equal to the loop limit, discard the loop control parameters and continue execution. Otherwise, branch to the beginning of the loop. DFADDRESS is a dummy parameter indicating the data type of the loop index.
(LOOP) is an internal definition compiled by LOOP.
(LOOP) ( SFADDRESS -- )
An ambiguous condition exists if the loop control parameters are unavailable. Add the size of a 32-bit IEEE floating-point number in address units to the loop index. If the loop index is then equal to the loop limit, discard the loop control parameters and continue execution. Otherwise, branch to the beginning of the loop. SFADDRESS is a dummy parameter indicating the data type of the loop index.
(LOOP) is an internal definition compiled by LOOP.
(REPRESENT) ( CDATA -> CHARACTER UNSIGNED FLOAT -- )
At CDATA -> CHARACTER, place the character-string external representation of the rounded integer part of the absolute value of the floating-point number FLOAT. The character string consists of UNSIGNED digits, extended by leading zeros as required. Rounding follows the round to nearest rule. An ambiguous condition exists if the absolute value of FLOAT is bigger than what can be represented with UNSIGNED digits, or if FLOAT is not a valid floating-point number.
(SE.) ( FLOAT SIGNED -- )
Display FLOAT with a trailing space using exponential notation, where the significand is greater than or equal to 1.0 and less than 10.0 to the power SIGNED, and the decimal exponent is a multiple of SIGNED:
Exponential notation := <significand><exponent> <significand> := [-]<digits>.<digits0> <exponent> := E[-]<digits> <digits> := <digit><digits0> <digits0> := <digit>* <digit> := { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 }
An ambiguous condition exists if SIGNED is not greater than zero or if the value of the number-conversion radix BASE is not (decimal) ten.
(SE.) is an internal definition used by E. and S..
* ( FLOAT FLOAT -- 1ST )
Multiply two floating-point numbers FLOAT giving the product 1ST. The result has the same data type as the multiplicand.
* ( FLOAT SIGNED -- 1ST )
Multiply FLOAT by SIGNED giving the floating-point product 1ST.
* ( FLOAT SIGNED-DOUBLE -- 1ST )
Multiply FLOAT by SIGNED-DOUBLE giving the floating-point product 1ST.
* ( FLOAT UNSIGNED -- 1ST )
Multiply FLOAT by UNSIGNED giving the floating-point product 1ST.
** ( FLOAT FLOAT -- 1ST )
Raise the first FLOAT to the power given by the second FLOAT, giving the product 1ST. An ambiguous condition exists if the second FLOAT is negative, or if the quotient lies outside of the range of a floating-point number.
*10^N ( FLOAT SIGNED -- 1ST )
1ST is equal to FLOAT multiplied by 10 raised to the power SIGNED. SIGNED may be positive, negative, or zero.
+ ( ADDRESS -> FLOAT INTEGER -- 1ST )
Add INTEGER to ADDRESS -> FLOAT, giving the sum 1ST. Since ADDRESS points to a floating-point number, INTEGER is automatically multiplied by the number of address units per floating-point number before the actual addition takes place.
+ ( DFADDRESS INTEGER -- 1ST )
Add INTEGER to DFADDRESS, giving the sum 1ST. Since DFADDRESS points to a 64-bit IEEE floating-point number, INTEGER is automatically multiplied by the number of address units per 64-bit IEEE floating-point number before the actual addition takes place.
+ ( DFFAR-ADDRESS INTEGER -- 1ST )
Add INTEGER to DFFAR-ADDRESS, giving the sum 1ST. Since DFFAR-ADDRESS points to a 64-bit IEEE floating-point number, INTEGER is automatically multiplied by the number of address units per 64-bit IEEE floating-point number before the actual addition takes place.
+ ( FAR-ADDRESS -> FLOAT INTEGER -- 1ST )
Add INTEGER to FAR-ADDRESS -> FLOAT, giving the sum 1ST. Since FAR-ADDRESS points to a floating-point number, INTEGER is automatically multiplied by the number of address units per floating-point number before the actual addition takes place.
+ ( FLOAT FLOAT -- 1ST )
Add the second FLOAT to the first FLOAT, giving the sum 1ST. The result has the same data type as the first FLOAT.
+ ( FLOAT SIGNED -- 1ST )
Add SIGNED to FLOAT, giving the floating-point sum 1ST.
+ ( FLOAT SIGNED-DOUBLE -- 1ST )
Add SIGNED-DOUBLE to FLOAT, giving the floating-point sum 1ST.
+ ( FLOAT INTEGER -- 1ST )
Add INTEGER to FLOAT, giving the floating-point sum 1ST. INTEGER is assumed to be an unsigned number.
+ ( SFADDRESS INTEGER -- 1ST )
Add INTEGER to SFADDRESS, giving the sum 1ST. Since SFADDRESS points to a 32-bit IEEE floating-point number, INTEGER is automatically multiplied by the number of address units per 32-bit IEEE floating-point number before the actual addition takes place.
+ ( SFFAR-ADDRESS INTEGER -- 1ST )
Add INTEGER to SFFAR-ADDRESS, giving the sum 1ST. Since SFFAR-ADDRESS points to a 32-bit IEEE floating-point number, INTEGER is automatically multiplied by the number of address units per 32-bit IEEE floating-point number before the actual addition takes place.
+! ( FLOAT DATA -> FLOAT -- )
Add FLOAT to the floating-point number at address DATA -> FLOAT.
+! ( FLOAT DFDATA -- )
Add FLOAT to the 64-bit IEEE floating-point number at address DFDATA.
+! ( FLOAT SFDATA -- )
Add FLOAT to the 32-bit IEEE floating-point number at address SFDATA.
+! ( INTEGER DATA -> ADDRESS -> FLOAT -- )
Add INTEGER to the address stored at address DATA -> ADDRESS -> FLOAT. Since ADDRESS points to a floating-point number, INTEGER is automatically multiplied by the number of address units per floating-point number before the actual addition takes place.
+! ( INTEGER DATA -> DFADDRESS -- )
Add INTEGER to the address stored at address DATA -> DFADDRESS. Since DFADDRESS points to a 64-bit IEEE floating-point number, INTEGER is automatically multiplied by the number of address units per 64-bit IEEE floating-point number before the actual addition takes place.
+! ( INTEGER DATA -> DFFAR-ADDRESS -- )
Add INTEGER to the address stored at address DATA -> DFFAR-ADDRESS. Since DFFAR-ADDRESS points to a 64-bit IEEE floating-point number, INTEGER is automatically multiplied by the number of address units per 64-bit IEEE floating-point number before the actual addition takes place.
+! ( INTEGER DATA -> FAR-ADDRESS -> FLOAT -- )
Add INTEGER to the address stored at address DATA -> FAR-ADDRESS -> FLOAT. Since FAR-ADDRESS points to a floating-point number, INTEGER is automatically multiplied by the number of address units per floating-point number before the actual addition takes place.
+! ( INTEGER DATA -> SFADDRESS -- )
Add INTEGER to the address stored at address DATA -> SFADDRESS. Since SFADDRESS points to a 32-bit IEEE floating-point number, INTEGER is automatically multiplied by the number of address units per 32-bit IEEE floating-point number before the actual addition takes place.
+! ( INTEGER DATA -> SFFAR-ADDRESS -- )
Add INTEGER to the address stored at address DATA -> SFFAR-ADDRESS. Since SFFAR-ADDRESS points to a 32-bit IEEE floating-point number, INTEGER is automatically multiplied by the number of address units per 32-bit IEEE floating-point number before the actual addition takes place.
+! ( SIGNED DATA -> FLOAT -- )
Add SIGNED to the floating-point number at address DATA -> FLOAT.
+! ( SIGNED DFDATA -- )
Add SIGNED to the 64-bit IEEE floating-point number at address DFDATA.
+! ( SIGNED SFDATA -- )
Add SIGNED to the 32-bit IEEE floating-point number at address SFDATA.
+! ( SIGNED-DOUBLE DATA -> FLOAT -- )
Add SIGNED-DOUBLE to the floating-point number at address DATA -> FLOAT.
+! ( SIGNED-DOUBLE DFDATA -- )
Add SIGNED-DOUBLE to the 64-bit IEEE floating-point number at address DFDATA.
+! ( SIGNED-DOUBLE SFDATA -- )
Add SIGNED-DOUBLE to the 32-bit IEEE floating-point number at address SFDATA.
+! ( INTEGER DATA -> FLOAT -- )
Add INTEGER to the floating-point number at address DATA -> FLOAT. INTEGER is assumed to be an unsigned number.
+! ( INTEGER DFDATA -- )
Add INTEGER to the 64-bit IEEE floating-point number at address DFDATA. INTEGER is assumed to be an unsigned number.
+! ( INTEGER SFDATA -- )
Add INTEGER to the 32-bit IEEE floating-point number at address SFDATA. INTEGER is assumed to be an unsigned number.
, ( FLOAT -- )
Reserve space for a floating-point number in the current memory space and store FLOAT in it. If the first unused address of the current memory space is aligned prior to execution of ,, it will remain aligned when , finishes execution. An ambiguous condition exists if the first unused address of the current memory space is not aligned prior to execution of ,. An exception is thrown if the current memory space overflows.
- ( ADDRESS -> FLOAT 1ST -- SIGNED )
Subtract 1ST from ADDRESS -> FLOAT, giving the intermediate difference n. Since ADDRESS points to a floating-point number, the result SIGNED is equal to n divided by the number of address units per floating-point number.
- ( ADDRESS -> FLOAT INTEGER -- 1ST )
Subtract INTEGER from ADDRESS -> FLOAT, giving the difference 1ST. Since ADDRESS points to a floating-point number, INTEGER is automatically multiplied by the number of address units per floating-point number before the actual subtraction takes place.
- ( DFADDRESS 1ST -- SIGNED )
Subtract 1ST from DFADDRESS, giving the intermediate difference n. Since DFADDRESS points to a 64-bit IEEE floating-point number, the result SIGNED is equal to n divided by the number of address units per floating-point number.
- ( DFADDRESS INTEGER -- 1ST )
Subtract INTEGER from DFADDRESS, giving the difference 1ST. Since DFADDRESS points to a 64-bit IEEE floating-point number, INTEGER is automatically multiplied by the number of address units per 64-bit IEEE floating-point number before the actual subtraction takes place.
- ( DFFAR-ADDRESS INTEGER -- 1ST )
Subtract INTEGER from DFFAR-ADDRESS, giving the difference 1ST. Since DFFAR-ADDRESS points to a 64-bit IEEE floating-point number, INTEGER is automatically multiplied by the number of address units per 64-bit IEEE floating-point number before the actual subtraction takes place.
- ( FAR-ADDRESS -> FLOAT INTEGER -- 1ST )
Subtract INTEGER from FAR-ADDRESS -> FLOAT, giving the difference 1ST. Since FAR-ADDRESS points to a floating-point number, INTEGER is automatically multiplied by the number of address units per floating-point number before the actual subtraction takes place.
- ( FLOAT FLOAT -- 1ST )
Subtract the second FLOAT from the first FLOAT, giving the difference 1ST. The result has the same data type as the first FLOAT.
- ( FLOAT SIGNED -- 1ST )
Subtract SIGNED from FLOAT, giving the floating-point difference 1ST.
- ( FLOAT SIGNED-DOUBLE -- 1ST )
Subtract SIGNED-DOUBLE from FLOAT, giving the floating-point difference 1ST.
- ( FLOAT INTEGER -- 1ST )
Subtract INTEGER from FLOAT, giving the floating-point difference 1ST. INTEGER is assumed to be an unsigned number.
- ( SFADDRESS 1ST -- SIGNED )
Subtract 1ST from SFADDRESS, giving the intermediate difference n. Since SFADDRESS points to a 32-bit IEEE floating-point number, the result SIGNED is equal to n divided by the number of address units per floating-point number.
- ( SFADDRESS INTEGER -- 1ST )
Subtract INTEGER from SFADDRESS, giving the difference 1ST. Since SFADDRESS points to a 32-bit IEEE floating-point number, INTEGER is automatically multiplied by the number of address units per 32-bit IEEE floating-point number before the actual subtraction takes place.
- ( SFFAR-ADDRESS INTEGER -- 1ST )
Subtract INTEGER from SFFAR-ADDRESS, giving the difference 1ST. Since SFFAR-ADDRESS points to a 32-bit IEEE floating-point number, INTEGER is automatically multiplied by the number of address units per 32-bit IEEE floating-point number before the actual subtraction takes place.
-TRAILINGZEROS ( CDATA -> CHARACTER UNSIGNED -- 1ST 3RD )
If UNSIGNED is greater than zero, 3RD is equal to UNSIGNED less the number of zeros (characters "0") at the end of the character string specified by CDATA -> CHARACTER UNSIGNED. If UNSIGNED is zero or the entire string consists of zeros, 3RD is zero.
. ( FLOAT -- )
Display FLOAT with a trailing space using fixed-point notation:
Fixed-point notation := <significand> <significant> := [-]<digits>.<digits0> <digits> := <digit><digits0> <digits0> := <digit>* <digit> := { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 }
An ambiguous condition exists if the value of the number-conversion radix BASE is not (decimal) ten or if the character string representation exceeds the size of the pictured numeric output string buffer.
.EXPONENT ( SIGNED -- )
Display SIGNED as a floating point exponent in the format Esnnn, where s is the sign (+ or -) and nnn is the absolute value of SIGNED represented as a three-digit decimal value.
.SIGN ( FLAG -- )
If FLAG is TRUE, display a minus sign (-).
.SIGN+ ( FLAG -- )
If FLAG is TRUE, display a minus sign (-). Otherwise, display a plus sign (+).
/ ( FLOAT FLOAT -- 1ST )
Divide the first FLOAT by the second FLOAT, giving the quotient 1ST. The result has the same data type as the dividend. An ambiguous condition exists if the second FLOAT is zero, or if the quotient lies outside of the range of a floating-point number.
/ ( FLOAT SIGNED -- 1ST )
Divide FLOAT by SIGNED, giving the floating-point quotient 1ST. An ambiguous condition exists if SIGNED is zero, or if the quotient lies outside of the range of a floating-point number.
/ ( FLOAT SIGNED-DOUBLE -- 1ST )
Divide FLOAT by SIGNED-DOUBLE, giving the floating-point quotient 1ST. An ambiguous condition exists if SIGNED-DOUBLE is zero, or if the quotient lies outside of the range of a floating-point number.
/ ( FLOAT UNSIGNED -- 1ST )
Divide FLOAT by UNSIGNED, giving the floating-point quotient 1ST. An ambiguous condition exists if UNSIGNED is zero, or if the quotient lies outside of the range of a floating-point number.
/10^N ( FLOAT SIGNED -- 1ST )
1ST is equal to FLOAT divided by 10 raised to the power SIGNED. An ambiguous condition exists if SIGNED is negative.
0< ( FLOAT -- FLAG )
FLAG is true if and only if FLOAT is less than zero.
0<> ( FLOAT -- FLAG )
FLAG is true if and only if FLOAT is not equal to zero.
0= ( FLOAT -- FLAG )
FLAG is true if and only if FLOAT is equal to zero.
0> ( FLOAT -- FLAG )
FLAG is true if and only if FLOAT is greater than zero.
0E0 ( -- FLOAT )
FLOAT is 0.0E0.
1+ ( ADDRESS -> FLOAT -- 1ST )
Add the number of address units per floating-point number to ADDRESS -> FLOAT giving 1ST.
1+ ( DFADDRESS -- 1ST )
Add the number of address units per 64-bit IEEE floating-point number to DFADDRESS giving 1ST.
1+ ( DFFAR-ADDRESS -- 1ST )
Add the number of address units per 64-bit IEEE floating-point number to DFFAR-ADDRESS giving 1ST.
1+ ( FAR-ADDRESS -> FLOAT -- 1ST )
Add the number of address units per floating-point number to FAR-ADDRESS -> FLOAT giving 1ST.
1+ ( SFADDRESS -- 1ST )
Add the number of address units per 32-bit IEEE floating-point number to SFADDRESS giving 1ST.
1+ ( SFFAR-ADDRESS -- 1ST )
Add the number of address units per 32-bit IEEE floating-point number to SFFAR-ADDRESS giving 1ST.
1- ( ADDRESS -> FLOAT -- 1ST )
Subtract the number of address units per floating-point number from ADDRESS -> FLOAT giving 1ST.
1- ( DFADDRESS -- 1ST )
Subtract the number of address units per 64-bit IEEE floating-point number from DFADDRESS giving 1ST.
1- ( DFFAR-ADDRESS -- 1ST )
Subtract the number of address units per 64-bit IEEE floating-point number from DFFAR-ADDRESS giving 1ST.
1- ( FAR-ADDRESS -> FLOAT -- 1ST )
Subtract the number of address units per floating-point number from FAR-ADDRESS -> FLOAT giving 1ST.
1- ( SFADDRESS -- 1ST )
Subtract the number of address units per 32-bit IEEE floating-point number from SFADDRESS giving 1ST.
1- ( SFFAR-ADDRESS -- 1ST )
Subtract the number of address units per 32-bit IEEE floating-point number from SFFAR-ADDRESS giving 1ST.
1E0 ( -- FLOAT )
FLOAT is 1.0E0.
< ( FLOAT 1ST -- FLAG )
FLAG is true if and only if FLOAT is less than 1ST.
<> ( FLOAT 1ST -- FLAG )
FLAG is true if and only if FLOAT is not numerically equal to 1ST.
= ( FLOAT 1ST -- FLAG )
FLAG is true if and only if FLOAT is numerically equal to 1ST.
> ( FLOAT 1ST -- FLAG )
FLAG is true if and only if FLOAT is greater than 1ST.
>CHAR ( CDATA -> CHARACTER UNSIGNED 2ND -- 1ST 3RD FLAG )
If the character located at address CDATA -> CHARACTER is equal to 2ND, adjust the character string at CDATA -> CHARACTER with length UNSIGNED by one character and return TRUE as FLAG. The resulting character string, specified by 1ST 3RD, begins at CDATA -> CHARACTER plus one character and is UNSIGNED minus one characters long. Otherwise, do not adjust the character string and return FALSE as FLAG.
>DIGITS ( FLOAT CDATA -> CHARACTER UNSIGNED -- 1ST 2ND 4 TH SIGNED )
1ST is the result of converting the characters within the string specified by CDATA -> CHARACTER UNSIGNED into digits, and adding each into FLOAT after multiplying FLOAT by (decimal) ten. Conversion continues left-to-right until a character that is not convertible, including any + or -, is encountered or the string is entirely converted. 2ND is the location of the first unconverted character or the first character past the end of the string if the string was entirely converted. 4 TH is the number of unconverted characters in the string. SIGNED is the number of converted characters.
An ambiguous condition exists if the value of the number-conversion radix BASE is not (decimal) ten.
>E-CHAR ( CDATA -> CHARACTER UNSIGNED -- 1ST 3RD FLAG )
If the character located at address CDATA -> CHARACTER is any one of d, D, e or E, adjust the character string at CDATA -> CHARACTER with length UNSIGNED by one character and return TRUE as FLAG. The resulting character string, specified by 1ST 3RD, begins at CDATA -> CHARACTER plus one character and is UNSIGNED minus one characters long. Otherwise, do not adjust the character string and return FALSE as FLAG.
>EXP ( CDATA -> CHARACTER UNSIGNED SIGNED -- 1ST 3RD 4 TH FLAG )
If SIGNED is zero, return zero as 4 TH and FALSE as FLAG.
Otherwise, 4 TH is the number represented by the decimal digits within the string specified by CDATA -> CHARACTER UNSIGNED, multiplied by SIGNED, or zero if the string is empty or its first character is not a decimal digit. Conversion continues left-to-right until encountering a character that is not a decimal digit or the string is entirely converted. 2ND is the location of the first unconverted character or the first character past the end of the string if the string was entirely converted. 3RD is the number of unconverted characters in the string. FLAG is TRUE.
An ambiguous condition exists if the value of the number-conversion radix BASE is not (decimal) ten.
>FLOAT ( CDATA -> CHARACTER UNSIGNED -- FLOAT FLAG )
An attempt is made to convert the string specified by CDATA -> CHARACTER UNSIGNED to internal floating-point representation. If the string represents a valid floating-point number in the syntax below, its value FLOAT and TRUE as FLAG are returned. If the string does not represent a valid floating-point number, FLOAT is undefined and FLAG is FALSE.
A string of blanks is being treated as a special case representing zero.
Convertible string := <significand>[<exponent>] <significand> := [<sign>]{<digits>[.<digits0>] | .<digits>} <sign> := { + | - } <digits> := <digit><digits0> <digits0> := <digit>* <digit> := { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 } <exponent> := <marker><digits0> <marker> := {<e-form> | <sign-form>} <e-form> := <e-char>[<sign-form>] <sign-form> := { + | - } <e-char> := { D | d | E | e }
>FLOAT' ( CDATA -> CHARACTER UNSIGNED -- FLOAT FLAG )
An attempt is made to convert the string specified by CDATA -> CHARACTER UNSIGNED to internal floating-point representation. If the string represents a valid floating-point number in the syntax below, its value FLOAT and TRUE as FLAG are returned. If the string does not represent a valid floating-point number, FLOAT is undefined and FLAG is FALSE.
Convertible string := <significand><exponent> <significand> := [<sign>]<digits>[.<digits0>] <exponent> := E[<sign>]<digits0> <sign> := { + | - } <digits> := <digit><digits0> <digits0> := <digit>* <digit> := { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 }
>MARKER ( CDATA -> CHARACTER UNSIGNED -- 1ST 3RD SIGNED )
If the character string located at address CDATA -> CHARACTER with length UNSIGNED begins with an exponent marker, adjust the character string by the exponent marker and return its sign (+1 or -1) as SIGNED. 1ST 3RD is the adjusted character string. Otherwise, do not adjust the character string and return +0 as SIGNED.
Exponent marker 1 := {<e-form> | <sign-form>} <e-form> := <e-char>[<sign-form>] <sign-form> := { + | - } <e-char> := { D | d | E | e }
>MARKER' ( CDATA -> CHARACTER UNSIGNED -- 1ST 3RD SIGNED )
If the character string located at address CDATA -> CHARACTER with length UNSIGNED begins with an exponent marker, adjust the character string by the exponent marker and return its sign (+1 or -1) as SIGNED. 1ST 3RD is the adjusted character string. Otherwise, do not adjust the character string and return +0 as SIGNED.
Exponent marker 2 := E[<sign>] <sign> := { + | - }
>PERIOD ( CDATA -> CHARACTER UNSIGNED -- 1ST 3RD FLAG )
If the character located at address CDATA -> CHARACTER is a period (.), adjust the character string at CDATA -> CHARACTER with length UNSIGNED by one character and return TRUE as FLAG. The resulting character string, specified by 1ST 3RD, begins at CDATA -> CHARACTER plus one character and is UNSIGNED minus one characters long. Otherwise, do not adjust the character string and return FALSE as FLAG.
>SIGN ( CDATA -> CHARACTER UNSIGNED -- 1ST 3RD SIGNED )
If the character located at address CDATA -> CHARACTER is either + or -, adjust the character string at CDATA -> CHARACTER with length UNSIGNED by one character and return +1 (for +) or -1 (for -) as SIGNED. The resulting character string, specified by 1ST 3RD, begins at CDATA -> CHARACTER plus one character and is UNSIGNED minus one characters long. Otherwise, do not adjust the character string and return +0 as SIGNED.
>SIGNIFICAND ( FLOAT CDATA -> CHARACTER UNSIGNED -- 1ST 2ND 4 TH FLAG )
An attempt is made to convert the beginning of the string specified by CDATA -> CHARACTER UNSIGNED to internal floating-point representation. If the string represents a valid floating-point number in the syntax below, its value FLOAT and TRUE as FLAG are returned. If the string does not represent a valid floating-point number, FLOAT is undefined and FLAG is FALSE.
2ND is the location of the first unconverted character or the first character past the end of the string if the string was entirely converted. 4 TH is the number of unconverted characters in the string.
Convertible string := <significand> <significand> := [<sign>]{<digits>[.<digits0>] | .<digits>} <sign> := { + | - } <digits> := <digit><digits0> <digits0> := <digit>* <digit> := { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 }
>SIGNIFICAND' ( FLOAT CDATA -> CHARACTER UNSIGNED -- 1ST 2ND 4 TH FLAG )
An attempt is made to convert the beginning of the string specified by CDATA -> CHARACTER UNSIGNED to internal floating-point representation. If the string represents a valid floating-point number in the syntax below, its value FLOAT and TRUE as FLAG are returned. If the string does not represent a valid floating-point number, FLOAT is undefined and FLAG is FALSE.
2ND is the location of the first unconverted character or the first character past the end of the string if the string was entirely converted. 4 TH is the number of unconverted characters in the string.
Convertible string := <significand> <significand> := [<sign>]<digits>[.<digits0>] <sign> := { + | - } <digits> := <digit><digits0> <digits0> := <digit>* <digit> := { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 }
?DECIMAL ( -- )
An exception is thrown if the value of the number-conversion radix BASE is not (decimal) ten.
?NEGATE ( FLOAT SIGNED -- 1ST )
If SIGNED is negative, change the sign of FLOAT.
?VALUE ( CDATA -> CHARACTER UNSIGNED -- DEFINITION )
Extend the execution semantics of ?VALUE by considering floating-point values in addition to single-cell values and double-cell values.
DEFINITION is the most recent word with the name specified by the character string CDATA -> CHARACTER UNSIGNED that was defined by VALUE. An exception is thrown if the dictionary does not contain such a word.
?VALUE is a deferred definition.
@ ( CODE -> FLOAT -- 2ND )
2ND is the 64-bit floating-point number stored at address CODE.
@ ( CONST -> FLOAT -- 2ND )
2ND is the 64-bit floating-point number stored at address CONST.
@ ( DATA -> FLOAT -- 2ND )
2ND is the 64-bit floating-point number stored at address DATA.
@ ( DFCODE -> FLOAT -- 2ND )
2ND is the 64-bit IEEE floating-point number stored at address DFCODE.
@ ( DFCONST -> FLOAT -- 2ND )
2ND is the 64-bit IEEE floating-point number stored at address DFCONST.
@ ( DFDATA -> FLOAT -- 2ND )
2ND is the 64-bit IEEE floating-point number stored at address DFDATA.
@ ( DFFAR-ADDRESS -> FLOAT -- 2ND )
2ND is the 64-bit IEEE floating-point number stored at address DFFAR-ADDRESS.
@ ( FAR-ADDRESS -> FLOAT -- 2ND )
2ND is the 64-bit floating-point number stored at address FAR-ADDRESS.
@ ( SFCODE -> FLOAT -- 2ND )
2ND is the 32-bit IEEE floating-point number stored at address SFCODE.
@ ( SFCONST -> FLOAT -- 2ND )
2ND is the 32-bit IEEE floating-point number stored at address SFCONST.
@ ( SFDATA -> FLOAT -- 2ND )
2ND is the 32-bit IEEE floating-point number stored at address SFDATA.
@ ( SFFAR-ADDRESS -> FLOAT -- 2ND )
2ND is the 32-bit IEEE floating-point number stored at address SFFAR-ADDRESS.
ABORT ( -- )
Initialize the hardware floating-point unit. Empty the data stack and perform the function of QUIT, which.includes emptying the return stack without displaying a message.
This is an update of the Core version of ABORT. It is actually hidden by the version from the Exception word set. However, the Core version is used by ERROR.
ABORT is a deferred definition.
ABS ( FLOAT -- 1ST )
1ST is the absolute value of FLOAT.
ACOS ( FLOAT -- 1ST )
1ST is the principal radian angle whose cosine is FLOAT. An ambiguous condition exists if the absolute value of FLOAT is greater than one.
ACOSH ( FLOAT -- 1ST )
1ST is the floating-point value whose hyperbolic cosine is FLOAT. An ambiguous condition exists if FLOAT is less than one.
ALOG ( FLOAT -- 1ST )
Raise ten to the power FLOAT, giving 1ST.
ASIN ( FLOAT -- 1ST )
1ST is the principal radian angle whose sine is FLOAT. An ambiguous condition exists if the absolute value of FLOAT is greater than one.
ASINH ( FLOAT -- 1ST )
1ST is the floating-point value whose hyperbolic sine is FLOAT. An ambiguous condition exists if FLOAT is less than zero.
ATAN ( FLOAT -- 1ST )
1ST is the principal radian angle whose tangent is FLOAT.
ATAN2 ( FLOAT FLOAT -- 1ST )
1ST is the radian angle whose tangent is the first FLOAT divided by the second FLOAT. An ambiguous condition exists if both parameters FLOAT are zero.
ATANH ( FLOAT -- 1ST )
1ST is the floating-point value whose hyperbolic tangent is FLOAT. An ambiguous condition exists if FLOAT is outside the range of -1E0 to 1E0.
CAST ( "<spaces>name" x -- y )
Skip leading space delimiters. Parse name delimited by a space. Convert x to y, where x is any data type and y is the data type identified by name. If x and y have the same ancestor, the actual binary image is not changed. If x and y have different ancestors, CAST uses either one of the following conversion words to adjust the size of y:
S>D S>F D>S D>F F>S F>D
An exception is thrown if name is not the name of a data type.
CAST is an immediate word.
CATCH ( -- )
Interpretation: ( TOKEN -- SIGNED )
An exception is thrown if TOKEN is not a qualified token.
Push an exception frame onto the return stack and then execute the
execution token TOKEN in such a way that control can be
transferred to a point just after CATCH if THROW is
executed during the execution of TOKEN. Adjust the interpreter
data type heap according to the stack diagram associated
with TOKEN.
If the execution of TOKEN completes normally (i.e., the exception frame pushed by CATCH is not popped by an execution of THROW) pop the exception frame and return zero as SIGNED on top of the data stack, above whatever stack items would have been returned by executing TOKEN. Otherwise, the remainder of the execution semantics are given by THROW.
Compilation:
An exception is thrown if the top of the compiler data type heap
does not contain a qualified token. Adjust the compiler data type heap
according to the stack diagram associated with the qualified token. Append
the runtime semantics given below to the current definition.
Runtime: ( TOKEN -- SIGNED )
Push an exception frame onto the return stack and then execute the
execution token TOKEN in such a way that control can be
transferred to a point just after CATCH if THROW is
executed during the execution of TOKEN.
If the execution of TOKEN completes normally (i.e., the exception frame pushed by CATCH is not popped by an execution of THROW) pop the exception frame and return zero as SIGNED on top of the data stack, above whatever stack items would have been returned by executing TOKEN. Otherwise, the remainder of the execution semantics are given by THROW.
CATCH is an immediate word.
CONST, ( FLOAT -- )
Reserve memory for one floating-point number in the constant data space and store FLOAT in the cells. If the first unused address of the constant data space is aligned prior to execution of CONST,, it will remain aligned when CONST, finishes execution. An exception is thrown if the constant data space overflows.
CONSTANT ( FLOAT "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below.
name is referred to as a constant.
Execution: ( -- FLOAT )
Place FLOAT on the stack. FLOAT has the same
data type as was supplied to CONSTANT.
COS ( FLOAT -- 1ST )
1ST is the cosine of the radian angle FLOAT.
COSH ( FLOAT -- 1ST )
1ST is the hyperbolic cosine of FLOAT.
D>F ( DOUBLE -- FLOAT )
FLOAT is the numeric equivalent of DOUBLE, where DOUBLE is assumed to be an unsigned double-precision number. An ambiguous condition exists if DOUBLE is not a number.
D>F ( SIGNED-DOUBLE -- FLOAT )
FLOAT is the numeric equivalent of SIGNED-DOUBLE.
DEPTH-FP ( -- UNSIGNED )
UNSIGNED is the depth of the separate hardware floating-point stack, calculated from the contents of the data type heap. In interpretation state, the interpreter data type heap is used. In compilation state, the compiler data type heap is used.
Note: Only floating-point numbers are counted.
DEPTH-SP ( -- UNSIGNED )
UNSIGNED is the depth of the data stack in cells, calculated from the contents of the data type heap. In interpretation state, the interpreter data type heap is used. In compilation state, the compiler data type heap is used.
Note: In interpretation state, UNSIGNED includes the output parameters of the word that is currently being interpreted. UNSIGNED equals the actual number of cells on the data stack only if the data stack and the interpreter data type heap are aligned.
Note: In compilation state, UNSIGNED is zero if the compiler data type heap is locked.
Note: Floating-point numbers are not counted, because they are kept on a separate hardware floating-point stack.
DFADDRESS ( STACK-DIAGRAM -- 1ST )
When used in a stack diagram, specifies an input or output parameter with data type DFADDRESS.
DFALIGN ( -- )
If the first unused address of the current memory space is not aligned for 64-bit IEEE floating-point numbers, reserve the required number of address units to make it aligned.
DFALIGNED ( ADDRESS -- 1ST )
1ST is the lowest address aligned for 64-bit IEEE floating-point numbers greater than or equal to ADDRESS.
DFALIGNED ( FAR-ADDRESS -- 1ST )
1ST is the lowest address aligned for 64-bit IEEE floating-point numbers greater than or equal to FAR-ADDRESS.
DFCODE ( STACK-DIAGRAM -- 1ST )
When used in a stack diagram, specifies an input or output parameter with data type DFCODE.
DFCONST ( STACK-DIAGRAM -- 1ST )
When used in a stack diagram, specifies an input or output parameter with data type DFCONST.
DFDATA ( STACK-DIAGRAM -- 1ST )
When used in a stack diagram, specifies an input or output parameter with data type DFDATA.
DFFAR-ADDRESS ( STACK-DIAGRAM -- 1ST )
When used in a stack diagram, specifies an input or output parameter with data type DFFAR-ADDRESS.
DFLOATS ( INTEGER -- 1ST )
1ST is the size in address units of INTEGER 64-bit IEEE floating-point numbers.
DROP ( FLOAT -- )
Remove FLOAT from the stack.
DUP ( FLOAT -- 1ST 1ST )
Duplicate FLOAT.
E. ( FLOAT -- )
Display FLOAT with a trailing space using engineering notation, where the significand is greater than or equal to 1.0 and less than 1000.0, and the decimal exponent is a multiple of three:
Engineering notation := <significand><exponent> <significand> := [-]<digits>.<digits> <exponent> := E<sign><digit><digit><digit> <sign> := { + | - } <digits> := <digit><digits0> <digits0> := <digit>* <digit> := { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 }
An ambiguous condition exists if the value of the number-conversion radix BASE is not (decimal) ten or if the character string representation exceeds the size of the pictured numeric output string buffer.
ERASE ( DATA -> FLOAT UNSIGNED -- )
If UNSIGNED is not equal to zero, store zero (0E0) in each of UNSIGNED consecutive memory locations for floating-point numbers beginning at DATA -> FLOAT. An ambiguous condition exists if DATA -> FLOAT is not aligned for floating-point numbers.
ERASE ( DFDATA UNSIGNED -- )
If UNSIGNED is not equal to zero, store zero (0E0) in each of UNSIGNED consecutive memory locations for 64-bit IEEE floating-point numbers beginning at DFDATA. An ambiguous condition exists if DFDATA is not aligned for 64-bit IEEE floating-point numbers.
ERASE ( SFDATA UNSIGNED -- )
If UNSIGNED is not equal to zero, store zero (0E0) in each of UNSIGNED consecutive memory locations for 32-bit IEEE floating-point numbers beginning at SFDATA. An ambiguous condition exists if SFDATA is not aligned for 32-bit IEEE floating-point numbers.
EXP ( FLOAT -- 1ST )
Raise e to the power FLOAT, giving 1ST.
EXPM1 ( FLOAT -- 1ST )
Raise e to the power FLOAT and subtract one, giving 1ST.
F! ( FLOAT CONST -> 1ST -- )
Store FLOAT at address CONST as 80-bit floating-point number.
F, ( FLOAT -- )
Reserve memory for one 80-bit floating-point number in the constant data space and store FLOAT in it. If the first unused address of the constant data space is aligned prior to execution of F,, it will remain aligned when F, finishes execution. An exception is thrown if the constant data space overflows.
F@ ( CONST -> FLOAT -- 2ND )
2ND is the 80-bit floating-point number stored at address CONST.
F>D ( FLOAT -- SIGNED-DOUBLE )
Convert FLOAT to the signed double-precision number SIGNED-DOUBLE with the same numerical value. An ambiguous condition exists if FLOAT lies outside the range of a signed double-precision number.
F>S ( FLOAT -- SIGNED )
Convert FLOAT to the signed single-precision number SIGNED with the same numerical value. An ambiguous condition exists if FLOAT lies outside the range of a signed single-precision number.
FALIGN ( -- )
If the first unused address of the current memory space is not aligned for floating-point numbers, reserve the required number of address units to make it aligned.
FALIGNED ( ADDRESS -- 1ST )
1ST is the lowest address aligned for floating-point numbers greater than or equal to ADDRESS.
FALIGNED ( FAR-ADDRESS -- 1ST )
1ST is the lowest address aligned for floating-point numbers greater than or equal to FAR-ADDRESS.
FILL ( DATA -> FLOAT UNSIGNED 2ND -- )
If UNSIGNED is not equal to zero, store 2ND in each of UNSIGNED consecutive memory locations for floating-point numbers beginning at DATA -> FLOAT. An ambiguous condition exists if DATA -> FLOAT is not aligned for floating-point numbers.
FILL ( DFDATA -> FLOAT UNSIGNED 2ND -- )
If UNSIGNED is not equal to zero, store 2ND in each of UNSIGNED consecutive memory locations for 64-bit IEEE floating-point numbers beginning at DFDATA -> FLOAT. An ambiguous condition exists if DFDATA -> FLOAT is not aligned for 64-bit IEEE floating-point numbers.
FILL ( SFDATA -> FLOAT UNSIGNED 2ND -- )
If UNSIGNED is not equal to zero, store 2ND in each of UNSIGNED consecutive memory locations for 32-bit IEEE floating-point numbers beginning at SFDATA -> FLOAT. An ambiguous condition exists if SFDATA -> FLOAT is not aligned for 32-bit IEEE floating-point numbers.
FINIT ( -- )
Initialize the hardware floating-point unit and empty the hardware floating-point stack.
FLIT ( -- FLOAT )
FLOAT is a constant 80-bit floating-point literal.
FLIT is an internal definition compiled by LITERAL,.
FLOAT ( STACK-DIAGRAM -- 1ST )
When used in a stack diagram, specifies an input or output parameter with data type FLOAT.
FLOAT? ( DATA-TYPE -- FLAG )
FLAG is TRUE if and only if the ancestor of DATA-TYPE if FLOAT.
FLOATS ( INTEGER -- 1ST )
1ST is the size in address units of INTEGER floating-point numbers.
FLOOR ( FLOAT -- 1ST )
Round FLOAT to an integral value using the round toward negative infinity rule, giving 1ST.
FP! ( UNSIGNED -- )
Make UNSIGNED the current index of the hardware floating-point stack.
FP@ ( -- UNSIGNED )
UNSIGNED is the index of the hardware floating-point stack.
FXAM ( -- LOGICAL )
LOGICAL is the contents of the floating-point processor's status word register, after examining the number on top of the hardware floating-point stack. Bits 14, 10, 9 and 8 of LOGICAL are set depending on the number on top of the hardware floating-point stack:
Status | Bit 14 | Bit 10 | Bit 9 | Bit 8 |
---|---|---|---|---|
Unsupported | 0 | 0 | s | 0 |
NaN (Not a Number) | 0 | 0 | s | 1 |
Valid | 0 | 1 | s | 0 |
Infinity | 0 | 1 | s | 1 |
Zero | 1 | 0 | s | 0 |
Free | 1 | x | x | 1 |
Denormalized | 1 | 1 | s | 0 |
x is undefined. s is 0 if the number on top of the hardware floating-point stack is positive, and 1 if it is negative.
LITERAL ( FLOAT -- )
Interpretation:
An exception is thrown if LITERAL is interpreted.
Compilation:
Append the runtime semantics given below to the current definition.
Runtime: ( -- FLOAT )
Place FLOAT on the stack. FLOAT has the
same data type as was supplied at compilation time.
LITERAL is an immediate word.
LITERAL, ( FLOAT -- )
Append the runtime semantics given below to the current definition.
Runtime: ( -- FLOAT )
Place FLOAT on the stack.
Note: LITERAL, does not change the compiler data type heap.
LN ( FLOAT -- 1ST )
1ST is the natural logarithm of FLOAT. An ambiguous condition exists if FLOAT is less than or equal to zero.
LNP1 ( FLOAT -- 1ST )
1ST is the natural logarithm of the quantity FLOAT plus one. An ambiguous condition exists if FLOAT is less than or equal to negative one.
LOCAL, ( DATA -> DATA-TYPE SIGNED -- )
Interpretation:
An exception is thrown if LOCAL, is interpreted.
Compilation:
Append the runtime semantics given below to the current definition.
Runtime: ( -- x )
Get x from the return stack and push it onto the data stack.
The return stack remains unchanged.
During compilation, DATA -> DATA-TYPE is the address of
the data type of x, while SIGNED is the offset
to the return stack pointer. An exception is thrown if SIGNED
is an invalid offset or if the size of the data type is not equal to
1, 2 or 4 cells.
LOCAL, actually compiles (R@), (DR@) or (FR@).
Note: x can be SINGLE, DOUBLE or FLOAT.
LOG ( FLOAT -- 1ST )
1ST is the base-ten logarithm of FLOAT. An ambiguous condition exists if FLOAT is less than or equal to zero.
MAX ( FLOAT 1ST -- 1ST )
1ST is the maximum of FLOAT and 1ST.
MIN ( FLOAT 1ST -- 1ST )
1ST is the minimum of FLOAT and 1ST.
MOVE ( CONST -> FLOAT DATA -> 2ND UNSIGNED -- )
If UNSIGNED is not equal to zero, copy UNSIGNED consecutive floating-point numbers starting at address CONST -> FLOAT to address DATA -> 2ND. After MOVE completes, the UNSIGNED consecutive floating-point numbers starting at address DATA -> 2ND contain exactly what the UNSIGNED consecutive floating-point numbers starting at address CONST -> SINGLE contained before the move.
MOVE ( DATA -> FLOAT DATA -> 2ND UNSIGNED -- )
If UNSIGNED is not equal to zero, copy UNSIGNED consecutive floating-point numbers starting at address DATA -> FLOAT to address DATA -> 2ND. After MOVE completes, the UNSIGNED consecutive floating-point numbers starting at address DATA -> 2ND contain exactly what the UNSIGNED consecutive floating-point numbers starting at address DATA -> SINGLE contained before the move.
MOVE ( DFCONST -> FLOAT DFDATA -> 2ND UNSIGNED -- )
If UNSIGNED is not equal to zero, copy UNSIGNED consecutive 64-bit IEEE floating-point numbers starting at address DFCONST -> FLOAT to address DFDATA -> 2ND. After MOVE completes, the UNSIGNED consecutive 64-bit IEEE floating-point numbers starting at address DFDATA -> 2ND contain exactly what the UNSIGNED consecutive 64-bit IEEE floating-point numbers starting at address DFCONST -> SINGLE contained before the move.
MOVE ( DFDATA -> FLOAT DFDATA -> 2ND UNSIGNED -- )
If UNSIGNED is not equal to zero, copy UNSIGNED consecutive 64-bit IEEE floating-point numbers starting at address DFDATA -> FLOAT to address DFDATA -> 2ND. After MOVE completes, the UNSIGNED consecutive 64-bit IEEE floating-point numbers starting at address DFDATA -> 2ND contain exactly what the UNSIGNED consecutive 64-bit IEEE floating-point numbers starting at address DFDATA -> SINGLE contained before the move.
MOVE ( SFCONST -> FLOAT SFDATA -> 2ND UNSIGNED -- )
If UNSIGNED is not equal to zero, copy UNSIGNED consecutive 32-bit IEEE floating-point numbers starting at address SFCONST -> FLOAT to address SFDATA -> 2ND. After MOVE completes, the UNSIGNED consecutive 32-bit IEEE floating-point numbers starting at address SFDATA -> 2ND contain exactly what the UNSIGNED consecutive 32-bit IEEE floating-point numbers starting at address SFCONST -> SINGLE contained before the move.
MOVE ( SFDATA -> FLOAT SFDATA -> 2ND UNSIGNED -- )
If UNSIGNED is not equal to zero, copy UNSIGNED consecutive 32-bit IEEE floating-point numbers starting at address SFDATA -> FLOAT to address SFDATA -> 2ND. After MOVE completes, the UNSIGNED consecutive 32-bit IEEE floating-point numbers starting at address SFDATA -> 2ND contain exactly what the UNSIGNED consecutive 32-bit IEEE floating-point numbers starting at address SFDATA -> SINGLE contained before the move.
NEGATE ( FLOAT -- 1ST )
Negate FLOAT, giving its arithmetic inverse 1ST.
NIP ( DOUBLE FLOAT -- 2ND )
Remove the first item below the top of the stack.
NIP ( FLOAT DOUBLE -- 2ND )
Remove the first item below the top of the stack.
NIP ( FLOAT FLOAT -- 2ND )
Remove the first item below the top of the stack.
NIP ( FLOAT SINGLE -- 2ND )
Remove the first item below the top of the stack.
NIP ( SINGLE FLOAT -- 2ND )
Remove the first item below the top of the stack.
NOT-DECIMAL? ( -- FLAG )
FLAG is TRUE if and only if the value of the number-conversion radix BASE is not (decimal) ten.
NULL ( "<spaces>name" -- y )
Skip leading space delimiters. Parse name delimited by a space. Return y, which has the numerical value zero and the data type identified by name. An exception is thrown if name is not the name of a data type. y can be a single-cell item, a double-cell item, or a floating-point number.
NULL is an immediate word.
OVER ( DOUBLE FLOAT -- 1ST 2ND 1ST )
Place a copy of the DOUBLE on top of the stack.
OVER ( FLOAT DOUBLE -- 1ST 2ND 1ST )
Place a copy of FLOAT on top of the stack.
OVER ( FLOAT FLOAT -- 1ST 2ND 1ST )
Place a copy of the first FLOAT on top of the stack.
OVER ( FLOAT SINGLE -- 1ST 2ND 1ST )
Place a copy of FLOAT on top of the stack.
OVER ( SINGLE FLOAT -- 1ST 2ND 1ST )
Place a copy of SINGLE on top of the stack.
PERIOD ( -- )
Display a period (.).
PI ( -- FLOAT )
FLOAT is π (3.14159265358979323846)
PRECISION ( -- UNSIGNED )
UNSIGNED is the number of significant digits currently used by ., E., or S..
R> ( R-SIZE -- )
Interpretation:
An exception is thrown if R> is interpreted.
Compilation:
Append the runtime semantics given below to the current definition.
Consume R-SIZE, the size of the local R@ in cells,
and remove the local R@ from the local dictionary. An
exception is thrown if R@ does not exist or if R-SIZE
is not equal to 1, 2 or 4.
Runtime: ( -- x )
x is the value of the local R@.
R> is an immediate word.
REP-INVALID ( CDATA -> CHARACTER UNSIGNED UNSIGNED -- )
Depending on the value of the second UNSIGNED, place a character string at CDATA -> CHARACTER:
Second UNSIGNED | Character String |
---|---|
0000 (hex) | UNSUPPORTED |
0100 (hex) | NAN |
0500 (hex) | INFINITY |
4400 (hex) | DENORMALIZED |
otherwise | FREE |
The character string is shortened to the number of characters corresponding to the first UNSIGNED, or extended by trailing spaces.
REPRESENT ( FLOAT CDATA -> CHARACTER UNSIGNED -- SIGNED FLAG FLAG )
At CDATA -> CHARACTER, place the character-string external representation of the significand of the floating-point number FLOAT. Return the decimal-base exponent as SIGNED, the sign as as the first FLAG and valid result as the second FLAG. The character string consists of the UNSIGNED most significant digits of the significand represented as a decimal fraction with the implied decimal point to the left of the first digit, and the first digit zero only if all digits are zero. The significand is rounded to UNSIGNED digits following the round to nearest rule; SIGNED is adjusted, if necessary, to correspond to the rounded magnitude of the significand. If the second FLAG is TRUE then FLOAT was a valid floating-point number. If the first FLAG is TRUE then FLOAT is negative.
An exception is thrown if the value of BASE is not (decimal) ten.
When the second FLAG is FALSE, SIGNED is always zero, and the string at CDATA -> CHARACTER contains one of the following, cut off to UNSIGNED characters or extended by trailing spaces:
UNSUPPORTED NAN INFINITY DENORMALIZED FREE
REP-VALID ( CDATA -> CHARACTER UNSIGNED FLOAT -- SIGNED )
At CDATA -> CHARACTER, place the character-string external representation of the significand of the absolute value of the floating-point number FLOAT. Return the decimal-base exponent as SIGNED. The character string consists of the UNSIGNED most significant digits of the significand represented as a decimal fraction with the implied decimal point to the left of the first digit, and the first digit zero only if all digits are zero. The significand is rounded to UNSIGNED digits following the round to nearest rule; SIGNED is adjusted, if necessary, to correspond to the rounded magnitude of the significand.
An ambiguous condition exists if FLOAT is not a valid floating-point number, or if the value of BASE is not decimal ten.
ROT ( DOUBLE DOUBLE FLOAT -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( DOUBLE FLOAT DOUBLE -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( DOUBLE FLOAT FLOAT -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( DOUBLE FLOAT SINGLE -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( DOUBLE SINGLE FLOAT -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( FLOAT DOUBLE DOUBLE -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( FLOAT DOUBLE FLOAT -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( FLOAT DOUBLE SINGLE -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( FLOAT FLOAT DOUBLE -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( FLOAT FLOAT FLOAT -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( FLOAT FLOAT SINGLE -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( FLOAT SINGLE DOUBLE -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( FLOAT SINGLE FLOAT -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( FLOAT SINGLE SINGLE -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( SINGLE DOUBLE FLOAT -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( SINGLE FLOAT DOUBLE -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( SINGLE FLOAT FLOAT -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( SINGLE FLOAT SINGLE -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROT ( SINGLE SINGLE FLOAT -- 2ND 3RD 1ST )
Rotate the top three stack items.
ROUND ( FLOAT -- 1ST )
Round FLOAT to an integral value using the round to nearest rule, giving 1ST.
S. ( FLOAT -- )
Display FLOAT with a trailing space using scientific notation:
Scientific notation := <significand><exponent> <significand> := [-]<digit>.<digits> <exponent> := E<sign><digit><digit><digit> <sign> := { + | - } <digits> := <digit><digits0> <digits0> := <digit>* <digit> := { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 }
An ambiguous condition exists if the value of the number-conversion radix BASE is not (decimal) ten or if the character string representation exceeds the size of the pictured numeric output string buffer.
S>F ( SIGNED -- FLOAT )
FLOAT is the numeric equivalent of SIGNED.
S>F ( SINGLE -- FLOAT )
FLOAT is the numeric equivalent of SINGLE, where SINGLE is assumed to be an unsigned single-precision number. An ambiguous condition exists if SINGLE is not a number.
SET-PRECISION ( UNSIGNED -- )
Set the number of significant digits currently used by ., E., or S. to the minimum of 18 and UNSIGNED.
SFADDRESS ( STACK-DIAGRAM -- 1ST )
When used in a stack diagram, specifies an input or output parameter with data type SFADDRESS.
SFALIGN ( -- )
If the first unused address of the current memory space is not aligned for 32-bit IEEE floating-point numbers, reserve the required number of address units to make it aligned.
SFALIGNED ( ADDRESS -- 1ST )
1ST is the lowest address aligned for 32-bit IEEE floating-point numbers greater than or equal to ADDRESS.
SFALIGNED ( FAR-ADDRESS -- 1ST )
1ST is the lowest address aligned for 32-bit IEEE floating-point numbers greater than or equal to FAR-ADDRESS.
SFCODE ( STACK-DIAGRAM -- 1ST )
When used in a stack diagram, specifies an input or output parameter with data type SFCODE.
SFCONST ( STACK-DIAGRAM -- 1ST )
When used in a stack diagram, specifies an input or output parameter with data type SFCONST.
SFDATA ( STACK-DIAGRAM -- 1ST )
When used in a stack diagram, specifies an input or output parameter with data type SFDATA.
SFFAR-ADDRESS ( STACK-DIAGRAM -- 1ST )
When used in a stack diagram, specifies an input or output parameter with data type SFFAR-ADDRESS.
SFLOATS ( INTEGER -- 1ST )
1ST is the size in address units of INTEGER 32-bit IEEE floating-point numbers.
SIN ( FLOAT -- 1ST )
1ST is the sine of the radian angle FLOAT.
SINCOS ( FLOAT -- 1ST 1ST )
The first 1ST is the sine of the radian angle FLOAT. The second 1ST is the cosine of the radian angle FLOAT.
SINH ( FLOAT -- 1ST )
1ST is the hyperbolic sine of FLOAT.
SQRT ( FLOAT -- 1ST )
1ST is the square root of FLOAT. An ambiguous condition exists if FLOAT is less than zero.
SWAP ( DOUBLE FLOAT -- 2ND 1ST )
Exchange the two items on top of the stack.
SWAP ( FLOAT DOUBLE -- 2ND 1ST )
Exchange the two items on top of the stack.
SWAP ( FLOAT FLOAT -- 2ND 1ST )
Exchange the two items on top of the stack.
SWAP ( FLOAT SINGLE -- 2ND 1ST )
Exchange the two items on top of the stack.
SWAP ( SINGLE FLOAT -- 2ND 1ST )
Exchange the two items on top of the stack.
TAN ( FLOAT -- 1ST )
1ST is the tangent of the radian angle FLOAT. An ambiguous condition exists if cos(FLOAT) is zero.
TANH ( FLOAT -- 1ST )
1ST is the hyperbolic tangent of FLOAT
THROW ( SIGNED -- )
If SIGNED is non-zero, pop the latest exception frame along with everything on the return stack above that frame. Then restore the input source specification in use before the CATCH that pushed that exception frame. Adjust the depth of the data stack and the hardware floating-point stack so that they are the same as if the corresponding CATCH were executed normally, i. e., without THROW. Put SIGNED on top of the data stack, and transfer control to a point just after the corresponding CATCH.
If no exception frame is present, execute ERROR with SIGNED on top of the data stack.
Other than in ANS Forth, the depth of the data stack and of the hardware floating-point stack immediately after CATCH do not depend on whether THROW was executed or not. The data stack pointer and the hardware floating-point stack pointer always have the value they would have if the execution token provided to CATCH were executed normally.
THROW is a deferred definition.
TUCK ( DOUBLE FLOAT -- 2ND 1ST 2ND )
Copy the first (top) stack item below the second stack item.
TUCK ( FLOAT DOUBLE -- 2ND 1ST 2ND )
Copy the first (top) stack item below the second stack item.
TUCK ( FLOAT FLOAT -- 2ND 1ST 2ND )
Copy the first (top) stack item below the second stack item.
TUCK ( FLOAT SINGLE -- 2ND 1ST 2ND )
Copy the first (top) stack item below the second stack item.
TUCK ( SINGLE FLOAT -- 2ND 1ST 2ND )
Copy the first (top) stack item below the second stack item.
VALUE ( FLOAT -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below. Reserve memory for one floating-point number in the data space at an aligned address and store FLOAT at the address.
name is referred to as a value.
Execution: ( -- FLOAT )FLOAT has the same data type as was supplied to VALUE.
VARIABLE ( FLOAT -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below. Reserve two cells of data space at an aligned address and store FLOAT at the address.
name is referred to as a variable.
Execution: ( -- DATA -> FLOAT )ZERO ( -- )
Display a zero character (0).
ZEROS ( INTEGER -- )
If INTEGER is greater than zero, display INTEGER zero characters (0).
Note: INTEGER is assumed to be a signed number.
~ ( FLOAT FLOAT FLOAT -- FLAG )
If the third FLOAT is positive, FLAG is TRUE if the absolute value of (first FLOAT minus second FLOAT) is less than the third FLOAT.
If the third FLOAT is zero, FLAG is TRUE if the first FLOAT and the second FLOAT are exactly identical.
If the third FLOAT is negative, FLAG is TRUE if the absolute value of (first FLOAT minus second FLOAT) is less than the absolute value of the third FLOAT times the sum of the absolute values of the first FLOAT and the second FLOAT.
Dr. Stephan Becher - December 29th, 2007