TW579482B - Exponent operation device and method for floating point number - Google Patents

Exponent operation device and method for floating point number Download PDF

Info

Publication number
TW579482B
TW579482B TW91115788A TW91115788A TW579482B TW 579482 B TW579482 B TW 579482B TW 91115788 A TW91115788 A TW 91115788A TW 91115788 A TW91115788 A TW 91115788A TW 579482 B TW579482 B TW 579482B
Authority
TW
Taiwan
Prior art keywords
floating
point
point number
exponent
exponential
Prior art date
Application number
TW91115788A
Other languages
Chinese (zh)
Inventor
Chung-Yen Lu
Kuo-Wei Yeh
Original Assignee
Silicon Integrated Sys Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Silicon Integrated Sys Corp filed Critical Silicon Integrated Sys Corp
Priority to TW91115788A priority Critical patent/TW579482B/en
Application granted granted Critical
Publication of TW579482B publication Critical patent/TW579482B/en

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

The present invention is an exponent operation device and method for floating point number for obtaining an exponent operation result of a floating point number with 2 as the base, which comprises: a conversion device for receiving the input of floating point number to convert the floating point number into an integer portion and a fraction portion for output; K exponent index tables, wherein the fraction portion includes N bits, and dividing the N bits into K portions, and each portion has N1, N2, ..., Nk bits, and N=N1+N2+...+NK, and each exponent table receives an input within the N portions and looks up the table to generate an output result; and, a multiplier for receiving the output result from each exponent index table as input to generate an odd amount; wherein, the integer portion is an exponent, and the result of exponent operation is represented with an odd amount, an exponent, and an output symbol number with value as zero. The representation of result from exponent operation is (-1)<Sy>.2<Ey>.my, wherein Sy is the symbol number, Ey is the exponent, my is the odd amount, 1 <= mx < 2, and the above-mentioned N, K, K1, K2, ..., KN are natural numbers.

Description

579482 五、發明說明(1) 本發明係有關於一種指數運算的方法和裝置,特別係 有關一種浮點數的指數運算方法和裝置。 在目别的電子計算機中,浮點數F最常用的的表示法 為: 數 F = M X ySE 其中Μ為尾數(mantissa 為指數,冷為指數的基 電機和電子工程師協會(Institute Electrical and Electronic Engineers,ιΕΕΕ)為浮點數的表示法訂 立了四種標準格式,前兩種格式為單一精確32位元格式 (single-precision 32-bit f〇rmat)以及雙位精確 64 位元 格式(d〇Uble-precisi〇n 64 一 bit f〇rmat),另外兩種為延 伸格式用於表示運算時的中間結果。對於單一精確32位元 格式表示法而言,最重要的目的即是表現浮點數的精確 度,而只有在為了得到更多的有效位數時,才利用雙位精 確64位元格式表示法使用雙倍長度(D〇uMe Ungth)儲 存空間存放該浮點收。 、參閱第1圖,第1圖顯示上述單一精確32位元格式表示 法的示意圖。在此表示法中,以2為基數,浮點數卜 s · 2Ε · Μ, 其中Μ為該浮點數的尾數(mantissa),使用23位元表 示之,E為該浮點數的指數,使用8位元表示之, 點數的符號數使用1位元表示之。 马$符 在目前的電子計算機中,所有的運算幾乎都採用浮點 第4頁 0702-7516TW ; 90P130 ; Ellen.ptd 579482 五、發明說明(2) m在目因算效率決定了該電子計算機的 建立一對照表,在運算時配ί2使用查f的方法,事先 運算結果,而用此方傲…口二表,以求付净點數的指數 二:=問:,一個8位元的對照表已是相當龐i 結果的精確度仍是木约从//數的“數運县,其運算 份都有23位元不夠的’因為通常一個浮點數尾數的部 有鐘於此’本發明的主要目 一 指數運算裝置和方法,用於獲 最點數的 之指算運算結果。 、百敢同精確度的浮點數 為達成上述目的,本發明搓一 洋點數的表示法為(-1)Sx ·2Εχ ,兮運异結果,該 示法為(-1)sy .2Ey mHe Γχ s亥指數運算結果的表 該指數運算社果的,;‘中F 该*點數的符號數、sy為 指數運算社果的沪童f m 的心數、Ey為該 ,璽筲=t x為該洋點數的尾數、m為兮於軲 括:-轉換裝置,用以接收上述浮點數的符數异裝置包 點數的指數以及上述浮點數的尾數輸入,將^洋 換成-整數部份和一分數部份輸出;κ個指返:矣點數轉 述分數部份具有Ν個位元,將Ν個位 、二,上 分別具錢、Ν2、…、ΝΚ位元,且Ν = Νι+Ν2Ϊ=Ν,母:部份 指數表接收上述Κ部份中的一部份輸入, 1 第5頁 0702-7516BfF;90Pl30; Ellen.ptd 五、發明說明(3) f出結果;—乘法器,用以接 ’ 輸出結果輸入’並且產生上述扑數個指數對照表的 上述轉換裝置輪出的整數部份為曰上果的尾數。其中 數,上述指數運算&amp; I # f #述礼數運算結果的指 H、…、“自:果數的^數其值為零’且上勒]、 另一方面,本發明也提供一 法,用於獲得―浮點數以2為底的— 子點數的指數運算方 點數的表示法為(_丨)Sx · 2Ex · /,1 θ數運异結果,該浮 號數、I為該浮點數的指數、=為&amp;tSx為該浮點數的符 %&lt;2二該指數運算方法包括“步;::二的尾數且1$ 數的符號數、上述浮點數的指數以及 ,將上述浮點 入-轉換裝置中。接著,在 點數的尾數輸 轉換成-整數部份和一分數部份轉上述浮點數 個部份,上述分數部份具有Ν個將,分數部份分成Κ Nl、…、化位元,且M1+N2+...+N’母:~'份4分別具有 收上《部份中的一部份輸入 母-個指數表接 果。接著1上述每一個指數+^查表產生一輸出結 中產生一尾數。最後,#用上述尾‘出-乘法器 及一值為零的符號數表示上述指數 ^整數部份,以 結果的表示法為(―1)Sy · 2Ey ,運异…果,邊指數運算 上述整數部份、my為上述輸出;數、m符號數、Ey為 K、Ki、K2、…、自然數。毛數^〆2’且上述N、 實施例 第2圖表示本發明浮點數的指 數運算裝置之架構示意579482 V. Description of the invention (1) The present invention relates to a method and device for exponential operation, and particularly relates to a method and device for exponential operation of floating point numbers. In the target computer, the most commonly used representation of the floating-point number F is: the number F = MX ySE where M is the mantissa (mantissa is the index, cold is the index of the Institute of Electrical and Electronic Engineers (ΙΕΕΕ) established four standard formats for the representation of floating-point numbers. The first two formats are single-precision 32-bit format and double-bit precise 64-bit format (d〇). Uble-precisi〇n 64 one-bit f0rmat), the other two are extended formats used to represent intermediate results in operations. For a single precise 32-bit format representation, the most important purpose is to represent floating-point numbers Accuracy, and only in order to get more significant digits, the double-bit precise 64-bit format notation is used to store the floating-point receiver in double-length (DuoMe Ungth) storage space. See section 1 Figure 1. Figure 1 shows a schematic representation of the single precision 32-bit format representation above. In this notation, a floating point number s · 2E · Μ is used as the base number 2, where M is the mantissa of the floating point number (mantissa ), It is represented by 23 bits, E is the exponent of the floating-point number, it is represented by 8 bits, and the number of symbols of the points is represented by 1 bit. In the current electronic computers, almost all operations are performed. Use floating-point page 0702-7516TW; 90P130; Ellen.ptd 579482 V. Description of the invention (2) The efficiency of the computer determines the establishment of a comparison table for the computer, and uses 2 to check the method when calculating , Calculate the result in advance, and use this side to proud ... the second table to find the exponent of the net points: = Q: an 8-bit comparison table is quite pang i the accuracy of the result is still about From the "number of counties", the number of calculations is 23 bits. "Because a floating-point number usually has the part here." The main purpose of the present invention is an index calculation device and method for obtaining The point with the most points refers to the arithmetic operation result. To achieve the above purpose, the floating point number with the same accuracy and accuracy is achieved by the present invention. The expression of the number of points in the present invention is (-1) Sx · 2Eχ. The expression is (-1) sy. 2Ey mHe Γχ s sii index calculation results table ,; 'In F, the symbol number of the * point number, sy is the heart number of the Shanghai child fm of the exponential calculation social fruit, Ey is the number, Xi 筲 = tx is the mantissa of the western point number, and m is the parenthesis :-Conversion device for receiving the exponent of the above-mentioned floating-point number and the package point exponent and the mantissa input of the floating-point number, and replacing ^ yang with an -integer part and a fractional part for output; κ fingers Back: 矣 The number of digits in the fractional part has N bits, and the N bits, two, and money have N, N2, ..., NK bits, and N = Νι + Ν2Ϊ = Ν, the mother: part of the index table Receive a part of the input from the above K part, 1 Page 5 0702-7516BfF; 90Pl30; Ellen.ptd V. Description of the invention (3) f gives the result;-a multiplier, which is used to connect the 'output result input' and generate The integer part rounded out by the conversion device of the above-mentioned several index comparison tables is the mantissa of the upper fruit. Among them, the above exponential operation &amp; I # f #mentioned the result of the operation of the digit number refers to H,…, “from: the number of the fruit number has a value of zero 'and above”] On the other hand, the present invention also provides a Method for obtaining ―floating point number with 2 as the base—the exponent operation of the sub-point number is represented by (_ 丨) Sx · 2Ex · /, and the result of 1 θ is different from the floating-point number, I is the exponent of the floating-point number, = is &amp; tSx is the sign of the floating-point number% &lt; 2. The exponential operation method includes "steps :: two's mantissa and the sign of the 1 $ number, the above floating-point The exponent of the number and the above-mentioned floating point into the conversion device. Then, the mantissa input of the points is converted into an integer part and a fraction part into the above floating point parts. The above fraction part has N divisions, and the fraction part is divided into K Nl,... And M1 + N2 + ... + N 'mothers: ~' parts 4 each have a part of the input mother-in-the-exponential table to receive the results of the part. Then 1 each of the above exponents + ^ lookup table produces an output knot which produces a mantissa. Finally, # use the above-mentioned tail-out-multiplier and a number of zero symbols to represent the above-mentioned exponent ^ integer part, and the representation of the result is (−1) Sy · 2Ey, luck ... fruit, edge exponential operation above Integer part, my is the above output; number, m sign number, Ey is K, Ki, K2, ..., natural number. Gross number ^ 〆2 ′ and the above N, embodiment FIG. 2 shows a schematic diagram of the structure of a floating-point number arithmetic operation device according to the present invention.

579482 五、發明說明(4) 圖。如圖所示,浮點數的指數運算裝置包括轉換裝 K個}曰—數對照表2 〜2 〇κ以及乘法器3 〇。轉換裝置丨〇用 收一洋點數X的符號數\、該浮點數χ的指數匕以及該 數X的尾數mx輸入,將該浮點數轉換成一整數部 數部份輪出並且在無法將該浮點數表示成整數部x ° 一二 數部份時輸出錯誤訊息Err。分數部份F :和为 請位元分成K份,每-部份分別具有(、广個位/布將 兀,且ν=Μν2+...+Νκ,κ個指數對照表 ^ 指數表接收上述Κ部份中的一份輸入,並且—個 入* θ : 用接收個指數表的輸出結果於 ?輸整數部外為該指數運算結果;的指:E :裝置 指數運算結果γ都為正數,所以 y且因為 為零 异、、&quot;果¥的符號數sy 上述浮點數X的表示法為: X = (-1 )Sx · 2Ex · mx ⑴ 其中Sx為該浮點數的符號數, 浮點數的符號數\為〇,當浮點似為負數正數時, 號數sx為1 ; Ex為該浮點數的指數二子點數的符 1 Smx&lt;2。 x 4 5亥净點數的尾數且 本發明之洋點數的指數運算裝置, X以2為底的指數運算結果γ ·· ;獲得該浮點數 Y-2^(^l)Sy . 2Ey . ffly (2) 其中sy為該指數運算結果的符號數 U為‘數運算結 麵 第7頁 0702-7516TW;90P130; Ellen.ptd 579482 五、發明說明(5) __ 果Y都為正數,所^ 該指數運算結果的指日數數1?的符,數Sy為零;Ey為 $ my &lt; 2。 y為σ亥‘數運算結果的尾數且1 部份為了求仵Υ ’本發明之方法先將χ分成整數部份和分數 X=(~1)S:,、= IX + FX (3) -、中Ix為^數部份、Fx為分數 Ρχ=Φ2-ν=(Σα「2,2_ν ⑷ X&lt;1 其中q為N位元數字,^為化位元數字。 Y= = 2Ιχ Π2Α/· (5) 因此,指數運算結果的指數Ey、該指數運算結果 數my以及指數運算結果γ的符號數、分別為: 毛 Ε’Ιχ (6) my-2Fx =Π2Αί2^Ν = Πτί i ; (7) (8) 其中TiL.…且1 ,K為指數對照表的個 數,而因為〇 $FX&lt;1,所以20 ,即1 $2Fx&lt;2,ra 士、甘 足1 一&lt;2。 一 此滿 利用本發明之浮點數的指數運算裝置可獲得該浮點數 X以2為底的指數運算結果γ,首先,將浮點數χ的^號數 Μχ、浮點數X的指數Εχ以及浮點數X的尾數Μχ輸入轉換1置579482 V. Description of the invention (4) Figure. As shown in the figure, the floating-point number exponential operation device includes K sets of conversion units, a number comparison table 2 to 2 κκ, and a multiplier 3 〇. The conversion device 丨 〇 uses the sign of the number of convergent points X, the exponent of the floating point number χ, and the mantissa of the number X to input, converts the floating point number to an integer part, and rotates the part. An error message Err is output when the floating-point number is represented as an integer part x ° or two. Fractional part F: and please divide the bits into K parts, each-part has (, a wide place / cloth general, and ν = Μν2 + ... + Nκ, κ index comparison table ^ index table receives the above One input in the K part, and one input * θ: Use the output result of the index table to receive the result of the index operation outside the input integer part; Refer to: E: The index operation result γ of the device is positive, so y and because it is zero, the symbol number sy of the fruit ¥ The above floating-point number X is expressed as: X = (-1) Sx · 2Ex · mx ⑴ where Sx is the sign number of the floating-point number, float The sign of the number of points is 0. When the floating point appears to be a negative number, the number sx is 1; Ex is the sign of the exponent two subpoints of the floating point number 1 Smx <2. X 4 5 Mantissa and exponential operation device of western points of the present invention, X exponential operation result γ · 2 as the base; obtain the floating point number Y-2 ^ (^ l) Sy. 2Ey. Ffly (2) where sy is The sign number U of the exponential operation result is' numerical operation result page 70702-7516TW; 90P130; Ellen.ptd 579482 V. Description of the invention (5) __ If Y is a positive number, the result of the exponential operation The sign of the number of days is 1 ?, and the number Sy is zero; Ey is $ my &lt; 2. y is the mantissa of the result of the number operation of σ, and 1 part is to find 仵 Υ Divided into integer parts and fractions X = (~ 1) S: ,, = IX + FX (3)-, where Ix is the number part, Fx is the fraction Pχ = Φ2-ν = (Σα 「2,2_ν ⑷ X &lt; 1 where q is an N-bit number and ^ is a digit number. Y = = 2Ιχ Π2Α / · (5) Therefore, the exponent Ey of the exponential operation result, the number of the exponential operation result my, and the sign number of the exponential operation result γ. , Respectively: 毛 Ε'Ιχ (6) my-2Fx = Π2Αί2 ^ N = Πτίi; (7) (8) where TiL .... and 1, K is the number of the index comparison table, and because 〇 $ FX &lt; 1, so 20, that is, 1 $ 2Fx &lt; 2, ra shi, Ganzu 1- &lt; 2. Using the exponential arithmetic device of the floating-point number of the present invention can obtain the exponent of the floating-point number X as a base 2. The calculation result γ, first, the ^ number of the floating-point number χ, χ, the exponent Εχ of the floating-point number X, and the mantissa χ of the floating-point number X are input and set.

0702-7516TW ; 90Ρ130 ; Ellen.ptd j /舛82 五、發明說明(6) 二二以^二”中把浮物表示成整數部份 κ個部份,上述八2第3式)。接著,將上述分數部份分成 &amp;十…N?“數部 收上述㈣份中的n+···碼,每一個指數表接 再將每一個指數 j 、’且查表產生一輸出結果, 异結果γ的尾數ray(參考第4、5以^;m'中產生指數運 my、整數部份I ,以及一枯或资 式)。最後,利用尾數 結果Y,該指數X運算姓果Y的表'的符號數sy表示指數運算 考第6式)’my為尾數幻(=8/ Ey為整數部份U參 ,,=表二本發明轉換裝置之架構示意圖。如圖所示 置^ ifΪ括移位裝置12、檢測裝置14以及決定裝 r u 、置1 2用以接收浮點數的指數£};以及浮點數^ 尾入’依據浮點數的指吨將浮點數的尾數;數的 mm Ρ : 數的心數χ整數,則依據該正整數 ^點數的尾數mx向左移’例如:浮點數的指數Ex為5,= 序點數的尾數mx向左移5位元,當 χ/ 、 .., ^ , =E為-卜則浮點數的尾向右移i位元,而;= 置2產生一移位分數部份&amp;和一移位整數部份心輸出。 檢測裝置14用以檢測移位裝置12,在移位裝 時發出錯誤訊息Err。決定裝置16用以接收移位整數部 Isc以及浮點數的符號數Sx輸入,並且依據浮點數的符號^ I·» 0702-7516TW ; 90P130 ; Ellen.ptd 第9頁 579482 五、發明說明(7) 移部份1sc的正負號以產生整數部份(X輸出該 =換裝置10,當Sx為1時Ix = -Isc’當\為〇時,i 。 〃。中移位分數部份Fsc輸出該轉換裴置1〇後即為分數部5份 Γ X ° 第4立圖表示本發明實施例之浮點數的指數運算裝置之 二忍圖。如圖所示,浮點數的指數運算裝置包括移位 裝置12 γ檢測裝置14、決定裝置16、3個指數對照表 2 〇ι 2 〇3以及乘法器3 〇。本實施例之浮點數的指數運算裝置 ,用於獲得該浮點數X以2為底的指數運算結果γ即γ=x, ί mx的表示法為x=(-i)sx ·2Εχ ·〜’其中〜為該浮點 ?的符號數’以!位元表示之當,浮點數乂為正數時浮點0702-7516TW; 90P130; Ellen.ptd j / 舛 82 V. Description of the invention (6) The floating object is represented by the integer part κ in "two two by two" (the third formula of the above eight 2). Then, Divide the above fraction into &amp; ten ... N? "Several parts receive the n + ... code from the above, each index table will then each index j, 'and look up the table to produce an output result, different results The mantissa ray of γ (refer to the 4th, 5th, ^; m 'to generate the exponential operation my, the integer part I, and a dry or capital formula). Finally, using the mantissa result Y, the exponent X calculates the symbol number sy of the table of the last name Y to indicate that the exponent operation considers formula 6) 'my is the mantissa magic (= 8 / Ey is the integer part U parameter, == Table 2 Schematic diagram of the conversion device of the present invention. As shown in the figure, if ^ includes the shifting device 12, the detection device 14, and the decision to install ru, set 1 2 to receive the exponent of the floating-point number £}; 'According to the floating-point number, the mantissa of the floating-point number; the number of mm ρ: the heart's number of the number χ integer, then the positive integer ^ the mantissa of the point number mx to the left'. For example: the exponent of the floating-point number Ex Is 5, = the mantissa of the ordinal number is shifted 5 bits to the left, when χ /, .., ^, = E is -bu, the tail of the floating-point number is shifted to the right by i bits, and == 2 is generated A shifted fraction &amp; and a shifted integer portion are output. The detection device 14 is used to detect the shifted device 12 and sends an error message Err when the device is shifted. The determination device 16 is used to receive the shifted integer portion Isc And the sign of the floating point number Sx input, and according to the sign of the floating point number ^ I · »0702-7516TW; 90P130; Ellen.ptd page 9 579482 V. Description of the invention (7) Shift section Share the sign of 1sc to produce an integer part (X outputs this = change device 10, when Sx is 1, Ix = -Isc 'when \ is 0, i. 〃. The middle shift fraction part Fsc outputs the conversion Pei After setting it to 10, it is 5 fractional fractions Γ X ° The fourth figure shows the second tolerance chart of the exponential arithmetic device for floating-point numbers in the embodiment of the present invention. As shown in the figure, the exponential arithmetic device for floating-point numbers includes shift Device 12 γ detection device 14, decision device 16, three index comparison tables 2 〇 2 〇 3 and multiplier 3 〇 The floating point exponent computing device of this embodiment is used to obtain the floating point number X by 2 The result of the exponential operation based on γ is γ = x, and the representation of ί mx is x = (-i) sx · 2Εχ · ~ 'where ~ is the number of symbols of the floating point?' Floating point when the number of points is positive

數=符號數\為〇,t浮點數X為負數時,浮點數的符號數 \為1 ; Ex為該浮點數的指數,以8位元表示之;%為該浮 點數的尾數,以24位元表示之,且i $牝&lt;2。 X 為了求得Y,需先將X分成用8位元表示的整數部份込 以及用23位元表示的分數部份匕’其中••移位裝x置 12接收浮點數的指數Εχ以及浮點數的尾數%輸入,依據浮 點數的指數Εχ將浮點數的尾數牝移位,舉例來說,當浮點 數的指數匕正整數’則依據該正整數將浮點數的尾數^向 左移,例如:浮點數的指數Εχ為5,則浮點數的尾如向左 移5位元,當浮點數的指數Εχ負整數,則依據該正整數將 f點數的尾數mx向右移’例如:浮點數的指數&amp;為」,則 洋點數的尾數mx向右移1位元,而移位裝置丨2產生一移位 刀數4伤Fsc和一移位整數部份Isc輸出。檢測裝置1 4用以檢Number = sign number \ is 0, when t floating point number X is negative, the sign number of floating point number \ is 1; Ex is the exponent of the floating point number, expressed in 8 bits;% is the floating point number Mantissa, expressed in 24 bits, and i $ 牝 &lt; 2. In order to find Y, X needs to be divided into an integer part represented by 8 bits, and a fraction part represented by 23 bits. Among them, • The shift device x is set to 12 to receive the floating-point exponent Εχ and The mantissa% of the floating-point number is input, and the mantissa of the floating-point number is shifted according to the exponent of the floating-point number χ. For example, when the exponent of the floating-point number is a positive integer, the mantissa of the floating-point number is based on the positive integer. ^ Shift to the left, for example: if the exponent Εχ of the floating-point number is 5, the tail of the floating-point number is shifted to the left by 5 bits. When the exponent EF of the floating-point number is a negative integer, the f The mantissa mx is shifted to the right 'for example: the exponent of the floating-point number &amp; is ", then the mantissa mx of the western point is shifted to the right by 1 bit, and the shifting device 2 generates a shifting knife number 4 Fsc and a shift Bit integer part Isc output. Detection device 1 4

579482 五、發明說明(8) 测移位梦W 1 9+ 該錯誤訊息Err包括移益:裝置自 12/益位時發出^ ^ 的卩4· ±括溢位訊息和向下溢位訊息。當浮點數 時即I i / ,洋點數的尾數%向左移超過7位元,此 數的尾數m’::銘包。當浮點數的指數仏小於_23時,浮點 ,的尾數》nx向右移超過23位元 ΐ數,幹定入裝置16且用:接收移位整數部份1二及:二二夺 :i: fr, ,r/;: ^^ ^ 換,-以 數運算結果Y的指數Ey (參考第6式^。而整數部份即為指 接著,把分數部份Fx分成3個 位元和7位元,依續將每_個部份H =別為8位元、8 、24中,並在每一個指數对照表中⑨產私數對照表20、22 每一個指數表的輸出結果輪入忝_生一輸出結果,再將 果Y的尾數my。 ]入…3&quot;產生指數運算結 根據第7式: my =2Fx =n2Ai2NiN = nTi i i 在此實施例中,1 $ i g 3,h1 I鲁 以: .、、、9數對照表的個數,所 X 2α3·2^579482 V. Description of the invention (8) Measure shift dream W 1 9+ The error message Err includes shift benefit: the device sends ^ 4 ^ ^ including overflow message and downward overflow message from 12 / benefit position. When the floating point number is I i /, the mantissa% of the western point is shifted to the left by more than 7 bits. The mantissa of this number is m ':: Mingbao. When the exponent 仏 of the floating-point number is less than _23, the floating-point mantissa "nx is shifted to the right by more than 23-bit ΐ, and is fixed into the device 16 and used to: receive the shifted integer part 12 and: 22 : I: fr,, r /;: ^^ ^ change,-exponent Ey of the result Y of the number operation (refer to formula 6 ^. And the integer part is the next, then the fraction part Fx is divided into 3 bits And 7 digits, successively _ each part H = 8 bits, 8 and 24, and in each index comparison table, the private number comparison table 20, 22 output results of each index table In turn, the output result of the __ is generated, and then the mantissa of the fruit Y is entered into [3] to generate the exponential operation knot according to the seventh formula: my = 2Fx = n2Ai2NiN = nTi ii In this embodiment, 1 $ ig 3, h1 I Lu Yi:. ,,, 9, the number of comparison table, so X 2α3 · 2 ^

Wly == I~[Ti = Τι x Τ2 x Τ3 = 2^1 ^ X 2^2 2~16 mi 0702-7516TWF ; 90P130 ; Ellen.ptd $ 11頁 (9) 579482 五、發明說明(9) a中Tl 2 ’且Αι為分數部份Fx分成的3個部份中的 fL—r二,一8位元的數字’· T2=,,且心為分數部 χ刀成的3個部份中的第二部份,為一8位元的數 Τ3=2^*2&quot;23 、 ,且、為分數部份Fx分成的3個部份中的最後一部 仍’為一 7位元的數字。 因為指數運算結果γ都為正數, 符號數Sy為零(參考第8式)。 4數運异結果Y的 干车ί V後,W用〜、Ιχ ’以及Sy表示指數運算灶果Y,立矣 不法為Y=(-i)Sy .2Ey .m , ,异、,,口 果Y,其表 號數、Ey為該指數運糞^要、中β亥扣數運算結果的符 的尾數且1 “y&lt;2。 的心數、%為該指數運算結果 雖然本發明p LV &amp; /4_ _ t 限定本發明,•何I :2:揭路如上’然其並非用以 和範圍内,當可作:許之Li不脫離本發明之精神 範圍當視後附之申請專利範圍;界定者=本發明之保護Wly == I ~ [Ti = Τι x Τ2 x Τ3 = 2 ^ 1 ^ X 2 ^ 2 2 ~ 16 mi 0702-7516TWF; 90P130; Ellen.ptd $ 11 pages (9) 579482 V. Description of the invention (9) a Where Tl 2 'and Αι are fL-r in the three parts divided by the fractional part Fx, an 8-bit number' · T2 =, and the heart is in the 3 parts formed by the fractional part χ. The second part is an 8-bit number T3 = 2 ^ * 2 &quot; 23, and the last of the 3 parts divided by the fractional part Fx is still 'a 7-bit number . Because the results of the exponential operation γ are all positive numbers, the sign number Sy is zero (refer to Equation 8). After counting the number of different results of the dry car Y of V, W uses ~, Ιχ ', and Sy to represent the exponential operation of the fruit Y, which is incorrectly Y = (-i) Sy. 2Ey.m, ,,,,,,,,, If Y, the number of the table number and Ey are the mantissa of the exponent, the mantissa of the result of the β-Hyde number calculation result, and 1 "y &lt; 2. The heart number and% are the results of the index calculation. Although the present invention p LV &amp; / 4_ _ t Limits the invention, • Ho I: 2: Open the road as above, but it is not used within the scope, when it can be done: Xu Zhi Li does not depart from the spirit of the invention, as the attached patent Scope; Definer = Protection of the invention

0702-7516TW ; 90P130 ; Ellen.ptd 579482 ----— 圖式簡單說明 明顯::讓本發明之上述和其他目的、Γ^ 坪細說明如下·· 配合所附圖示更 第1圖表示習知單一精 ^ 作 铪士- 積確32位几格彳主- 圖 第2圖表示本發明浮點數的指數運i ΐ示法的示意圖 連^裝置之架構示意 第3圖表示本發明轉換裝置之 立 第4圖表示本發明實施例 =:。 架構示意圖。 數的指數運算裝置之 符號說明: Μ、Α〜浮點數的尾數; E、Ex〜浮點數的指數; S、Sx〜符點數的符號數; Ix〜整數部份;0702-7516TW; 90P130; Ellen.ptd 579482 ----- Simple and clear explanation of the drawings: To make the above and other purposes of the present invention, the detailed description of Γ ^ is as follows: · The accompanying figure is shown in Figure 1. Knowing a single master ^ Working master-Accurate 32 bits and several masters-Figure 2 shows a schematic diagram of the exponential operation of the floating-point number of the present invention, and the schematic diagram of the device structure Figure 3 shows the conversion device of the present invention FIG. 4 shows an embodiment of the present invention. Schematic diagram. Symbol description of the exponential operation device of the number: Μ, A ~ the mantissa of the floating point number; E, Ex ~ the exponent of the floating point number; S, Sx ~ the sign number of the sign; Ix ~ the integer part;

Fx〜分數部份; 1 0〜轉換裝置; 1 2〜移位裝置; 14〜檢測裝置; 1 6〜決定裝置; 20ι—20κ〜指數對照表; 30〜乘法器;Fx ~ fraction part; 10 ~ conversion device; 12 ~ shift device; 14 ~ detection device; 16 ~ decision device; 20ι-20κ ~ index comparison table; 30 ~ multiplier;

Fsc〜移位分數部份;Fsc ~ shift fraction part;

Isc〜移位整數部份輸出; Err〜錯誤訊息;Isc ~ shifted integer part output; Err ~ error message;

579482579482

0702-7516TWF ; 90P130 ; Ellen.ptd 第14頁0702-7516TWF; 90P130; Ellen.ptd p. 14

Claims (1)

579482 六、申請專利範圍 ?盎」· 一種净點數的指數運算穿詈田法… 為底的一指數運算結果,:,用於獲付-洋點數以 2x · % .,該指數運苴钍軍从1』數的表示法為卜〗)&amp; 其 以為以;運算結果的表示法為(η χ為》亥汙點數的符號數、s 〈川2 my,: 數、Ex為該浮點數的指數、y工二二數運算結果的符號 %為該浮點數的尾數 5運算結果的指數、 $mx&lt;2、1幺m &lt;?,兮妆★ 心數運鼻結果的尾數且1 一轉換:y; s亥指數運算裝置包括: 點數的指數:及上】士述浮點數的符號數、上述浮 換成-整數部份和ϊ:=: =輸入,將上述浮點數轉 Nπ,每乂V數1具接有收\、』;二 入^且查表產生-輸出結果接μ中的一份輪 果幹入乘2方用以接收上述每-個指數對照表的輸出# 果輸入,並且產生上述指數運算結果的尾數; 出結 罢上述轉換裝置輸出的整數部份為上述指數運篡紐 μ Λ :述指數運算結果的符號數其值為零,且 Ν、Κ、、Κ2.....ΚΝ為自然數。 且上迷 置2直專利範圍第1項所述之浮點數的指數運算f 置,其中該轉換裝置包括: 异衷 一移位裝置,用以接收上述浮點數的指數以 點數的尾數輸入,依據上述浮點數的 J = 尾數移位,並且產生一移位分數部份和一移位 _ 0702-7516TW ; 90P130 ; Ellen.ptd 第15頁 579482 六、申請專利範圍 出;以及 一決定裝置,用以接收上述移位整數部份以及上述浮 點數的符號數輸入,並且依據上述浮點數的符號數決定上 述移位整數部份的正負號以產生上述整數部份。 3·如申請專利範圍第2項所述之浮點數的指數運算裝 置’更包括一檢測裝置,用以檢測上述移位裝置,在”上述 移位裝置溢位時發出一錯誤訊息。 a 置 4.如申請專利範圍第2項所述之浮點數的指數運算裝 其中該移位分數部份為上述分數部份。 、 置 置 5·如申請專利範圍第2項所述之浮點數的指數運算裝 其中該移位分數部份的值大於等於零,小於丨。^ 6·如申請專利範圍第丨項所述之浮點數的指數運算裝 其中該分數部份的值大於等於零,小於1。 7·如申請專利範圍第1項所述之浮點數的指數運算裝 其中上述指數對照表為預先建立以2為底的指數對^ 置 t如申請專利範圍第丨項所述之浮點數的指數運 A的於、入中述第土個指*表接收上述分數部份中的第i部、份 Ai的輸入,上述分數部份具有N位元,Αι具有乂位元,其: 出結果乃為:Ti=2A’N,其中土為自然數。 置Λ ί:: ί利範圍第1項所述之浮點數的指數運算裝 〇,去、上述%%/點數為正數時’上述浮點數的符號數為 田过序點數為負數時,上述浮點數的符號數為工0 ·、、 第16頁 0702-7516TWF ; 90Ρ130 ; Ellen.ptd 579482579482 VI. Scope of patent application? Angstrom "· An exponential calculation method of exponential calculation of net points ... The result of an exponential calculation based on: used to get paid-the number of foreign points is 2x ·%. The index operates The expression of the 钍 jun from the number 1 ′ is〗) & It is assumed that the expression of the operation result is (η χ is the symbol number of 亥 stain number, s s 2 my,: number, Ex is the floating number The exponent of the points, the sign% of the two-digit operation result is the exponent of the floating-point number, the exponent of the 5 operation result, $ mx &lt; 2, 1 幺 m &lt;?, Makeup And 1-to-1 conversion: y; s Hai index calculation device includes: exponent of points: and above] the number of symbols of floating-point numbers described above, the above floating-to-integer part and ϊ: =: = input, the above floating-point Points are converted to Nπ, and each 乂 V number is received, \, 『; two into ^ and the look-up table is produced-the output result is connected to one of the rounds in μ, multiplied by 2 to receive each of the above index comparisons. The output # of the table is input, and the mantissa of the above-mentioned exponential operation result is generated; the integer part of the output of the conversion device is the above-mentioned exponential operation μ Λ: The number of the sign of the exponential operation result is zero, and N, K, K2 ... KN is a natural number, and the exponent of the floating-point number described in the first straight patent range The operation f is set, wherein the conversion device includes: a disagreement-shifting device for receiving the exponent of the floating-point number and inputting the mantissa of the point, shifting according to the floating-point number J = mantissa, and generating a shift Fractional part and a shift _ 0702-7516TW; 90P130; Ellen.ptd page 15 579482 VI. Patent application scope; and a determining device for receiving the shifted integer part and the number of symbols of the floating point number Input and determine the sign of the shifted integer part according to the sign of the floating-point number to generate the integer part. 3. The exponential arithmetic device for floating-point numbers as described in item 2 of the scope of patent application, further includes A detection device for detecting the above-mentioned shifting device, and an error message is issued when "the above-mentioned shifting device overflows." The digit fraction part is the above Fractional part., Set 5. The exponential operation of the floating-point number as described in item 2 of the scope of patent application, where the value of the shifted fractional part is greater than or equal to zero, and less than 丨. ^ 6 · As the item of scope of patent application The exponential operation of the floating-point number is set in which the value of the fractional part is greater than or equal to zero and less than 1. 7. The exponential operation of the floating-point number according to item 1 of the scope of patent application, wherein the above-mentioned index comparison table is established in advance The exponent pair with a base of 2 is set as the exponent of the floating-point number described in item 丨 of the scope of the patent application. The first index of A is included in the above-mentioned index. The table receives the i part of the above fraction, For the input of Ai, the above fraction has N bits and Aι has 乂 bits. The result is: Ti = 2A'N, where soil is a natural number. Set Λ ί :: The exponential operation of the floating-point number described in item 1 of the profit range is 0. When the above %% / point is positive, the sign of the floating-point number is a negative number. , The sign number of the above floating-point number is 0, 0, 0, 70, 7516TWF; 90P130; Ellen.ptd 579482 1 〇 ·如申請專利範圍第1項 置’其中因為上述指數運算結 運算結果的符·號數為零。 所述之浮點數的指數運算裝 果但為正數,所以上述指數 11 · 一種浮點數的指數運算方法 以2為底的一指數運算結果,該浮點 2Εχ · mx,其中sx為該浮點數的符號數 數、mx為該浮點數的尾數且1 下列步驟: X ’用於獲得一浮點數 數的表示法為(-l)Sx · ' Ex為該浮點數的指 該指數運算方法包括 將上述浮點數的符號數、上 浮點數的尾數輸入一轉換裝置中 在上述轉換裝置中把上述浮 一分數部份; ^點數的指數以及上述 點數轉換成一整數部份和 一將上述分數部份分成1(個部份 位元,每一部份分別具有〜、N2、· …+ NK,每一個指數表接收上述反部 查表產生一輸出結果; 將上述每一個指數表的輪出結 一尾數;以及 ’上述分數部份具有N個 ··、Νκ 位元,且N = Ni+N2 + 伤中的一份輸入,並且 果輸入一乘法器中產生· 地尾數、 上迷整數部份,ΐ 數表不上述指數運算結果,該指數 (~1 )Sy · 2Ey · m ,复中ς盔兮兮太 4 y 八中Sy為5亥符號數、e %為上述輸出尾數,1 SmY〈2,且上 KN為自然數。 上迷N 一值為零的符號 果的表示法為 上述整數部份、 、、K2、···、 12. 如申請專利範圍第1 i 項所述之浮點數的指數運算1 〇 If item 1 of the scope of patent application is set to ′, the number of symbols and signs in the result of the exponential operation is zero. The exponential operation of the floating-point number is presumed to be a positive number, so the above-mentioned exponent 11 · An exponential operation method of a floating-point number base 2 is an exponential operation result, the floating-point 2Eχ · mx, where sx is the floating-point number The sign of the point number, mx is the mantissa of the floating point number and 1 The following steps: X 'The expression used to obtain a floating point number is (-l) Sx ·' Ex is the floating point number means the The exponential operation method includes inputting the sign of the floating-point number and the mantissa of the floating-point number into a conversion device, and converting the floating-point fraction in the conversion device; ^ the exponent of the number of points and converting the point to an integer portion And one divides the above fractional part into 1 (partial bits, each part has ~, N2,… + NK, each index table receives the above-mentioned reverse lookup table to produce an output result; An exponential table with a mantissa; and 'The fractional part above has N ..., Nκ bits, and N = Ni + N2 + one of the damages, and the result is grounded in a multiplier. Mantissa, the integer part of the fan, ΐ number table is not the above As a result of the number operation, the exponent (~ 1) Sy · 2Ey · m, the complex middle helmet is too high. 4 y Eight middle Sy is the number of 5 Hai symbols, e% is the above output mantissa, 1 SmY <2, and the upper KN is Natural numbers. The expression of the symbolic fruit with a value of N is zero is the above integer part, ,, K2, ..., 12. The exponential operation of floating point numbers as described in item 1 i of the scope of patent application. 579482 /、申清專利範圍 $去’其中在上述轉換裝置中把上述浮點數表示成一整數 4份和一分數部份的步驟包括下列子步驟; f 利用一移位裝置,接收上述浮點數的指數以及上述浮 =數的尾數輸入,依據上述浮點數的指數將上述浮點數的 ,數移位’並且產生一移位分數部份和一移位整數部份輸 出;以及 利2 —決定裝置,接收上述移位整數部份以及上述浮 點數的符號數輸入,並且依據上述浮點數的符號數決定上 述移位整數部份的正負號以產生上述整數部份。 、1 3 ·如申請專利範圍第1 2項所述之浮點數的指數運算 ft ’其中在上述轉換裝置中把上述浮點數表示成一整數 ^份和一分數部份的步驟更包括子步驟; 利用仏測裝置’在上述移位裝置溢位時發出上述供 誤訊息。 荷 1 4 ·如申請專利範圍第1 2項所述之浮點數的指數運算 方法’其中該移位分數部份為上述分數部份。 、1 5 ·如申請專利範圍第1 2項所述之浮點數的指數運算 方法’其中該移位分數部份的值大於等於零,小於1。 、1 6 ·如申請專利範圍第11項所述之浮點數的指數運算 方法’其中該分數部份的值大於等於零,小於1。 、1 7·如申請專利範圍第11項所述之浮點數的指數運〜 方法,其中上述指數對照表為顇先建立以2為底的指= 照袅。 I對 1 8·如申請專利範圍第1 1項所述之浮點數的指數運算579482 /, claiming that the patent scope $ goes' where the above-mentioned floating-point number is represented by an integer 4 and a fractional part in the above conversion device includes the following sub-steps; f uses a shift device to receive the above-mentioned floating-point number The exponent of the floating-point number and the mantissa input of the number, shift the number of the floating-point number according to the exponent of the floating-point number, and generate a shifted fraction part and a shifted integer part output; and Lee 2 — The determining device receives the input of the shifted integer part and the sign number of the floating point number, and determines the sign of the shifted integer part according to the sign of the floating point number to generate the integer part. 1, 3 · The exponential operation of the floating-point number as described in Item 12 of the patent application range ft ', wherein the step of representing the floating-point number as an integer ^ and a fraction in the conversion device further includes sub-steps ; Use the detection device 'to send the above error message when the shift device overflows. Charge 1 4 · The exponential operation method for floating point numbers as described in item 12 of the scope of the patent application, wherein the shift fraction part is the above fraction part. 1, 15 · The exponential arithmetic method for floating-point numbers as described in Item 12 of the scope of patent application, wherein the value of the shift fraction is greater than or equal to zero and less than 1. 1, 16 · The exponential arithmetic method for floating-point numbers as described in item 11 of the scope of patent application, wherein the value of the fractional part is greater than or equal to zero and less than 1. 17. The method of exponential operation of a floating point number as described in item 11 of the scope of the patent application, wherein the index comparison table above is to first establish a base 2 index = photo. I to 1 8 · Exponential operation of floating point numbers as described in item 11 of the scope of patent application 六、申請專利範圍 方法,其中上述第i個指數 、 部 其 份Ai的輸入,上述分數 1上述分數部份中的第i 1伤/、有N位元,Ai具有^伋元, 輸出結果乃為:Ti==2绛2Ni-N ^ · ’ 1 9如申古主袞丟丨丨梦 八中i為自然數。 方法,a中:上、成、範圍第11項所述之浮點數的指數運算 為〇,舍、子點數為正數時,上述浮點數的符號數 '9η* 1'子數為負數時,上述浮點數的符號數為1。 後如中請專利範圍第u項所述之浮點數的指數運算 I法Μ 、中因為上述指數運算結果恆為正數,所以上述指 數運算結果的符號數為零。6. The method of applying for a patent scope, in which the i-th index mentioned above is part of the input of Ai, the i-th score in the above-mentioned fraction 1 is above /, there are N bits, and Ai has ^ divisors, and the output result is It is: Ti == 2 绛 2Ni-N ^ · '1 9 As Shen Guzhu 衮 丨 i is a natural number. Method, in a: the exponent operation of the floating-point number described in item 11 of the upper, the upper and the lower ranges is 0, and when the round and sub-point numbers are positive, the sign of the above floating-point number '9η * 1' is a negative number In this case, the sign of the floating-point number is one. The exponent operation I of the floating-point numbers described in the patent application, u method I, is described later. Because the above exponential operation result is always a positive number, the sign number of the above index operation result is zero. 0702-7516TWF ; 90Ρ130 ; Ellen.ptd 第19頁0702-7516TWF; 90P130; Ellen.ptd page 19
TW91115788A 2002-07-16 2002-07-16 Exponent operation device and method for floating point number TW579482B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW91115788A TW579482B (en) 2002-07-16 2002-07-16 Exponent operation device and method for floating point number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW91115788A TW579482B (en) 2002-07-16 2002-07-16 Exponent operation device and method for floating point number

Publications (1)

Publication Number Publication Date
TW579482B true TW579482B (en) 2004-03-11

Family

ID=32924096

Family Applications (1)

Application Number Title Priority Date Filing Date
TW91115788A TW579482B (en) 2002-07-16 2002-07-16 Exponent operation device and method for floating point number

Country Status (1)

Country Link
TW (1) TW579482B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI394077B (en) * 2008-04-10 2013-04-21 Via Tech Inc Apparatus and method for optimizing the performance of x87 floating point addition instructions in a microprocessor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI394077B (en) * 2008-04-10 2013-04-21 Via Tech Inc Apparatus and method for optimizing the performance of x87 floating point addition instructions in a microprocessor

Similar Documents

Publication Publication Date Title
Vahdat et al. TruncApp: A truncation-based approximate divider for energy efficient DSP applications
JP3541066B2 (en) Method and apparatus for performing division and square root calculations in a computer
US9582248B2 (en) Standalone floating-point conversion unit
CA2530015C (en) Division and square root arithmetic unit
JP5640081B2 (en) Integer and multiply-add operations with saturation
TWI754680B (en) Apparatus and method of generating starting estimate, manufacturing method and testing method
Jaiswal et al. Area-efficient architecture for dual-mode double precision floating point division
TW579482B (en) Exponent operation device and method for floating point number
JP7044528B2 (en) Leading Zero Forecast
Tay et al. New algorithm for signed integer comparison in four-moduli superset {2 n, 2 n− 1, 2 n+ 1, 2 n+ 1− 1}
San et al. Hardware implementation of floating-point operating devices by using IEEE-754 binary arithmetic standard
CN112783471A (en) Device and method for calculating sine, cosine and arc tangent functions based on CORDIC algorithm
JP7191797B2 (en) Arithmetic circuit
Saremi et al. Efficient 1-out-of-3 Binary Signed-Digit multiplier for the moduli set {2 n-1, 2 n, 2 n+ 1}
Phalguna et al. Novel RNS-to-binary converters for the three-moduli set {2 m− 1, 2 m, 2 m+ 1}
Latha et al. Residue-to-Binary converters for the seven moduli set {2 n-5-1, 2 n-3-1, 2 n-2+ 1, 2 n-1-1, 2 n-1+ 1, 2n, 2 n+ 1} for n even
Chittaluri Implementation of area efficient IEEE-754 double precision floating point arithmetic unit using Verilog
WO2013081484A1 (en) Unified computation systems and methods for iterative multiplication and division
Shahrbanoonezhad et al. Residue Number system Sign Detector Design based on Dynamic Range Partitioning.
Gopal Design and performance analysis of high throughput and low latency double precision floating point division on FPGA
JPH0778724B2 (en) Divider
Palsodkar et al. Three operand fused floating point add-subtract unit using redundant adder
Al-Khateeb Design of an ALU for RNS Using CMOS Technology
JP3100868B2 (en) Arithmetic unit for floating point numbers
TWI232400B (en) Method and apparatus for binary number conversion

Legal Events

Date Code Title Description
GD4A Issue of patent certificate for granted invention patent
MM4A Annulment or lapse of patent due to non-payment of fees