|
|
|
參閱(See):
A.12 選用的浮點詞集(The optional Floating-Point word set)
The following notation is used to define the syntax of the external representation of floating-point numbers:
Floating-point stack notation when the floating-point stack is separate from the data stack is:
( F: 之前 -- 之後)
( F: before -- after )
Append table 12.1 to table 3.1.
表格 12.1 - 資料型別
符號 資料型別 在堆疊上的大小 ------ --------- ------------- r 浮點數 實作自訂 f-addr 浮點對齊位址 1 cell sf-addr 單浮點對齊位址 1 cell df-addr 雙浮點對齊位址 1 cell
Table 12.1 - Data Types
Symbol Data type Size on stack ------ --------- ------------- r floating-point number implementation-defined f-addr float-aligned address 1 cell sf-addr single-float-aligned address 1 cell df-addr double-float-aligned address 1 cell
The set of float-aligned addresses is an implementation-defined subset of the set of aligned addresses. Adding the size of a floating-point number to a float-aligned address shall produce a float-aligned address.
雙浮點對齊位址的集合是實作自訂的對齊位址的子集. 增加一個 64 位元 IEEE 雙精確浮點運算數目的大小到一個雙浮點對齊位址必須產生一個雙浮點對齊位址.
The set of double-float-aligned addresses is an implementation-defined subset of the set of aligned addresses. Adding the size of a 64-bit IEEE double-precision floating-point number to a double-float-aligned address shall produce a double-float-aligned address.
單浮點對齊位址的集合是實作自訂的對齊位址的子集. 增加一個 32 位元 IEEE 單精確浮點運算數目的大小到一個單浮點對齊位址必須產生一個單浮點對齊位址.
The set of single-float-aligned addresses is an implementation-defined subset of the set of aligned addresses. Adding the size of a 32-bit IEEE single-precision floating-point number to a single-float-aligned address shall produce a single-float-aligned address.
The internal representation of a floating-point number, including the format and precision of the significand and the format and range of the exponent, is implementation defined.
任何四捨五入或浮點數的捨去是實作自訂的.
Any rounding or truncation of floating-point numbers is implementation defined.
Round to nearest means round the result of a floating-point operation to the representable value nearest the result. If the two nearest representable values are equally near the result, the one having zero as its least significant bit shall be delivered.
四捨五入到負無限意思是調整浮點運算的結果成最接近結果並且不大於結果的最接近值.
Round toward negative infinity means round the result of a floating-point operation to the representable value nearest to and no greater than the result.
A last in, first out list that shall be used by all floating-point operators.
浮點堆疊的寬度是實作自訂的. 預設的浮點堆疊必須從資料堆疊和返回堆疊中分開. 一個程式可以決定是否浮點運算數目被保留於資料堆疊, 利用傳送字串 FLOATING-STACK 給 ENVIRONMENT?.
The width of the floating-point stack is implementation-defined. By default the floating-point stack shall be separate from the data and return stacks. A program may determine whether floating-point numbers are kept on the data stack by passing the string FLOATING-STACK to ENVIRONMENT?.
浮點堆疊的大小必須至少六個元素.
The size of a floating-point stack shall be at least 6 items.
一個依靠浮點堆疊大於六個元素的程式有一個環境相依性.
A program that depends on the floating-point stack being larger than six items has an environmental dependency.
Append table 12.2 to table 3.5.
參閱(See):
3.2.6 環境的詢問(Environmental queries)
表格 12.2 - 環境詢問字串
字串 值 資料型別 常數? 意義
------ --------------- --------- -------
FLOATING flag no 浮點詞集存在
FLOATING-EXT flag no 浮點延伸詞集存在
FLOATING-STACK n yes 如果 n 是零, 浮點數目是保留在資料堆疊;
否則 n 是最大的分開的浮點堆疊的層數.
MAX-FLOAT r yes 最大的可用浮點數目
Table 12.2 - Environmental query strings
String Value data type Constant? Meaning
------ --------------- --------- -------
FLOATING flag no floating-point word set present
FLOATING-EXT flag no floating-point extensions word set present
FLOATING-STACK n yes If n = zero, floating-point numbers are
kept on the data stack; otherwise n is
the maximum depth of the separate
floating-point stack.
MAX-FLOAT r yes largest usable floating-point number
Since the address returned by a CREATEd word is not necessarily aligned for any particular class of floating-point data, a program shall align the address (to be float aligned, single-float aligned, or double-float aligned) before accessing floating-point data at the address.
參閱(See):
3.3.3.1 位址對齊(Address alignment),
A.12.3.5 位址對齊(Address alignment),
12.3.1.1 位址(Addresses).
A program may address memory in data space regions made available by FVARIABLE. These regions may be non-contiguous with regions subsequently allocated with , (comma) or ALLOT.
參閱(See):
3.3.3.3 變數(Variables)
If the Floating-Point word set is present in the dictionary and the current base is DECIMAL, the input number-conversion algorithm shall be extended to recognize floating-point numbers in this form:
可轉換的字串 := <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 }
有一些以程式原始碼型式表示的正確的浮點數字的例子:
1E 1.E 1.E0 +1.23E-1 -1.23E+1
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 }
These are examples of valid representations of floating-point numbers in program source:
1E 1.E 1.E0 +1.23E-1 -1.23E+1
參閱(See):
3.4.1.3 文字解譯器輸入數字轉換(Text interpreter input number
conversion),
A.12.3.7 文字解譯器輸入數字轉換(Text interpreter input number conversion),
12.6.1.0558 >FLOAT
The phrase Providing the Floating-Point word set shall be appended to the label of any Standard System that provides all of the Floating-Point word set.
措辭 從浮點延伸詞集提供 name(s) 必須被加到任何提供部分浮點延伸詞集的標準系統的描述之中.
The phrase Providing name(s) from the Floating-Point Extensions word set shall be appended to the label of any Standard System that provides portions of the Floating-Point Extensions word set.
措辭 提供浮點延伸詞集 必須被加到任何提供所有浮點詞集和浮點延伸詞集的標準系統的描述之中.
The phrase Providing the Floating-Point Extensions word set shall be appended to the label of any Standard System that provides all of the Floating-Point and Floating-Point Extensions word sets.
The phrase Requiring the Floating-Point word set shall be appended to the label of Standard Programs that require the system to provide the Floating-Point word set.
措辭 需要浮點延伸詞集中的 name(s) 必須被加到任何需要系統提供部分浮點延伸詞集的標準程式的描述之中.
The phrase Requiring name(s) from the Floating-Point Extensions word set shall be appended to the label of Standard Programs that require the system to provide portions of the Floating-Point Extensions word set.
措辭 需要浮點延伸詞集 必須被加到任何需要系統提供所有浮點和浮點延伸詞集的標準程式的描述之中.
The phrase Requiring the Floating-Point Extensions word set shall be appended to the label of Standard Programs that require the system to provide all of the Floating-Point and Floating-Point Extensions word sets.
12.6.1.0558 >FLOAT
( c-addr u -- true | false ) ( F: -- r | ) or ( c-addr u -- r true | false)
一個轉換由 c-addr 和 u 指定的字串到內部浮點表示法的嘗試. 如果這個字串用下列的語法展現了一個正確的浮點數字, 它的值 r 和 true 將會被傳回. 如果這個字串並未展現了一個正確的浮點數目, 只有假會被傳回.
一個空白的字串必須被當作是一個特別的情況, 展現了零.
一個可轉換字串的語法是 := <significand>[<exponent>]
<significand> := [<sign>]{<digits>[.<digits0>] |
.<digits> }
<exponent> := <marker><digits0>
<marker> := {<e-form> | <sign-form>}
<e-form> := <e-char>[<sign-form>]
<sign-form> := { + | - }
<e-char> := { D | d | E | e }
12.6.1.0558 >FLOAT
( c-addr u -- true | false ) ( F: -- r | ) or ( c-addr u -- r true | false)
An attempt is made to convert the string specified by c-addr and u to internal floating-point representation. If the string represents a valid floating-point number in the syntax below, its value r and true are returned. If the string does not represent a valid floating-point number only false is returned.
A string of blanks should be treated as a special case representing zero.
The syntax of a convertible string := <significand>[<exponent>]
<significand> := [<sign>]{<digits>[.<digits0>] |
.<digits> }
<exponent> := <marker><digits0>
<marker> := {<e-form> | <sign-form>}
<e-form> := <e-char>[<sign-form>]
<sign-form> := { + | - }
<e-char> := { D | d | E | e }
See:
A.12.6.1.0558 >FLOAT
12.6.1.1130 D>F
( d -- ) ( F: -- r )
or ( d -- r )
r 是 d 的相等的浮點值. 如果 d 不能被精確地以一個浮點值表示, 將會有一個模稜兩可的情況存在.
12.6.1.1130 D>F
( d -- ) ( F: -- r )
or ( d -- r )
r is the floating-point equivalent of d. An ambiguous condition exists if d cannot be precisely represented as a floating-point value.
12.6.1.1400 F!
( f-addr -- ) ( F: r -- )
or ( r f-addr -- )
將 r 存入 f-addr.
12.6.1.1400 F!
( f-addr -- ) ( F: r -- )
or ( r f-addr -- )
Store r at f-addr.
12.6.1.1410 F*
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
將 r1 乘以 r2 得到 r3.
12.6.1.1410 F*
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
Multiply r1 by r2 giving r3.
12.6.1.1420 F+
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
將 r1 加進 r2 得到結果 r3.
12.6.1.1420 F+
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
Add r1 to r2 giving the sum r3.
12.6.1.1425 F-
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
從 r1 減去 r2, 得到 r3.
12.6.1.1425 F-
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
Subtract r2 from r1, giving r3.
12.6.1.1430 F/
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
將 r1 除以 r2, 得到商 r3. 如果 r2 是零, 或是商位於一個浮點數目的範圍之外, 將會有一個模稜兩可的情況存在.
12.6.1.1430 F/
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
Divide r1 by r2, giving the quotient r3. An ambiguous condition exists if r2 is zero, or the quotient lies outside of the range of a floating-point number.
12.6.1.1440 F0<
( -- flag ) ( F: r -- ) or ( r -- flag )
如果 r 小於零, 則 flag 為真.
12.6.1.1440 F0<
( -- flag ) ( F: r -- ) or ( r -- flag )
flag is true if and only if r is less than zero.
12.6.1.1450 F0=
( -- flag ) ( F: r -- ) or ( r -- flag )
如果 r 等於零, 則 flag 為真.
12.6.1.1450 F0=
( -- flag ) ( F: r -- ) or ( r -- flag )
flag is true if and only if r is equal to zero.
12.6.1.1460 F<
( -- flag ) ( F: r1 r2 -- ) or ( r1 r2 -- flag )
如果 r1 小於 r2, 則 flag 為真.
12.6.1.1460 F<
( -- flag ) ( F: r1 r2 -- ) or ( r1 r2 -- flag )
flag is true
if and only if r1 is less than
12.6.1.1470 F>D
( -- d ) ( F: r -- ) or ( r -- d )
d 是 r 的整數部分的雙單元有號整數等價值. r 的小數部分被丟棄. 如果 r 的整數部分不能被精確地以一個雙單元有號整數展現, 將會有一個模稜兩可的情況存在.
12.6.1.1460 F>D
( -- d ) ( F: r -- ) or ( r -- d )
d is the double-cell signed-integer equivalent of the integer portion of r. The fractional portion of r is discarded. An ambiguous condition exists if the integer portion of r cannot be precisely represented as a double-cell signed integer.
12.6.1.1472 F@
( f-addr -- ) ( F: -- r ) or ( f-addr -- r )
r 是儲存於 f-addr 的值.
12.6.1.1472 F@
( f-addr -- ) ( F: -- r ) or ( f-addr -- r )
r is the value stored at f-addr.
12.6.1.1479 FALIGN
( -- )
如果資料空間指標不是浮點對齊的, 保留足夠的空間, 讓它是.
12.6.1.1479 FALIGN
( -- )
If the data-space pointer is not float aligned, reserve enough data space to make it so.
12.6.1.1483 FALIGNED
( addr -- f-addr )
f-addr 是第一個大於或等於 addr 的浮點對齊的位址.
12.6.1.1483 FALIGNED
( addr -- f-addr )
f-addr is the first float-aligned address greater than or equal to addr.
12.6.1.1492 FCONSTANT
( "<spaces>name" -- ) ( F: r -- ) or ( r "<spaces>name" -- )
跳過開頭的空白分界符號. 分析出由一個空白分界的 name. 為 name 創造一個有下列執行語義的定義.
name 被參考為一個 f-常數.
name 執行: ( -- ) ( F: -- r )
or ( -- r )
將 r 放置於浮點堆疊.
參閱:
A.12.6.1.1492 FCONSTANT ,
3.4.1 分析.
12.6.1.1492 FCONSTANT
( "<spaces>name" -- ) ( F: r -- ) or ( r "<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 an f-constant.
name Execution: ( -- ) ( F: -- r )
or ( -- r )
Place r on the floating-point stack.
See:
A.12.6.1.1492 FCONSTANT ,
3.4.1 Parsing.
12.6.1.1497 FDEPTH
( -- +n )
+n 是包含在預設分開的浮點堆疊上的數值數目. 如果浮點數目是保存於資料堆疊, +n 是目前包含於資料堆疊的可能的浮點數值的目前數目.
12.6.1.1497 FDEPTH
( -- +n )
+n is the number of values contained on the default separate floating-point stack. If floating-point numbers are kept on the data stack, +n is the current number of possible floating-point values contained on the data stack.
12.6.1.1500 FDROP
( F: r -- ) or ( r -- )
從浮點堆疊移除 r.
12.6.1.1500 FDROP
( F: r -- ) or ( r -- )
Remove r from the floating-point stack.
12.6.1.1510 FDUP
( F: r -- r r ) or ( r -- r r )
複製 r.
12.6.1.1510 FDUP
( F: r -- r r ) or ( r -- r r )
Duplicate r.
12.6.1.1552 FLITERAL
解譯: 這個詞的解譯語義是未定義的.
編譯: ( F: r -- )
or ( r -- )
將下列給予的執行時期語義加進目前的定義.
執行時期: ( F: -- r )
or ( -- r )
將 r 放置於浮點堆疊.
12.6.1.1552 FLITERAL
Interpretation: Interpretation semantics for this word are undefined.
Compilation: ( F: r -- )
or ( r -- )
Append the run-time semantics given below to the current definition.
Run-time: ( F: -- r )
or ( -- r )
Place r on the floating-point stack.
12.6.1.1555 FLOAT+
( f-addr1 -- f-addr2 )
將一個以位址單元為單位的浮點數目大小加進 f-addr1, 得到 f-addr2.
12.6.1.1555 FLOAT+
( f-addr1 -- f-addr2 )
Add the size in address units of a floating-point number to f-addr1, giving f-addr2.
12.6.1.1556 FLOATS
( n1 -- n2 )
n2 是以位址單元為單位的 n1 個浮點數目的大小.
12.6.1.1556 FLOATS
( n1 -- n2 )
n2 is the size in address units of n1 floating-point numbers.
12.6.1.1558 FLOOR
( F: r1 -- r2 ) or ( r1 -- r2 )
以 四捨五入到負無限的規則四捨五入 r1 到一個內部值, 得到 r2.
12.6.1.1558 FLOOR
( F: r1 -- r2 ) or ( r1 -- r2 )
Round r1 to an integral value using the round toward negative infinity rule, giving r2.
12.6.1.1562 FMAX
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
r3 是 r1 和 r2 中的較大者.
12.6.1.1562 FMAX
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
r3 is the greater of r1 and r2.
12.6.1.1565 FMIN
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
r3 是 r1 和 r2 中的較小者.
12.6.1.1565 FMIN
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
r3 is the lesser of r1 and r2.
12.6.1.1567 FNEGATE
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是 r1 的否定值.
12.6.1.1567 FNEGATE
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the negation of r1.
12.6.1.1600 FOVER
( F: r1 r2 -- r1 r2 r1 ) or ( r1 r2 -- r1 r2 r1 )
將一份 r1 的複製品放置於浮點運算堆疊的上方.
12.6.1.1600 FOVER
( F: r1 r2 -- r1 r2 r1 ) or ( r1 r2 -- r1 r2 r1 )
Place a copy of r1 on top of the floating-point stack.
12.6.1.1610 FROT
( F: r1 r2 r3 -- r2 r3 r1 ) or ( r1 r2 r3 -- r2 r3 r1 )
旋轉最上方三個浮點堆疊記錄.
12.6.1.1610 FROT
( F: r1 r2 r3 -- r2 r3 r1 ) or ( r1 r2 r3 -- r2 r3 r1 )
Rotate the top three floating-point stack entries.
12.6.1.1612 FROUND
( F: r1 -- r2 ) or ( r1 -- r2 )
用 四捨五入到最近 的規則四捨五入 r1 到一個整數值, 得到 r2.
參閱:
12.3.2 浮點運算
12.6.1.1612 FROUND
( F: r1 -- r2 ) or ( r1 -- r2 )
Round r1 to an integral value using the round to nearest rule, giving r2.
See:
12.3.2 Floating-point operations
12.6.1.1620 FSWAP
( F: r1 r2 -- r2 r1 ) or ( r1 r2 -- r2 r1 )
交換在浮點堆疊最上方的兩個元素.
12.6.1.1620 FSWAP
( F: r1 r2 -- r2 r1 ) or ( r1 r2 -- r2 r1 )
Exchange the top two floating-point stack items.
12.6.1.1630 FVARIABLE
( "<spaces>name" -- )
跳過開頭的空白分界符號. 分析出由一個空白分界的 name. 為 name 創造一個有下列執行語義的定義. 在資料空間的浮點對齊位址保留一個 FLOATS 位址單元.
name 被參考為一個 f-變數.
name 執行: ( -- f-addr )
f-addr 是由當 FVARIABLE 創造 name 時保留的資料空間的位址. 一個程式負責用來初始化保留空間的內容.
參閱:
A.12.6.1.1630 FVARIABLE ,
3.4.1 分析.
12.6.1.1630 FVARIABLE
( "<spaces>name" -- )
Skip leading space delimiters. Parse name delimited by a space. Create a definition for name with the execution semantics defined below. Reserve 1 FLOATS address units of data space at a float-aligned address.
name is referred to as an f-variable.
name Execution: ( -- f-addr )
f-addr is the address of the data space reserved by FVARIABLE when it created name. A program is responsible for initializing the contents of the reserved space.
See:
A.12.6.1.1630 FVARIABLE ,
3.4.1 Parsing.
12.6.1.2143 REPRESENT
( c-addr u -- n flag1 flag2 ) (F: r -- ) or ( r c-addr u -- n flag1 flag2 )
在 c-addr, 放置浮點數目 r 的有意義的延伸表示法的字元字串. 傳回以十進位為基底的指數 n, 符號 flag1, 和 flag2 為 正確的結果. 字元字串必須由最多 u 個有意義的有效數字組成, 包含一個十進元的部分, 加上由十進位點指到第一個數字的左邊, 並且只有在所有數字是零時, 第一個數字才能為零. 有效數字被以 四捨五入到最近值 的規則四捨五入到 u 個數字; 如果必要, n 會被調整成對應為有效數字的四捨五入量. 如果 flag2 是真則 r 是在實作自訂的浮點數目範圍. 如果 flag 為真, 則 r 為負數.
如果 BASE 之值不是十進位十時, 將會有模稜兩可的情況存在.
當 flag2 是假時, n 和 flag1 是實作自訂的, 如同 c-addr 的內容一樣. 在此情況下, 在 c-addr 的字串必須由書寫字元組成.
參閱:
3.2.1.2 數字轉換,
12.3.2 浮點操作,
A.12.6.1.2143 REPRESENT
12.6.1.2143 REPRESENT
( c-addr u -- n flag1 flag2 ) (F: r -- ) or ( r c-addr u -- n flag1 flag2 )
At c-addr, place the character-string external representation of the significand of the floating-point number r. Return the decimal-base exponent as n, the sign as flag1 and valid result as flag2. The character string shall consist of the u 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 u digits following the round to nearest rule; n is adjusted, if necessary, to correspond to the rounded magnitude of the significand. If flag2 is true then r was in the implementation-defined range of floating-point numbers. If flag1 is true then r is negative.
An ambiguous condition exists if the value of BASE is not decimal ten.
When flag2 is false, n and flag1 are implementation defined, as are the contents of c-addr. Under these circumstances, the string at c-addr shall consist of graphic characters.
See:
3.2.1.2 Digit conversion,
12.3.2 Floating-point operations,
A.12.6.1.2143 REPRESENT
12.6.2.1203 DF!
( df-addr -- ) ( F: r -- ) or ( r df-addr -- )
以一個 64 位元的 IEEE 雙精確浮點數字的方式將浮點數目 r 存入 df-addr. 如果內部表示法 r 的有效位數比 IEEE 雙精確格式有更多的精確度, 它將會被以 四捨五入到最近值 規則來四捨五入. 如果 r 的指數部分大於能以 IEEE 雙精確格式容納時, 將會有模稜兩可的情況存在.
12.6.2.1203 DF!
( df-addr -- ) ( F: r -- ) or ( r df-addr -- )
Store the floating-point number r as a 64-bit IEEE double-precision number at df-addr. If the significand of the internal representation of r has more precision than the IEEE double-precision format, it will be rounded using the round to nearest rule. An ambiguous condition exists if the exponent of r is too large to be accommodated in IEEE double-precision format.
See:
12.3.1.1 Addresses,
12.3.2 Floating-point operations.
12.6.2.1204 DF@
( df-addr -- ) ( F: -- r ) or ( df-addr -- r )
取得儲存於 df-addr 的一個 64 位元的 IEEE 雙精確浮點數字, 到浮點堆疊以內部表示法成為 r. 如果 IEEE 的雙精確有效數字比內部表示法有更多的精確度, 它將會被用 四捨五入到最接近 的規則來四捨五入成內部表示法. 如果 IEEE 的雙精確表示法的指數部分大於能以內部表示法容納時, 將會有模稜兩可的情況存在.
12.6.2.1204 DF@
( df-addr -- ) ( F: -- r ) or ( df-addr -- r )
Fetch the 64-bit IEEE double-precision number stored at df-addr to the floating-point stack as r in the internal representation. If the IEEE double-precision significand has more precision than the internal representation it will be rounded to the internal representation using the round to nearest rule. An ambiguous condition exists if the exponent of the IEEE double-precision representation is too large to be accommodated by the internal representation.
See:
12.3.1.1 Addresses,
12.3.2 Floating-point operations.
12.6.2.1205 DFALIGN
( -- )
如果資料空間指標不是雙浮點對齊的, 保留足夠的空間, 讓它是.
參閱:
12.3.1.1 位址
12.6.2.1205 DFALIGN
( -- )
If the data-space pointer is not double-float aligned, reserve enough data space to make it so.
See:
12.3.1.1 Addresses
12.6.2.1207 DFALIGNED
( addr -- df-addr )
df-addr 是第一個大於或等於 addr 的雙浮點對齊的位址.
參閱:
12.3.1.1 位址
12.6.2.1207 DFALIGNED
( addr -- df-addr )
df-addr is the first double-float-aligned address greater than or equal to addr.
See:
12.3.1.1 Addresses
12.6.2.1208 DFLOAT+
( df-addr1 -- df-addr2 )
將一個以位址單元為單位的 64 位元的 IEEE 雙精確浮點數字大小加進 df-addr1, 得到 df-addr2.
參閱:
12.3.1.1 位址
12.6.2.1208 DFLOAT+
( df-addr1 -- df-addr2 )
Add the size in address units of a 64-bit IEEE double-precision number to df-addr1, giving df-addr2.
See:
12.3.1.1 Addresses
2.6.2.1209 DFLOATS
( n1 -- n2 )
n2 是以位址單元為單位的 n1 個 64 位元的 IEEE 雙精確數目的大小.
2.6.2.1209 DFLOATS
( n1 -- n2 )
n2 is the size in address units of n1 64-bit IEEE double-precision numbers.
12.6.2.1415 F**
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
將 r1 增加指數 r2, 得到結果 r3.
12.6.2.1415 F**
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
Raise r1 to the power r2, giving the product r3.
12.6.2.1427 F.
( -- ) ( F: r -- ) or ( r -- )
用浮點表示法顯示有一個後緣空白的浮點堆疊最上方的數字:
[-] <digits>.<digits0>
如果 BASE 的值不是 (十進位) 十或字元字串表現的大小超過書寫數字輸出字串緩衝區的大小, 將會出現模稜兩可的情況.
參閱:
12.6.1.0558 >FLOAT ,
A.12.6.1.1427 F.
12.6.2.1427 F.
( -- ) ( F: r -- ) or ( r -- )
Display, with a trailing space, the top number on the floating-point stack using fixed-point notation:
[-] <digits>.<digits0>
An ambiguous condition exists if the value of BASE is not (decimal) ten or if the character string representation exceeds the size of the pictured numeric output string buffer.
See:
12.6.1.0558 >FLOAT ,
A.12.6.1.1427 F.
12.6.2.1474 FABS
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是 r1 的絕對值.
12.6.2.1474 FABS
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the absolute value of r1.
12.6.2.1476 FACOS
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是餘弦是 r1 的首要弧度角度. 如果 |r1| 大於一時, 將會出現模稜兩可的情況.
12.6.2.1476 FACOS
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the principal radian angle whose cosine is r1. An ambiguous condition exists if |r1| is greater than one.
12.6.2.1477 FACOSH
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是雙曲餘弦值是 r1 的浮點值. 如果 r1 小於一時, 將會出現模稜兩可的情況.
12.6.2.1477 FACOSH
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the floating-point value whose hyperbolic cosine is r1. An ambiguous condition exists if r1 is less than one.
12.6.2.1484 FALOG
( F: r1 -- r2 ) or ( r1 -- r2 )
將十提升指數 r1, 得到 r2.
12.6.2.1484 FALOG
( F: r1 -- r2 ) or ( r1 -- r2 )
Raise ten to the power r1, giving r2.
12.6.2.1486 FASIN
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是正弦是 r1 的首要弧度角度. 如果 |r1| 大於一時, 將會出現模稜兩可的情況.
12.6.2.1486 FASIN
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the principal radian angle whose sine is r1. An ambiguous condition exists if |r1| is greater than one.
12.6.2.1487 FASINH
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是雙曲正弦是 r1 的浮點值. 如果 r1 小於零時, 將會出現模稜兩可的情況.
12.6.2.1487 FASINH
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the floating-point value whose hyperbolic sine is r1. An ambiguous condition exists if r1 is less than zero.
12.6.2.1488 FATAN
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是正切值是 r1 的首要弧度角度.
12.6.2.1488 FATAN
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the principal radian angle whose tangent is r1.
12.6.2.1489 FATAN2
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
r3 是正切是 r1/r2 的首要弧度角度. 如果 r1 和 r2 是零時, 將會出現模稜兩可的情況.
12.6.2.1489 FATAN2
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )
r3 is the radian angle whose tangent is r1/r2. An ambiguous condition exists if r1 and r2 are zero.
See:
A.12.6.2.1489 FATAN2
12.6.2.1491 FATANH
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是雙曲正切是 r1 的浮點值. 如果 r1 是在 -1E0 到 1E0 的範圍之外時, 將會有模稜兩可的情況存在.
12.6.2.1491 FATANH
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the floating-point value whose hyperbolic tangent is r1. An ambiguous condition exists if r1 is outside the range of -1E0 to 1E0.
12.6.2.1493 FCOS
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是弧度角度 r1 的餘弦值.
12.6.2.1493 FCOS
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the cosine of the radian angle r1.
12.6.2.1494 FCOSH
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是弧度角度 r1 的雙曲餘弦值.
12.6.2.1494 FCOSH
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the hyperbolic cosine of r1.
12.6.2.1513 FE.
( -- ) ( F: r -- ) or ( r -- )
用工程表示法顯示有一個後緣空白的浮點堆疊最上方的數字, 它的有效數字是大於或等於 1.0 並且小於 1000.0 並且十進位指數值是三的乘數.
如果 BASE 的值不是 (十進位) 十或字元字串表現的大小超過書寫數字輸出字串緩衝區的大小, 將會出現模稜兩可的情況.
參閱:
12.3.2 浮點操作,
12.6.1.2143 REPRESENT
12.6.2.1513 FE.
( -- ) ( F: r -- ) or ( r -- )
Display, with a trailing space, the top number on the floating-point stack 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.
An ambiguous condition exists if the value of BASE is not (decimal) ten or if the character string representation exceeds the size of the pictured numeric output string buffer.
See:
12.3.2 Floating-point operations,
12.6.1.2143 REPRESENT
12.6.2.1515 FEXP
( F: r1 -- r2 ) or ( r1 -- r2 )
以指數 r1 提升 e, 得到 r2.
12.6.2.1515 FEXP
( F: r1 -- r2 ) or ( r1 -- r2 )
Raise e to the power r1, giving r2.
12.6.2.1516 FEXPM1
( F: r1 -- r2 ) or ( r1 -- r2 )
以指數 r1 提升 e, 並且減去一, 得到 r2.
12.6.2.1516 FEXPM1
( F: r1 -- r2 ) or ( r1 -- r2 )
Raise e to the power r1 and subtract one, giving r2.
See:
A.12.6.2.1516 FEXPM1
12.6.2.1553 FLN
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是 r1 的自然對數. 如果 r1 是小於或等於零, 將會有一個模稜兩可的情況存在.
12.6.2.1553 FLN
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the natural logarithm of r1. An ambiguous condition exists if r1 is less than or equal to zero.
12.6.2.1554 FLNP1
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是量 r1 加一的自然對數. 如果 r1 小於或等於負一時, 將會有一個模稜兩可的情況存在.
12.6.2.1554 FLNP1
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the natural logarithm of the quantity r1 plus one. An ambiguous condition exists if r1 is less than or equal to negative one.
See:
A.12.6.2.1554 FLNP1
12.6.2.1557 FLOG
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是 r1 的十基底的對數. 如果 r1 小於或等於零時, 將會有一個模稜兩可的情況存在.
12.6.2.1557 FLOG
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the base-ten logarithm of r1. An ambiguous condition exists if r1 is less than or equal to zero.
12.6.2.1613 FS.
( -- ) ( F: r -- ) or ( r -- )
用科學表示法顯示有一個後緣空白的浮點堆疊最上方的數字:
<significand><exponent>
而:
<significand> := [-]<digit>.<digits0> <exponent> := E[-]<digits>
如果 BASE 的值不是 (十進位) 十或字元字串表現的大小超過書寫數字輸出字串緩衝區的大小, 將會出現模稜兩可的情況.
參閱:
12.3.2 浮點運算,
12.6.1.2143 REPRESENT
12.6.2.1613 FS.
( -- ) ( F: r -- ) or ( r -- )
Display, with a trailing space, the top number on the floating-point stack in scientific notation:
<significand><exponent>
where:
<significand> := [-]<digit>.<digits0> <exponent> := E[-]<digits>
An ambiguous condition exists if the value of BASE is not (decimal) ten or if the character string representation exceeds the size of the pictured numeric output string buffer.
See:
12.3.2 Floating-point operations,
12.6.1.2143 REPRESENT
12.6.2.1614 FSIN
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是弧度角度 r1 的正弦值.
12.6.2.1614 FSIN
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the sine of the radian angle r1.
12.6.2.1616 FSINCOS
( F: r1 -- r2 r3 ) or ( r1 -- r2 r3 )
r2 是弧度角度 r1 的正弦值. r3 是弧度角度 r1 的餘弦值.
12.6.2.1616 FSINCOS
( F: r1 -- r2 r3 ) or ( r1 -- r2 r3 )
r2 is the sine of the radian angle r1. r3 is the cosine of the radian angle r1.
See:
A.12.6.2.1489 FATAN2
12.6.2.1617 FSINH
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是弧度角度 r1 的雙曲正弦值.
12.6.2.1617 FSINH
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the hyperbolic sine of r1.
12.6.2.1618 FSQRT
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是 r1 的平方根. 如果 r1 小於零, 將會有一個模稜兩可的情況存在.
12.6.2.1618 FSQRT
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the square root of r1. An ambiguous condition exists if r1 is less than zero.
12.6.2.1625 FTAN
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是弧度角度 r1 的正切值. 如果 cos(r1) 是零, 將會有一個模稜兩可的情況存在.
12.6.2.1625 FTAN
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the tangent of the radian angle r1. An ambiguous condition exists if cos(r1) is zero.
12.6.2.1626 FTANH
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 是弧度角度 r1 的雙曲正切值.
12.6.2.1626 FTANH
( F: r1 -- r2 ) or ( r1 -- r2 )
r2 is the hyperbolic tangent of r1.
12.6.2.1640 F~
( -- flag ) ( F: r1 r2 r3 -- ) or ( r1 r2 r3 -- flag )
如果 r3 是正數, (r1 減 r2) 的絕對值小於 r3, flag 是真.
如果 r3 是零, 如果實作相依的 r1 和 r2 編碼完全相同, flag 為真. (如果正零和負零有不同的編碼, 它們是不相等的.)
如果 r3 是負數, 如果 (r1 減 r2) 的絕對值小於 r3 的絕對值乘以 r1 和 r2 的絕對值的總和, flag 是真.
參閱:
A.12.6.2.1640 F~
12.6.2.1640 F~
( -- flag ) ( F: r1 r2 r3 -- ) or ( r1 r2 r3 -- flag )
If r3 is positive, flag is true if the absolute value of (r1 minus r2) is less than r3.
If r3 is zero, flag is true if the implementation-dependent encoding of r1 and r2 are exactly identical (positive and negative zero are unequal if they have distinct encodings).
If r3 is negative, flag is true if the absolute value of (r1 minus r2) is less than the absolute value of r3 times the sum of the absolute values of r1 and r2.
See:
A.12.6.2.1640 F~
12.6.2.2035 PRECISION
( -- u )
傳回目前使用於 F., FE., 或 FS. 的有效數字數目為 u.
12.6.2.2035 PRECISION
( -- u )
Return the number of significant digits currently used by F., FE., or FS. as u.
12.6.2.2200 SET-PRECISION
( u -- )
設定目前使用於 F., FE., 或 FS. 的有效數字數目成 u.
12.6.2.2200 SET-PRECISION
( u -- )
Set the number of significant digits currently used by F., FE., or FS. to u.
12.6.2.2202 SF!
( sf-addr -- ) ( F: r -- ) or ( r sf-addr -- )
以一個 32 位元的 IEEE 單精確浮點數字的方式將浮點數目 r 存入 sf-addr. 如果內部表示法 r 的有效位數比 IEEE 單精確格式有更多的精確度, 它將會被以 四捨五入到最近值 規則來四捨五入. 如果 r 的指數部分大於能以 IEEE 單精確格式容納時, 將會有模稜兩可的情況存在.
12.6.2.2202 SF!
( sf-addr -- ) ( F: r -- ) or ( r sf-addr -- )
Store the floating-point number r as a 32-bit IEEE single-precision number at sf-addr. If the significand of the internal representation of r has more precision than the IEEE single-precision format, it will be rounded using the round to nearest rule. An ambiguous condition exists if the exponent of r is too large to be accommodated by the IEEE single-precision format.
See:
12.3.1.1 Addresses,
12.3.2 Floating-point operations.
12.6.2.2203 SF@
( sf-addr -- ) ( F: -- r ) or ( sf-addr -- r )
取得儲存於 sf-addr 的一個 32 位元的 IEEE 單精確浮點數字, 到浮點堆疊以內部表示法成為 r. 如果 IEEE 的單精確有效數字比內部表示法有更多的精確度, 它將會被用 四捨五入到最接近 的規則來四捨五入成內部表示法. 如果 IEEE 的單精確表示法的指數部分大於能以內部表示法容納時, 將會有模稜兩可的情況存在.
12.6.2.2203 SF@
( sf-addr -- ) ( F: -- r ) or ( sf-addr -- r )
Fetch the 32-bit IEEE single-precision number stored at sf-addr to the floating-point stack as r in the internal representation. If the IEEE single-precision significand has more precision than the internal representation, it will be rounded to the internal representation using the round to nearest rule. An ambiguous condition exists if the exponent of the IEEE single-precision representation is too large to be accommodated by the internal representation.
See:
12.3.1.1 Addresses,
12.3.2 Floating-point operations.
12.6.2.2204 SFALIGN
( -- )
如果資料空間指標不是單浮點對齊的, 保留足夠的空間, 讓它是.
參閱:
12.3.1.1 位址
12.6.2.2204 SFALIGN
( -- )
If the data-space pointer is not single-float aligned, reserve enough data space to make it so.
See:
12.3.1.1 Addresses
12.6.2.2206 SFALIGNED
( addr -- sf-addr )
sf-addr 是第一個大於或等於 addr 的單浮點對齊的位址.
參閱:
12.3.1.1 位址
12.6.2.2206 SFALIGNED
( addr -- sf-addr )
sf-addr is the first single-float-aligned address greater than or equal to addr.
See:
12.3.1.1 Addresses
12.6.2.2207 SFLOAT+
( sf-addr1 -- sf-addr2 )
將一個以位址單元為單位的 32 位元的 IEEE 單精確浮點數字大小加進 sf-addr1, 得到 sf-addr2.
參閱:
12.3.1.1 位址
12.6.2.2207 SFLOAT+
( sf-addr1 -- sf-addr2 )
Add the size in address units of a 32-bit IEEE single-precision number to sf-addr1, giving sf-addr2.
See:
12.3.1.1 Addresses
12.6.2.2208 SFLOATS
( n1 -- n2 )
n2 是以位址單元為單位的 n1 個 32 位元的 IEEE 單精確數目的大小.
參閱:
12.3.1.1 位址
12.6.2.2208 SFLOATS
( n1 -- n2 )
n2 is the size in address units of n1 32-bit IEEE single-precision numbers.
See:
12.3.1.1 Addresses
內容列表(Table of Contents)
下一章(Next Section)