JPS61216025A - Generating circuit for approximate function value - Google Patents

Generating circuit for approximate function value

Info

Publication number
JPS61216025A
JPS61216025A JP60057483A JP5748385A JPS61216025A JP S61216025 A JPS61216025 A JP S61216025A JP 60057483 A JP60057483 A JP 60057483A JP 5748385 A JP5748385 A JP 5748385A JP S61216025 A JPS61216025 A JP S61216025A
Authority
JP
Japan
Prior art keywords
value
data
approximate
function
binary number
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP60057483A
Other languages
Japanese (ja)
Other versions
JPH0433071B2 (en
Inventor
Masayuki Tanaka
昌幸 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP60057483A priority Critical patent/JPS61216025A/en
Publication of JPS61216025A publication Critical patent/JPS61216025A/en
Publication of JPH0433071B2 publication Critical patent/JPH0433071B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/02Digital function generators
    • G06F1/03Digital function generators working, at least partly, by table look-up
    • G06F1/035Reduction of table size

Abstract

PURPOSE:To calculate an approximate function speedily with high efficiency by small hardware by providing a small-capacity memory, a subtracting means, a multiplying means which is increased in efficiency by it, and an adding means. CONSTITUTION:The 1st part with a heavy-weight value y0 and the 2nd part with a lightweight value y1 are extracted from a binary number Y and the 1st part is used as an address to read the memory 10. The memory 10 is stored with an approximate value of a function (f) at the value obtained by adding a value a half as large as the weight omega0 of the low-order bits of the value Y0 to the value y0 and an approximate value of its primary coefficient of differentiation as the 1st data and the 2nd data respectively. The most significant digit bit of the value Y1 of the 2nd read part to generate a new binary number y1' with a sign by the subtracter 40 and this number y1' and the 1st data are multiplied mutually by the multiplier 20 to calculate a correcting value; and the 1st data is added to this correcting value by the adder 30 to perform correction arithmetic, thereby outputting an approximate function value for the function (f) of the binary number Y.

Description

【発明の詳細な説明】 「産業上の利用分野」 この発明は二進数YC対する関数fの近似値を生成する
近似関数値生成回路(:関する。
DETAILED DESCRIPTION OF THE INVENTION "Industrial Application Field" The present invention relates to an approximate function value generation circuit (:) that generates an approximate value of a function f for a binary number YC.

「従来の技術」 従来、この種の近似関数値生成回路は、内容として指定
アドレスC:対する近似関数値をたくわえたメモリを用
意し、関数値を求めたい値でそのメモリのアドレス指定
を行い、内容を読出すこと(;より近似関数値を求める
第1の方式のものと、関数値乞計算(二より求めるため
の計算用ハードウェアを用いる第2の方式のものとが一
般的であった。
``Prior Art'' Conventionally, this type of approximation function value generation circuit prepares a memory in which the approximation function value for a designated address C: is stored, and specifies the address of the memory with the value for which the function value is to be obtained. The first method is to read out the contents (; the first method is to obtain an approximate function value, and the second method is to use calculation hardware to obtain the function value by calculating the function value. .

「発明が解決しようとする問題点」 前者の第1の方式は関数値を求めようとする数値の桁数
が増大するC二つれ、必要とするメモリのアドレス指定
数が指数関数的に増大する、これに伴って必要なメモリ
容量も又指数関数的に増大するという欠点があった。
``Problems to be solved by the invention'' In the first method, the number of digits of the numerical value for which the function value is to be determined increases; However, along with this, the required memory capacity also increases exponentially.

一方、後者の第2の方式C二よれば近似関数値を得るま
での時間が犬であり、又近似関数値生成シーケンスも複
雑となりがちであるという欠点があった。
On the other hand, the latter second method C2 has disadvantages in that it takes a long time to obtain the approximate function value, and the approximate function value generation sequence tends to be complicated.

「問題点を解決するための手段」 この発明によれば二進数Yから重みの重い値y0を持つ
第一の部分及び重みの軽い値y1を持つ第二の部分が取
出され、その第一の部分をアドレスとしてメモリが読み
出される。そのメモリには前記y0t=そのy。の最下
位ビットの重みω。の−の値イを加えた値y。+す(二
おける関数fの近似値金(y0+”JL )と、その第
一次微係数の近似値仝町yo + ” )とがそれぞれ
第一のデータ及び第二のデータとして記憶されである。
"Means for Solving the Problem" According to the present invention, a first part having a heavily weighted value y0 and a second part having a lightly weighted value y1 are extracted from a binary number Y. The memory is read using the part as an address. In that memory, said y0t=that y. The weight of the least significant bit of ω. The value y is the sum of the negative value i. The approximate value of the function f (y0+"JL) and the approximate value of its first derivative coefficient yo+" are stored as the first data and the second data, respectively. .

前記読み出された第二の部分の値y1からそのylの最
上位ビットを反転することにより新たな符号付二進数y
:が減算手段で生成され、この符号付二進数y:及び前
記読み出された第二のデータは乗算手段で互(二乗算さ
れて補正値が計算され、この補正値と前記読み出された
第一のデータは加算手段で加算されて補正演算が行われ
、前記二進数Yの関数f c対する近似関数値が出力さ
れる。
A new signed binary number y is obtained from the read second part value y1 by inverting the most significant bit of yl.
: is generated by the subtraction means, and this signed binary number y: and the read second data are mutually (squared) by the multiplication means to calculate a correction value, and this correction value and the read second data are The first data is added by an adding means, a correction operation is performed, and an approximate function value for the function f c of the binary number Y is output.

「実施例」 次(二この発明C二ついて図面を参照して説明する。"Example" Next (2) This invention C will be explained with reference to the drawings.

第1図はこの発明の一実施例の近似関数値生成回路を示
す。メモリー0は二進数の数値Yの第一の部分(重みの
重い値yo)を線1を介し入力し、これに応じて読み出
されたデータ中の第一のデータを線101 C1第二の
データを線102 Cそれぞれ出力するものである。前
記第一のデータは前記yoと、そのyoの最下位ビット
の重みω0のΣの値C二おける関数fの微係数の近似値
仝(11(Yo 十飄)である。減算器40は数値Yの
第二の部分(重みの軽い値yt)の最上位ビットを反転
し、新たな符号付二進数y:として線401(−出力す
るものであり、乗算器20は線401よりの二進数y;
を、又メモリー0からの第二のデータを受け、これらを
互に乗することにより数値Yの補正値を計算して線20
1(二出力するものであり、加算器30はメモリ10か
らの第一のデータ及び乗算器20からの補正値を受け、
両者を加算することにより補正を行い、最終結果である
数値Yの近似関数値を出力するものである。
FIG. 1 shows an approximate function value generation circuit according to an embodiment of the present invention. Memory 0 inputs the first part of the binary number Y (value yo with heavy weight) through line 1, and inputs the first data among the read data accordingly to line 101 C1 second part Data is output to each line 102C. The first data is the approximate value of the differential coefficient of the function f in the value C2 of Σ of the weight ω0 of the least significant bit of the yo (11 (Yo 10)).The subtracter 40 is a numerical value The most significant bit of the second part of Y (value yt with light weight) is inverted and output as a new signed binary number y: on line 401 (-), and the multiplier 20 outputs the binary number from line 401. y;
, and also receives the second data from memory 0, and calculates the correction value of the numerical value Y by multiplying these by each other to obtain the line 20
1 (two outputs; the adder 30 receives the first data from the memory 10 and the correction value from the multiplier 20,
Correction is performed by adding the two, and the final result, which is the approximation function value of the numerical value Y, is output.

以下実例によりこの実施例の動作を説明するが、解り易
さのため、近似逆数生成回路として関数fはf:y−1
であり、数値Yが符号付二進数で2の補数により負の値
を表現するもので、必ず正規化されているものとし、メ
モリー0にはアドレス人力Y、−二対し、第一のデータ
として関数fの近似値1 / (yo +−7iL)の
近似値が12ピツトで、第二のデータとして関数fの第
一次微係数の7,1/(yo+V)2の近似値が10ビ
ツトでそれぞれ格納され、数値Yの第一の部分y0を先
頭(上位)から5ビツト、第二の部分y1を第6〜第9
ビツトとした場合≦二ついて説明する。
The operation of this embodiment will be explained below using an example. For ease of understanding, the function f is f:y-1 as an approximate reciprocal generator.
, the numerical value Y is a signed binary number that expresses a negative value using two's complement, and is always normalized, and memory 0 has the address Y, -2 as the first data. The approximate value of the function f, 1/(yo+-7iL), is 12 bits, and the second data is the approximate value of 7,1/(yo+V)2, the first derivative of the function f, is 10 bits. The first part y0 of the numerical value Y is stored as the 5 bits from the beginning (higher), and the second part y1 is stored as the 6th to 9th bits.
In the case of bits ≦ two, we will explain.

この場合メモリー0は数値Yの先頭から5ピツトの値y
。C二よりアドレス指定されるが、数値Yが正規化され
ている場合(二は、符号ビットの値がSであるとした時
、第2ピツトは必ず百であることから、実際(二は先頭
ビットはアドレス指定C二は用   ゛いる必要がなく
、第2ビツト目からの4ビツトによりアドレス指定を行
うものとする。この様子とメモI710の記憶内容とを
第2図C二示す。
In this case, memory 0 is the value y of 5 pits from the beginning of the number Y.
. The address is specified by C2, but if the numerical value Y is normalized (2 is the value of the sign bit S, the second pit is always 100, so in reality (2 is the first As for the bits, it is not necessary to use address designation C2, and the address designation is performed using the 4 bits starting from the second bit.This situation and the stored contents of the memo I710 are shown in FIG. 2C2.

ここでは初めC数値Yが符号付二進数0 、10011
010・・・の場合について順C:各部の動作を説明す
る。まず数値Yの第一の部分y0を規定する第2〜第5
ピツトの値1001が線1を介してメモリー0をアドレ
ス指定し、これを受けたメモリー0は二進値0.100
11の逆数の近似値である符号付二進値001,101
011110を数値Yの初期近似逆数(第一のデータ)
として線101に出力すると共に、関数f:y−1の二
進値0.10011における第一次の微係数の近似値1
01.0010101を第二のデータ(符号付二進値)
として線102に出力する。減算器40は数値Yの第二
の部分y1である値α、00001010の下位4ピツ
トとして値1010を線2を介し受け、その最上位ビッ
ト1を反転してOとして線401(二符号付二進値o、
ooooo。
Here, the initial C value Y is a signed binary number 0, 10011
010... Order C: The operation of each part will be explained. First, the second to fifth parts specifying the first part y0 of the numerical value Y.
The pit value 1001 addresses memory 0 via line 1, which receives the binary value 0.100.
Signed binary value 001,101 which is an approximation of the reciprocal of 11
011110 is the initial approximate reciprocal of the numerical value Y (first data)
is output on the line 101 as
01.0010101 as second data (signed binary value)
is output on line 102 as . The subtracter 40 receives the value 1010 as the lower 4 pits of the value α, 00001010, which is the second part y1 of the numerical value Y, through the line 2, and inverts the most significant bit 1 and outputs it as O on the line 401 (2 signed 2). advance value o,
ooooo.

10の下位4ビツトとしての値0010を出力する。Outputs the value 0010 as the lower 4 bits of 10.

乗算器20はこの値0010を線401を介し受け、又
関数(:y−1−の、二進値0.10011cおける第
一次の微係数の近似値(第二のデータ)101゜001
0101を線102を介して受け、両者を乗算すること
C:より数値Yの初期近似逆数の補正値。
The multiplier 20 receives this value 0010 via the line 401 and also calculates the approximate value (second data) of the first differential coefficient of the function (:y-1-) at the binary value 0.10011c 101°001
0101 via the line 102 and multiplying both C: Correction value of the initial approximation reciprocal of the numerical value Y.

111110100を符号付二進数として線201 C
出力する。最後に加算器30は線101を介し数値Yの
初期近似逆数(第一のデータ)001.1010111
10を受け、X線201を介し数値Yの初期近似逆数の
補正値、111110100を受け、必要(:応じ符号
の拡張を施して加算することC:より所望の数値Yの近
似逆数001.101010011を符号付二進数とし
て線301より出力する。
Line 201 C with 111110100 as a signed binary number
Output. Finally, the adder 30 passes through the line 101 the initial approximate reciprocal of the numerical value Y (first data) 001.1010111
10, receive the correction value of the initial approximate reciprocal of the numerical value Y through the X-ray 201, 111110100, and add it with sign extension as required (C: Approximate reciprocal of the desired numerical value Y 001.101010011 It is output from line 301 as a signed binary number.

次(二数値Yが符号付二進数1.00100101・・
・の場合(二ついて順に各部の動作を説明する。まず数
値Yの第一の部分y0を規定する第2〜第5ビツトの値
0010が線1を介してメモリー0をアドレス指定し、
これを受けたメモリー0は線101に二進値1.001
01の逆数の近似値(第一のデータ)である符号付二進
Ia110.110100001 をYの初期近似逆数
として出力すると共に線102c二は、関数(: y=
1の、二進値1.00101における第一次の微係数の
近似値(第二のデータ)110.1001100を符号
付二進値として出力する。減算器40は数値Yの第二の
部分y0である値o、ooo。
Next (binary value Y is signed binary number 1.00100101...
In the case of (2), we will explain the operation of each part in turn. First, the value 0010 of the second to fifth bits that defines the first part y0 of the numerical value Y specifies memory 0 via line 1,
Memory 0 receives this and has a binary value of 1.001 on line 101.
The signed binary Ia110.110100001, which is the approximate value (first data) of the reciprocal of 01, is output as the initial approximate reciprocal of Y, and the line 102c2 is a function (: y=
1, an approximate value (second data) of the first differential coefficient of 1.00101 in binary value 110.1001100 is output as a signed binary value. The subtractor 40 is the second part y0 of the number Y, the value o, ooo.

0101の下位4ビツトとして値0101を線2を介し
受け、その最上位ビットを反転して線401(二符号付
二進値1.11111101の下位4ビツトとしての値
1101を出力する。乗算器20はこの値を線401を
介し受け、又関数f:y−,−の、二進値1.′001
01における第一次の微係数の近似値110.1001
100を線102を介して受け、両者を乗算すること(
;より数値Yの初期近似逆数の補正値、0000010
001を符号付二進数として線201 C出力する。最
後≦二加算器30は線101を介して数値Yの初期近似
逆数110.110100001を受け、X線201を
介して数値Yの初期近似逆数の補正値、0000010
001を受け、必要(;応じ符号の拡張を施し、互(−
加算すること(二より所望の数値Yの近似逆数値110
.110101010を符号付二進数として線301よ
り出力する。
It receives the value 0101 as the lower 4 bits of 0101 on line 2, inverts its most significant bit and outputs the value 1101 as the lower 4 bits of the signed binary value 1.11111101 on line 401. Multiplier 20 receives this value via line 401, and also receives the binary value 1.'001 of the function f: y-,-.
Approximate value of the first differential coefficient at 01 110.1001
100 via line 102 and multiplying them both (
; Correction value of the initial approximate reciprocal of the numerical value Y, 0000010
001 is output on line 201C as a signed binary number. The last≦2 adder 30 receives the initial approximate reciprocal of the numerical value Y via the line 101, 110.110100001, and receives the correction value of the initial approximate reciprocal of the numerical value Y, 0000010 via the X-ray 201.
001, apply sign extension as necessary (; and reciprocal (-)
Adding (approximate inverse value 110 of the desired value Y from 2)
.. 110101010 is output from line 301 as a signed binary number.

尚、各構成要素出力の算出ビット長及び小数点の位置等
は、所望の条件に応じ適宜定まることは言うまでもない
It goes without saying that the calculated bit length, decimal point position, etc. of each component output can be determined as appropriate depending on desired conditions.

「発明の効果」 以上説明したようにこの発明は、初期近似関数値を求め
るの(;必要な小容量のメモリ手段と、わずかな金物量
の減算手段と、それにより効率化された乗算手段及び加
算手段という単純且つ小規模な回路構成により、少ない
金物量で且つ高速、高効率(;近似関数値を算出するこ
とができる効果がある。
``Effects of the Invention'' As explained above, the present invention provides a method for determining the initial approximation function value. The simple and small-scale circuit configuration of the addition means has the effect of being able to calculate the approximate function value with a small amount of metal, at high speed, and with high efficiency.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はこの発明の近似関数値生成回路の実施例を示す
ブロック図、第2図は第1図中のメモリ10のアドレス
とその内容とを示す図である。 10:メモリ、20:乗算器、30:加算器、40:減
算器。 特許出願人  日本電気株式会社 代  理  人   草  野     卓手続補正書 (自発) 昭和61年6月4日 特許庁長官 殿         リ 1、事件の表示  特願昭60−574832、発明の
名称  近似関数値生成回路3、補正をする者 事件と
の関係   特許出願人日本電気株式会社 4、代 理 人  東京都新宿区新宿四丁目2番21号
相模ビル (置  03−350−6456)6、補正
の内容 (11明細書4頁9行「線1を介し人力し、」を(2)
同書4頁17行「減算器40は数値Yの」を「減算器4
0は線2を介して供給される数値Yの」と訂正する。 以   上
FIG. 1 is a block diagram showing an embodiment of the approximate function value generation circuit of the present invention, and FIG. 2 is a diagram showing the addresses and contents of the memory 10 in FIG. 1. 10: memory, 20: multiplier, 30: adder, 40: subtracter. Patent applicant NEC Corporation Attorney Taku Kusano Procedural amendment (spontaneous) June 4, 1985 Director General of the Patent Office Li1, Indication of case Patent application 1986-574832, Title of invention Approximate function value generation Circuit 3, Person making the amendment Relationship to the case Patent applicant NEC Corporation 4, Agent Sagami Building, 2-21 Shinjuku 4-chome, Shinjuku-ku, Tokyo (03-350-6456) 6, Contents of the amendment ( 11 Specification, page 4, line 9, “Manually operated via line 1” (2)
The same book, page 4, line 17, ``Subtractor 40 is the number Y'' is changed to ``Subtractor 4
0 is the value Y supplied via line 2. that's all

Claims (1)

【特許請求の範囲】[Claims] (1)二進数Yから重みの重い値y_0を持つ第一の部
分及び重みの軽い値y_1を持つ第二の部分を取出す手
段と、 前記第一の部分をアドレスとして入力することにより前
記y_0にそのy_0の最下位ビットの重みω_0の1
/2の値ω_0/2を加えた値y_0+ω_0/2にお
ける関数fの近似値■(y_0+ω_0/2)及びその
第一次微係数の近似値■^(^1^)(y_0+τ_0
/2)をそれぞれ第一のデータ及び第二のデータとして
出力するメモリ手段と、前記第二の部分の値y_1から
そのy_1の最上位ビットを反転することにより新たな
符号付二進数y′_1を生成する減算手段と、 その符号付二進数y′_1及び前記第二のデータを受け
、これらを互に乗算することにより補正値を計算して出
力する乗算手段と、 前記第一のデータ及び前記補正値を入力して互に加算す
ることにより補正を行い、前記二進数Yに対する前記関
数fの近似関数値を出力する加算手没とを有することを
特徴とする近似関数値生成回路。
(1) means for extracting a first part having a heavily weighted value y_0 and a second part having a lightly weighted value y_1 from the binary number Y; The weight of the least significant bit of y_0 is 1 of ω_0
The approximate value of the function f at the value y_0+ω_0/2, which is the sum of the value ω_0/2 of
/2) as first data and second data, respectively, and a new signed binary number y'_1 is obtained from the value y_1 of the second part by inverting the most significant bit of y_1. a subtracting means for generating the signed binary number y'_1 and the second data, a multiplication means for calculating and outputting a correction value by multiplying these together; and the first data and An approximation function value generation circuit comprising: an adder that performs correction by inputting the correction values and adding them together, and outputs an approximation function value of the function f for the binary number Y.
JP60057483A 1985-03-20 1985-03-20 Generating circuit for approximate function value Granted JPS61216025A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60057483A JPS61216025A (en) 1985-03-20 1985-03-20 Generating circuit for approximate function value

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60057483A JPS61216025A (en) 1985-03-20 1985-03-20 Generating circuit for approximate function value

Publications (2)

Publication Number Publication Date
JPS61216025A true JPS61216025A (en) 1986-09-25
JPH0433071B2 JPH0433071B2 (en) 1992-06-02

Family

ID=13056954

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60057483A Granted JPS61216025A (en) 1985-03-20 1985-03-20 Generating circuit for approximate function value

Country Status (1)

Country Link
JP (1) JPS61216025A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57204931A (en) * 1981-06-12 1982-12-15 Nec Corp Nonlinear converter
JPS59109975A (en) * 1982-12-14 1984-06-25 Mitsubishi Electric Corp Function generating device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57204931A (en) * 1981-06-12 1982-12-15 Nec Corp Nonlinear converter
JPS59109975A (en) * 1982-12-14 1984-06-25 Mitsubishi Electric Corp Function generating device

Also Published As

Publication number Publication date
JPH0433071B2 (en) 1992-06-02

Similar Documents

Publication Publication Date Title
JPH01125626A (en) Reciprocal calculating method
JPH0713741A (en) Alpha resultant conputing element
JPS61216025A (en) Generating circuit for approximate function value
JP2009507413A (en) Full adder module and multiplier device using the full adder module
JPH02100717A (en) Fixed decimal point division system
JPS61216026A (en) Generating circuit for approximate function value
US5870322A (en) Multiplier to selectively perform unsigned magnitude multiplication or signed magnitude multiplication
JPS58129653A (en) Multiplication system
JPH076024A (en) Decimal number multiplier
JP3235125B2 (en) Digital signal processing circuit
JP2737933B2 (en) Division device
JPS58119045A (en) High-speed fixed number arithmetic circuit
JPS6259828B2 (en)
JPH01267728A (en) Multiplier
JP3538512B2 (en) Data converter
JP2889244B2 (en) Image processing device
JPH03240144A (en) Variable length data memory interface circuit
JP2960595B2 (en) Digital signal processor
Nikaidô New aspects of von Neumann’s model with special regard to computational problems
JP2834860B2 (en) Likelihood calculation method
JPH04182731A (en) Arithmetic method and arithmetic unit
JP2797773B2 (en) Reciprocal arithmetic unit
JPS63163485A (en) Power residue circuit
JPS63225864A (en) Cumulative computing element
JPS60129834A (en) Multiplier and divider