JP2010032762A - Arithmetic processing unit and method, and program - Google Patents

Arithmetic processing unit and method, and program Download PDF

Info

Publication number
JP2010032762A
JP2010032762A JP2008194689A JP2008194689A JP2010032762A JP 2010032762 A JP2010032762 A JP 2010032762A JP 2008194689 A JP2008194689 A JP 2008194689A JP 2008194689 A JP2008194689 A JP 2008194689A JP 2010032762 A JP2010032762 A JP 2010032762A
Authority
JP
Japan
Prior art keywords
power
value
mantissa
exponent
integer
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.)
Withdrawn
Application number
JP2008194689A
Other languages
Japanese (ja)
Inventor
Yukihiko Mogi
幸彦 茂木
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2008194689A priority Critical patent/JP2010032762A/en
Publication of JP2010032762A publication Critical patent/JP2010032762A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To precisely and easily compute an exponential. <P>SOLUTION: A mantissa/exponent separation part 101 separates an input value X=(1+X<SB>1</SB>/2<SP>23</SP>)×(2^X<SB>2</SB>) into a mantissa X<SB>1</SB>in a mantissa of a floating point, and an exponent X<SB>2</SB>in an exponential part. An integer/decimal separation part 102 separates a product (X<SB>2</SB>×Y)=X<SB>int</SB>×X<SB>amari</SB>of the exponent X<SB>2</SB>and an exponent Y into an integer X<SB>int</SB>and a decimal X<SB>amari</SB>. An exponential computing part 105 finds a computation value P=X<SP>Y</SP>=(1+X<SB>1</SB>/2<SP>23</SP>)<SP>Y</SP>×(2^X<SB>amari</SB>)×(2^X<SB>int</SB>), based on the mantissa X<SB>1</SB>, the integer X<SB>int</SB>and the decimal X<SB>amari</SB>. The exponential computing part 105 acquires therein an exponential value (1+X<SB>1</SB>/2<SP>23</SP>)<SP>Y</SP>of the mantissa of the input value X, and an exponential value (2^X<SB>amari</SB>) of a base of the input value, from a table, using the mantissa X<SB>1</SB>and the decimal X<SB>amari</SB>. The present invention is applicable for a quantization device. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は演算処理装置および方法、並びにプログラムに関し、特に、より精度よくべき乗の演算を行うことができるようにした演算処理装置および方法、並びにプログラムに関する。   The present invention relates to an arithmetic processing device and method, and a program, and more particularly, to an arithmetic processing device and method, and a program that can perform a power operation with higher accuracy.

オーディオ信号を符号化する方法として、MPEG(Moving Picture Expert Group)オーディオ規格が知られている。MPEG オーディオ規格には複数の符号化方式があるが、ISO/IEC(International Organization for Standardization/International Electrotechnical Commission) 13818-7にてMPEG-2オーディオ規格AAC(Advanced Audio Coding)という符号化方式が標準化されている。   The MPEG (Moving Picture Expert Group) audio standard is known as a method for encoding an audio signal. The MPEG audio standard has multiple encoding methods, but the ISO / IEC (International Organization for Standardization / International Electrotechnical Commission) 13818-7 standardized the MPEG-2 audio standard AAC (Advanced Audio Coding). ing.

また、さらに拡張されたISO/IEC 14496-3にて、MPEG-4オーディオ規格AACという符号化方式が標準化されている。なお、以下では、MPEG-2オーディオ規格AAC、およびMPEG-4オーディオ規格AACを合わせてAAC規格と呼ぶこととする。   Further, an expanded ISO / IEC 14496-3 standardizes an MPEG-4 audio standard AAC encoding method. Hereinafter, the MPEG-2 audio standard AAC and the MPEG-4 audio standard AAC are collectively referred to as the AAC standard.

図1に、AAC規格に準拠した従来の符号化装置の構成を示す。   FIG. 1 shows a configuration of a conventional encoding device compliant with the AAC standard.

符号化装置は、聴覚心理モデル保持部11、ゲイン制御部12、スペクトル処理部13、量子化/符号化部14、およびマルチプレクサ部15から構成される。   The encoding device includes an auditory psychological model holding unit 11, a gain control unit 12, a spectrum processing unit 13, a quantization / encoding unit 14, and a multiplexer unit 15.

符号化装置に入力されたオーディオ信号は、聴覚心理モデル保持部11およびゲイン制御部12に供給される。聴覚心理モデル保持部11は、供給されたオーディオ信号を時間軸に沿ってブロック化し、ブロック化されたオーディオ信号を分割帯域ごとに人間の聴覚特性に従って分析して、各分割帯域の許容誤差強度を算出する。   The audio signal input to the encoding device is supplied to the psychoacoustic model holding unit 11 and the gain control unit 12. The psychoacoustic model holding unit 11 blocks the supplied audio signal along the time axis, analyzes the blocked audio signal for each divided band according to human auditory characteristics, and determines the allowable error intensity of each divided band. calculate.

ゲイン制御部12は、SSR(Scalable Sampling Rate)プロファイルのみに使用され、供給されたオーディオ信号を4つの等間隔の周波数帯域に分割し、最低域以外の帯域について利得調整を行う。   The gain control unit 12 is used only for an SSR (Scalable Sampling Rate) profile, divides the supplied audio signal into four equally spaced frequency bands, and performs gain adjustment for bands other than the lowest band.

スペクトル処理部13は、ゲイン制御部12において利得調整されたオーディオ信号を周波数領域のスペクトルデータに変換する。また、スペクトル処理部13は、聴覚心理モデル保持部11から供給された許容誤差強度に基づいて、スペクトル処理部13の各部を制御し、スペクトルデータに所定の処理を施す。   The spectrum processing unit 13 converts the audio signal whose gain has been adjusted by the gain control unit 12 into spectrum data in the frequency domain. Further, the spectrum processing unit 13 controls each part of the spectrum processing unit 13 based on the allowable error intensity supplied from the auditory psychological model holding unit 11 and performs predetermined processing on the spectrum data.

スペクトル処理部13は、MDCT(Modified Discrete Cosine Transform)部21、TNS(Temporal Noise Shaping)処理部22、インテンシティ/カップリング部23、予測部24、およびM/S(Middle/Side Stereo)ステレオ部25を備えている。   The spectrum processing unit 13 includes an MDCT (Modified Discrete Cosine Transform) unit 21, a TNS (Temporal Noise Shaping) processing unit 22, an intensity / coupling unit 23, a prediction unit 24, and an M / S (Middle / Side Stereo) stereo unit. 25.

MDCT部21は、ゲイン制御部12から供給された時間領域のオーディオ信号を周波数領域のスペクトルデータに変換する。TNS処理部22は、MDCT部21によりスペクトルデータとされたオーディオ信号を加工して量子化雑音の時間的な形状を調整する。インテンシティ/カップリング部23は、TNS処理部22により加工されたオーディオ信号に対してステレオ相関符号化処理を施す。   The MDCT unit 21 converts the time-domain audio signal supplied from the gain control unit 12 into spectrum data in the frequency domain. The TNS processing unit 22 processes the audio signal converted into the spectrum data by the MDCT unit 21 and adjusts the temporal shape of the quantization noise. The intensity / coupling unit 23 performs a stereo correlation encoding process on the audio signal processed by the TNS processing unit 22.

予測部24は、インテンシティ/カップリング部23においてステレオ相関符号化されたオーディオ信号と、量子化部27から供給されるオーディオ信号とを用いて予測符号化を行い、その結果得られたオーディオ信号をM/Sステレオ部25に供給する。M/Sステレオ部25は、予測部24からのオーディオ信号をステレオ相関符号化し、量子化/符号化部14に供給する。   The prediction unit 24 performs prediction encoding using the audio signal that has been stereo correlation encoded in the intensity / coupling unit 23 and the audio signal supplied from the quantization unit 27, and the audio signal obtained as a result thereof Is supplied to the M / S stereo unit 25. The M / S stereo unit 25 stereo-encodes the audio signal from the prediction unit 24 and supplies the audio signal to the quantization / encoding unit 14.

量子化/符号化部14は、M/Sステレオ部25からのオーディオ信号を符号列に変換し、マルチプレクサ部15に供給する。量子化/符号化部14は、正規化係数部26、量子化部27、およびハフマン符号化部28を備えている。   The quantization / encoding unit 14 converts the audio signal from the M / S stereo unit 25 into a code string and supplies it to the multiplexer unit 15. The quantization / encoding unit 14 includes a normalization coefficient unit 26, a quantization unit 27, and a Huffman encoding unit 28.

正規化係数部26は、M/Sステレオ部25からのオーディオ信号を量子化部27に供給するとともに、そのオーディオ信号に基づいて、オーディオ信号の量子化に用いる正規化係数を算出し、量子化部27およびハフマン符号化部28に供給する。例えば、聴覚心理モデル保持部11からの許容誤差強度が用いられて、分割帯域ごとの正規化係数として、量子化ステップパラメータが算出される。   The normalization coefficient unit 26 supplies the audio signal from the M / S stereo unit 25 to the quantization unit 27, calculates a normalization coefficient used for quantization of the audio signal based on the audio signal, and performs quantization. To the unit 27 and the Huffman encoding unit 28. For example, the allowable error intensity from the psychoacoustic model holding unit 11 is used, and the quantization step parameter is calculated as a normalization coefficient for each divided band.

量子化部27は、正規化係数部26からの正規化係数を用いて、正規化係数部26から供給されたオーディオ信号を非線形量子化し、その結果得られたオーディオ信号(量子化値)をハフマン符号化部28および予測部24に供給する。ハフマン符号化部28は、予め定められたハフマン符号表に基づいて、正規化係数部26からの正規化係数と、量子化部27からの量子化値とに、それぞれハフマン符号を与えることで正規化係数および量子化値をハフマン符号化し、マルチプレクサ部15に供給する。   The quantization unit 27 nonlinearly quantizes the audio signal supplied from the normalization coefficient unit 26 using the normalization coefficient from the normalization coefficient unit 26, and the audio signal (quantization value) obtained as a result is Huffman. The data is supplied to the encoding unit 28 and the prediction unit 24. The Huffman encoding unit 28 performs normalization by giving a Huffman code to each of the normalization coefficient from the normalization coefficient unit 26 and the quantization value from the quantization unit 27 based on a predetermined Huffman code table. The quantization coefficient and the quantized value are Huffman encoded and supplied to the multiplexer unit 15.

マルチプレクサ部15は、ゲイン制御部12およびMDCT部21乃至正規化係数部26から供給された、オーディオ信号の符号化の過程で生成された各種の情報と、ハフマン符号化部28からのハフマン符号とを多重化して、符号化されたオーディオ信号のビットストリームを生成して出力する。   The multiplexer unit 15 is supplied with the gain control unit 12 and the MDCT unit 21 through the normalization coefficient unit 26, and various information generated in the process of encoding the audio signal, and the Huffman code from the Huffman encoding unit 28. Are multiplexed to generate and output a bit stream of the encoded audio signal.

また、量子化部27におけるオーディオ信号の非線形量子化は、正規化係数部26からのオーディオ信号の値を入力値AXとし、正規化係数部26からの正規化係数としての量子化ステップパラメータをqとすると、次式(1)を計算することにより行われる。すなわち、式(1)が計算されて、オーディオ信号の入力値AXから量子化値Zが求められる。   In addition, the non-linear quantization of the audio signal in the quantization unit 27 is performed by using the value of the audio signal from the normalization coefficient unit 26 as the input value AX and the quantization step parameter as the normalization coefficient from the normalization coefficient unit 26 as q. Then, the calculation is performed by calculating the following equation (1). That is, Equation (1) is calculated, and the quantized value Z is obtained from the input value AX of the audio signal.

Figure 2010032762
Figure 2010032762

なお、式(1)において、(int)(A)は、浮動小数点数Aの小数部分を切り捨てて整数部分を得る演算を示す。   In Expression (1), (int) (A) indicates an operation for obtaining an integer part by truncating the decimal part of the floating-point number A.

AAC規格の符号化においては、量子化値Zは14ビットと規定されているため、量子化前の値AY=AX/2q/4は、逆算すると、0≦AY<8191.5943(4/3)の範囲の値とされる。したがって、量子化値Zは、0≦Z≦8191の範囲の整数となり、量子化値Zがこの範囲内の値となるように、量子化ステップパラメータqが定められる。 In the encoding of the AAC standard, the quantized value Z is defined as 14 bits. Therefore, the value AY = AX / 2 q / 4 before quantization is calculated as 0 ≦ AY <8191.5943 (4/3) A value in the range of Therefore, the quantized value Z is an integer in the range of 0 ≦ Z ≦ 8191, and the quantization step parameter q is determined so that the quantized value Z is a value within this range.

また、オーディオ信号の量子化時において、量子化部27は、全ての入力値AXに対する量子化値Zを逆量子化し、量子化誤差が所定の範囲内に収まっているか否かを確認する。例えば、次式(2)の演算により逆量子化が行われ、逆量子化値Wが得られる。   Further, when the audio signal is quantized, the quantizing unit 27 inversely quantizes the quantized values Z for all the input values AX, and confirms whether the quantization error is within a predetermined range. For example, the inverse quantization is performed by the calculation of the following equation (2), and the inverse quantization value W is obtained.

Figure 2010032762
Figure 2010032762

さらに、量子化誤差は、逆量子化値Wと入力値AXとの差分を求めることで得られ、その差分が所定の範囲内の値となっているか否かの判定が行われる。   Further, the quantization error is obtained by obtaining a difference between the inverse quantized value W and the input value AX, and it is determined whether or not the difference is a value within a predetermined range.

ところで、従来、上述した式(1)における4分の3乗や、式(2)における3分の4乗などのべき乗の演算結果を効率よく得る方法が提案されている(例えば、特許文献1参照)。特許文献1には、定数である、べき指数をY=A/B(但し、A=3,B=4)として、任意の変数XのY乗の演算を、テーブルを用いて行うことが開示されている。すなわち、特許文献1の番号63の段落には「小数部uに関しては仮数部をROMのテーブル検索により求めるようにして」と記載されており、u個のテーブルが用いられて変数Xのべき乗が求められる。   By the way, conventionally, there has been proposed a method for efficiently obtaining a power calculation result such as the third power in Equation (1) and the fourth power in Equation (2) (for example, Patent Document 1). reference). Patent Document 1 discloses that a constant exponent, Y = A / B (where A = 3, B = 4), is used to calculate an arbitrary variable X to the Y power using a table. Has been. That is, the paragraph of number 63 of Patent Document 1 describes that “the mantissa part is obtained by searching the ROM table for the decimal part u”, and the u powers of the variable X are obtained using u tables. Desired.

具体的には、特許文献1では、以下に説明する手順でべき乗の演算が行われる。   Specifically, in Japanese Patent Application Laid-Open No. 2004-228620, power calculation is performed according to the procedure described below.

まず、変数XのY乗の演算結果として得られる演算値をPとすると、次式(3)の関係が成立する。   First, when an operation value obtained as an operation result of the variable X raised to the power Y is P, the relationship of the following equation (3) is established.

Figure 2010032762
Figure 2010032762

次に、入力された変数Xが、式(4)に示すように、C言語の関数frexpおよびldexpの仕様に基づく仮数X1と指数X2とに分離される。ここで、仮数X1の取り得る値の範囲は0.5以上1.0未満とされる。 Next, the input variable X is separated into a mantissa X 1 and an exponent X 2 based on the specifications of the C language functions frexp and ldexp as shown in Expression (4). Here, the range of possible values of the mantissa X 1 is 0.5 or more and less than 1.0.

Figure 2010032762
Figure 2010032762

この式(4)を式(3)に代入すれば、次式(5)が得られる。   Substituting this equation (4) into equation (3) yields the following equation (5).

Figure 2010032762
Figure 2010032762

さらに、式(5)におけるX2×A/Bの整数部分をXintとし、小数部分をXamariとすると、式(5)は、式(6)で表され、整数部分Xintおよび小数部分Xamariは、それぞれ式(7)および式(8)で表される。 Furthermore, when the integer part of X 2 × A / B in the formula (5) is X int and the decimal part is X amari , the formula (5) is expressed by the formula (6), and the integer part X int and the decimal part X amari is represented by formula (7) and formula (8), respectively.

Figure 2010032762
Figure 2010032762

Figure 2010032762
Figure 2010032762

Figure 2010032762
Figure 2010032762

なお、式(7)における(int)(A)は、浮動小数点数Aの小数部分を切り捨てて整数部分を得る演算を示している(以下の説明においても同様であるとする)。また、式(8)において、%はモジュロを意味し、(X2×(B−A))をBで割った余りを求める処理を示している。 Note that (int) (A) in equation (7) indicates an operation to obtain an integer part by truncating the decimal part of the floating-point number A (the same applies to the following description). Moreover, in Formula (8),% means modulo and has shown the process which calculates | requires the remainder which divided (X < 2 > * (BA)) by B. FIG.

さらに、仮数X1および小数部分Xamariから、式(6)における(X1^(A/B))×(2^Xamari)を得るテーブルと、仮数X1が0.5以上1.0未満となるように指数X2を調整するテーブルを用意し、それらのテーブルを利用して式(6)の演算を行うことで、変数XのY乗の演算結果として演算値Pが得られる。なお、「^」はべき乗を表しており、例えば、「2^Xamari」は、2のXamari乗を示している。「^」についても、以下の説明において同様であるとする。 Further, a table for obtaining (X 1 ^ (A / B)) × (2 ^ X amari ) in the equation (6) from the mantissa X 1 and the decimal part X amari and the mantissa X 1 is 0.5 or more and less than 1.0. Tables for adjusting the index X 2 are prepared, and the calculation value P is obtained as the calculation result of the variable X to the Y power by performing the calculation of Expression (6) using these tables. Note that “^” represents a power, and for example, “2 ^ X amari ” represents 2 to the power of X amari . The same applies to “^” in the following description.

以上のようにしてべき乗の演算を行い、オーディオ信号を量子化する量子化装置は、図2に示す構成とされる。   The quantizing device that performs exponentiation and quantizes the audio signal as described above is configured as shown in FIG.

量子化装置51は、図1の量子化部27に対応し、量子化装置51には、式(1)における量子化前の値AYが変数Xとして供給されるとともに、べき指数Yが供給される。   The quantizing device 51 corresponds to the quantizing unit 27 in FIG. 1, and the quantizing device 51 is supplied with the value AY before quantization in the equation (1) as a variable X and with a power exponent Y. The

仮数/指数分離部61は、供給された変数Xを仮数X1と指数X2とに分離し、指数X2を整数/小数分離部62に供給し、仮数X1をべき乗演算部63に供給する。整数/小数分離部62は、仮数/指数分離部61からの指数X2と、供給されたべき指数Yとの積の整数部分Xintおよび小数部分Xamariを求めてべき乗演算部63に供給する。 The mantissa / exponent separator 61 separates the supplied variable X into a mantissa X 1 and an exponent X 2 , supplies the exponent X 2 to the integer / decimal separator 62, and supplies the mantissa X 1 to the power calculator 63. To do. The integer / decimal separator 62 obtains the integer part X int and the decimal part X amari of the product of the exponent X 2 from the mantissa / exponent separator 61 and the supplied exponent Y and supplies the integer part X int to the power calculator 63. .

べき乗テーブル保持部64は、仮数X1および小数部分Xamariから、求めようとする演算値Pを浮動小数点表現したときの仮数Pamariを得るためのべき乗テーブルを保持している。また、指数調整テーブル保持部65は、整数部分Xintおよび小数部分Xamariから、演算値Pを浮動小数点表現したときの指数Pintの調整値を得るための調整テーブルを保持している。 The power table holding unit 64 holds a power table for obtaining a mantissa P amari when a calculation value P to be obtained is expressed as a floating point from the mantissa X 1 and the decimal part X amari . Also, index adjustment table holding section 65, the integer part X int and fractional part X amari, holds the adjustment table for obtaining an adjustment value of the exponent P int when the calculated value P and the floating-point representation.

べき乗演算部63は、仮数/指数分離部61からの仮数X1と、整数/小数分離部62からの整数部分Xintおよび小数部分Xamariとを用いて、演算値Pの仮数Pamariおよび指数Pintを求めることで、変数XのY乗の演算を行う。このとき、べき乗演算部63は、べき乗テーブル保持部64のべき乗テーブルと、指数調整テーブル保持部65の指数調整テーブルとを利用して、仮数Pamariおよび調整値を得る。また、指数Pintは、整数部分Xintおよび調整値から求められる。 The exponent operation unit 63 uses the mantissa X 1 from the mantissa / exponent separator 61 and the integer part X int and the fraction part X amari from the integer / decimal separator 62 to calculate the mantissa P amari and exponent of the operation value P by obtaining the P int, it performs calculation of the variable X Y th power of. At this time, the power calculation unit 63 obtains the mantissa P amari and the adjustment value using the power table of the power table holding unit 64 and the exponent adjustment table of the exponent adjustment table holding unit 65. The index P int is obtained from the integer part X int and the adjustment value.

整数変換部66は、べき乗演算部63により求められた演算値Pに所定の定数αが加算されて得られる数の整数部分を抽出し、抽出した整数部分を、入力された変数Xの量子化値Zとして出力する。この場合、定数αは、式(1)の「-0.0946+0.5」とされる。   The integer conversion unit 66 extracts an integer part of a number obtained by adding a predetermined constant α to the operation value P obtained by the power operation unit 63, and the extracted integer part is quantized to the input variable X Output as value Z. In this case, the constant α is set to “−0.0946 + 0.5” in Expression (1).

次に、図3のフローチャートを参照して、量子化装置51による量子化処理について説明する。   Next, the quantization processing by the quantization device 51 will be described with reference to the flowchart of FIG.

ステップS11において、べき乗テーブル保持部64および指数調整テーブル保持部65は、べき乗テーブルおよび指数調整テーブルを生成する。   In step S11, the power table holding unit 64 and the exponent adjustment table holding unit 65 generate a power table and an exponent adjustment table.

すなわち、べき乗テーブル保持部64は、テーブルサイズを2N=SIZEとすると、次式(9)に示される仮数Pamariの値frc[i][j]からなるべき乗テーブルを生成する。 That is, when the table size is 2 N = SIZE, the power table holding unit 64 generates a power table made up of the value frc [i] [j] of the mantissa P amari shown in the following equation (9).

Figure 2010032762
Figure 2010032762

なお、式(9)において、仮数Pamariの値frc[i][j]の変数iは、仮数X1から求まるインデックスindex1の値を示しており、変数i=0,・・・,(SIZE−1)とされる。また、frc[i][j]の変数jは、小数部分Xamariの値を示しており、変数j=1,・・・,(B−1)である。この変数jにおける「B」は、べき指数Y=A/BにおけるBである。 In the expression (9), the variable i values of the mantissa P amari frc [i] [j ] indicates the value of the index index1 obtained from mantissa X 1, variable i = 0, · · ·, (SIZE -1). Further, the variable j of frc [i] [j] indicates the value of the decimal part X amari , and variables j = 1,..., (B-1). “B” in the variable j is B in the power index Y = A / B.

さらに、式(9)におけるfrctmpは、式(10)により求まる値である。   Furthermore, frctmp in equation (9) is a value obtained from equation (10).

Figure 2010032762
Figure 2010032762

なお、式(10)における値frc[i][0]は、式(11)により求まる値である。   Note that the value frc [i] [0] in equation (10) is a value obtained from equation (11).

Figure 2010032762
Figure 2010032762

ここで、式(10)および式(11)における「A」および「B」も、べき指数Y=A/BにおけるAおよびBである。   Here, “A” and “B” in the equations (10) and (11) are also A and B in the power index Y = A / B.

このように、べき乗テーブル保持部64は、インデックスindex1および小数部分Xamariにより定まる仮数Pamariの各値frc[i][j]からなるべき乗テーブルを生成し、保持する。 In this way, the power table holding unit 64 generates and holds a power table made up of each value frc [i] [j] of the mantissa P amari determined by the index index1 and the decimal part X amari .

また、指数調整テーブル保持部65は、テーブルサイズを2N=SIZEとして、次式(12)に示される指数Pintの調整値exp[i][j]からなる指数調整テーブルを生成する。 Also, index adjustment table holding section 65, the table size as the 2 N = SIZE, and generates an exponent adjustment table of adjustment values of the exponent P int exp [i] [j ] shown in the following equation (12).

Figure 2010032762
Figure 2010032762

ここで、調整値exp[i][j]の変数iおよびjは、frc[i][j]における変数iおよびjと同じであり、式(12)におけるfrctmpは、上述した式(10)により求まる。また、調整値exp[i][0]は0とされる。   Here, the variables i and j of the adjustment value exp [i] [j] are the same as the variables i and j in frc [i] [j], and frctmp in the equation (12) is the above-described equation (10). It is obtained by. The adjustment value exp [i] [0] is set to 0.

指数調整テーブル保持部65は、インデックスindex1および小数部分Xamariにより定まる各調整値exp[i][j]からなる指数調整テーブルを生成し、保持する。 The exponent adjustment table holding unit 65 generates and holds an exponent adjustment table including adjustment values exp [i] [j] determined by the index index1 and the decimal part X amari .

なお、以上において説明した仮数Pamariの値frc[i][j]と、調整値exp[i][j]とは、べき指数Y=A/B=3/4を想定したときの値であり、べき指数Yの分子「A」および分母「B」を任意の値とするには、0.5≦frc[i][j]<1.0となるように、frc[i][j]および調整値exp[i][j]を求める必要がある。 Note that the value frc [i] [j] of the mantissa P amari described above and the adjustment value exp [i] [j] are values when a power exponent Y = A / B = 3/4 is assumed. Yes, in order to make the numerator “A” and denominator “B” of the power exponent Y arbitrary values, frc [i] [j] so that 0.5 ≦ frc [i] [j] <1.0 ] And the adjustment value exp [i] [j] must be obtained.

べき乗テーブルおよび指数調整テーブルが生成されると、ステップS12において、仮数/指数分離部61は、C言語の関数frexpを用いて、供給された変数Xの仮数X1および指数X2を求める。ここで、仮数X1は、0.5以上1.0未満の値とされる。 When power table and index adjustment table is created, in step S12, mantissa / exponent separation unit 61, using the C language function frexp, obtains the mantissa X 1 and exponent X 2 of the supplied variable X. Here, the mantissa X 1 is a value not less than 0.5 and less than 1.0.

仮数/指数分離部61は、求めた仮数X1をべき乗演算部63に供給し、指数X2を整数/小数分離部62に供給する。 The mantissa / exponent separation unit 61 supplies the obtained mantissa X 1 to the power operation unit 63 and supplies the exponent X 2 to the integer / decimal separation unit 62.

ステップS13において、整数/小数分離部62は、仮数/指数分離部61からの指数X2と、供給されたべき指数Yとを用いて式(7)および式(8)の計算を行い、指数X2とべき指数Y=A/Bの積の整数部分Xintおよび小数部分Xamariを求める。 In step S13, integer / fraction separation unit 62, an exponent X 2 from mantissa / exponent separation unit 61 performs the calculation of Equation (7) and (8) by using the index Y should have been supplied, exponent The integer part X int and the fractional part X amari of the product of X 2 and the exponent Y = A / B are obtained.

ステップS14において、べき乗演算部63は、仮数/指数分離部61からの仮数X1と、整数/小数分離部62からの整数部分Xintおよび小数部分Xamariとを用いて、変数XをY乗して得られる演算値Pを求める。 In step S14, the power calculation unit 63 includes a mantissa X 1 from mantissa / exponent separator unit 61, by using the integer part X int and fractional part X amari from integer / fraction separator 62, a variable X-th power Y The operation value P obtained in this way is obtained.

すなわち、べき乗演算部63は、次式(13)を計算することで、べき乗テーブルおよび指数調整テーブルから、所望のfrc[i][j]およびexp[i][j]の値を引くために用いられるインデックスindex1を求める。   That is, the power calculation unit 63 calculates the following equation (13) to subtract the desired values of frc [i] [j] and exp [i] [j] from the power table and the exponent adjustment table. Find the index index1 to be used.

Figure 2010032762
Figure 2010032762

そして、べき乗演算部63は、求めたインデックスindex1と、整数/小数分離部62からの小数部分Xamariとを用いて、式(14)に示される演算値Pの仮数Pamariを求める。 Then, the power calculation unit 63 calculates the mantissa P amari of the calculation value P shown in Expression (14) using the obtained index index1 and the decimal part X amari from the integer / decimal number separation unit 62.

Figure 2010032762
Figure 2010032762

すなわち、べき乗演算部63は、べき乗テーブル保持部64のべき乗テーブルから、frc[index1][Xamari]を取得して、このfrc[index1][Xamari]の値を仮数Pamariとする。 That is, the power calculation unit 63 acquires frc [index1] [X amari ] from the power table of the power table holding unit 64, and sets the value of this frc [index1] [X amari ] as the mantissa P amari .

また、べき乗演算部63は、指数調整テーブル保持部65の指数調整テーブルから、インデックスindex1および小数部分Xamariから特定される調整値exp[index1][Xamari]を取得する。さらに、べき乗演算部63は、取得した調整値exp[index1][Xamari]と、整数/小数分離部62からの整数部分Xintを用いて次式(15)を計算し、演算値Pの指数Pintを求める。 Further, the power calculation unit 63 acquires the adjustment value exp [index1] [X amari ] specified from the index index1 and the decimal part X amari from the exponent adjustment table of the exponent adjustment table holding unit 65. Further, the power calculation unit 63 calculates the following expression (15) using the acquired adjustment value exp [index1] [X amari ] and the integer part X int from the integer / decimal separator 62, and calculates the calculated value P The index P int is obtained.

Figure 2010032762
Figure 2010032762

べき乗演算部63は、演算値Pの仮数Pamariおよび指数Pintを求めると、C言語の関数ldexpを用いて仮数Pamariおよび指数Pintを合成し、浮動小数点数のべき乗の演算結果である演算値Pを求めて整数変換部66に供給する。 The exponent operation unit 63 obtains the mantissa P amari and the exponent P int of the operation value P, synthesizes the mantissa P amari and the exponent P int using the C language function ldexp, and obtains the result of the exponentiation of the floating-point number. The calculated value P is obtained and supplied to the integer conversion unit 66.

ステップS15において、整数変換部66は、べき乗演算部63からの演算値Pを用いて、変数Xの量子化値Zを求めて出力し、量子化処理は終了する。   In step S15, the integer conversion unit 66 obtains and outputs the quantized value Z of the variable X using the calculated value P from the power calculating unit 63, and the quantization process ends.

すなわち、整数変換部66は演算値Pと、予め定められた定数αとから次式(16)を計算し、量子化値Zを求める。   That is, the integer conversion unit 66 calculates the following equation (16) from the calculated value P and a predetermined constant α to obtain the quantized value Z.

Figure 2010032762
Figure 2010032762

以上のようにして、量子化装置51は、入力された変数Xのべき乗を計算し、量子化値Zを求める。   As described above, the quantizing device 51 calculates the power of the input variable X to obtain the quantized value Z.

特開2002−344316号公報JP 2002-344316 A

しかしながら、上述した技術では、少ないメモリ量で、べき乗の演算を簡単に精度よく行なうことは困難であった。   However, with the above-described technique, it has been difficult to perform power calculations easily and accurately with a small amount of memory.

例えば、特許文献1に記載の技術では、べき指数Y=A/Bの分子Aおよび分母Bを個々に用いた演算が行われるため、特許文献1に記載の技術は、べき指数Yが分数で表現される場合にしか、べき乗の演算に適用することができない。   For example, in the technique described in Patent Document 1, calculation using the numerator A and the denominator B of power exponent Y = A / B is performed individually. Therefore, the technique described in Patent Document 1 uses power index Y as a fraction. It can only be applied to exponentiation when expressed.

また、変数i,jに対する仮数Pamariの値frc[i][j]の個数、つまりべき乗テーブルの数がSIZE×B個必要となり、さらに変数Xを関数frexpおよびldexpの仕様に合わせるための指数の調整値の個数、つまり指数調整テーブルの数がSIZE×B個必要となる。したがって、べき指数Yの分母Bの値によっては、べき乗テーブルや指数調整テーブルを記録しておくために膨大なメモリ量が必要となってしまう。 Also, the number of mantissa P amari values frc [i] [j] for variables i and j, that is, the number of power tables is required to be SIZE × B, and an index for adjusting variable X to the specifications of functions frexp and ldexp. The number of adjustment values, that is, the number of index adjustment tables is required to be SIZE × B. Therefore, depending on the value of the denominator B of the power exponent Y, a huge amount of memory is required to record the power table and the exponent adjustment table.

さらに、べき乗テーブルや指数調整テーブルを用いずに、直接、べき乗の演算をしようとしても、変数Xの仮数および指数は、C言語の関数frexpおよびldexpの仕様に基づいたものであるため、浮動小数点数の仮数および指数とは異なる。したがって、量子化装置51の一部を浮動小数点数の演算を行う演算器に置き換えることも容易ではない。   Furthermore, even if an attempt is made to directly calculate a power without using a power table or an exponent adjustment table, the mantissa and exponent of the variable X are based on the specifications of the C language functions frexp and ldexp. It is different from the mantissa and exponent of numbers. Therefore, it is not easy to replace a part of the quantization device 51 with an arithmetic unit that performs a floating point number operation.

さらに、また、べき乗の演算の精度を上げようとすると、べき乗テーブルおよび指数調整テーブルのサイズを増やす必要があり、逆にそれらのテーブルのサイズを小さくすると、べき乗の演算精度が低下してしまう。   Furthermore, if the power calculation accuracy is to be increased, it is necessary to increase the size of the power table and the exponent adjustment table. Conversely, if the size of these tables is reduced, the power calculation accuracy is reduced.

具体的には、量子化装置51により算出されたべき乗の演算値Pと、数学ライブラリを用いて算出したべき乗値QとからなるL個のデータのセットを用いて、次式(17)を計算し、相対誤差平均Tを求めて演算精度を評価することを考える。   Specifically, the following equation (17) is calculated using a set of L data composed of the power value P calculated by the quantization device 51 and the power value Q calculated using a mathematical library. Then, consider calculating the relative error average T to evaluate the calculation accuracy.

Figure 2010032762
Figure 2010032762

なお、式(17)において、Piは、量子化装置51により算出されたべき乗値P(演算値P)のi番目のサンプルを示しており、Qiは、数学ライブラリにより求められたQに対応する数を示している。 In Equation (17), P i indicates the i-th sample of the power value P (calculated value P) calculated by the quantization device 51, and Q i is the Q obtained by the mathematical library. The corresponding number is shown.

本出願人がべき指数Y=3/4とし、L=8192として式(17)を計算し、量子化装置51によるべき乗値P(演算値P)の演算精度の評価を行ったところ、テーブルサイズ2NにおけるNが8であるとき、すなわちSIZE=256のとき、相対誤差平均T=8.25×10-4となり、それほど高い精度は得られなかった。また、テーブルサイズ2NにおけるNが16であるとき、すなわちSIZE=65536のとき、相対誤差平均T=2.56×10-8となり、N=8の場合よりも高い精度が得られた。 The applicant calculated exponent (Y) with exponent Y = 3/4 and L = 8192, and evaluated the calculation accuracy of the power value P (calculation value P) by the quantization device 51. The table size When N in 2 N is 8, that is, when SIZE = 256, the relative error average T = 8.25 × 10 −4 , and so high accuracy could not be obtained. Further, when N in the table size 2 N is 16, that is, when SIZE = 65536, the relative error average T = 2.56 × 10 −8 , which is higher than in the case of N = 8.

しかしながら、べき乗の演算値Pの演算精度を高くするために、べき乗テーブルおよび指数調整テーブルのテーブルサイズをSIZE=65536とすると、それらのテーブルが合計524288(=65536×4×2)個も必要となり、テーブルを記録するためのメモリ容量が逼迫してしまう。   However, in order to increase the calculation accuracy of the power calculation value P, if the size of the power table and the exponent adjustment table is SIZE = 65536, a total of 524288 (= 65536 × 4 × 2) tables are required. The memory capacity for recording the table becomes tight.

さらに、例えば式(1)に示したように、オーディオ信号の量子化を行う場合などには、べき乗演算により演算値Pを求め、さらに定数αを加算してから整数化を行わなければならず、簡単にべき乗の整数を求めることができなかった。   Further, for example, as shown in the equation (1), when an audio signal is quantized, an arithmetic value P must be obtained by a power operation, and a constant α must be added before integerization. I couldn't easily find a power integer.

本発明は、このような状況に鑑みてなされたものであり、少ないメモリ量で、より簡単かつ精度よくべき乗の演算を行うことができるようにするものである。また、本発明は、より簡単にべき乗の整数を求めることができるようにするものである。   The present invention has been made in view of such a situation, and makes it possible to perform a power operation more easily and accurately with a small amount of memory. Further, the present invention makes it possible to obtain a power integer more easily.

本発明の第1の側面の演算処理装置は、定数Yをべき指数とした、所定の入力値Xのべき乗の演算を行う演算処理装置であって、浮動小数点型のデータにおける、前記入力値Xを浮動小数点数で表現したときの仮数を表す仮数部である仮数X1と、前記入力値Xを浮動小数点数で表現したときの指数を表す指数部である指数X2とに、前記入力値Xを分離する仮数/指数分離手段と、前記指数X2と前記定数Yとの積を、前記積の整数部分である整数Xintと、前記積の小数部分である小数Xamariとに分離する整数/小数分離手段と、前記仮数X1に対して定まる、前記定数Yをべき指数とする前記入力値Xの前記仮数のべき乗値を記録する第1の記録手段と、前記小数Xamariに対して定まる、前記小数Xamariをべき指数とする、前記入力値Xを浮動小数点数で表現したときの底のべき乗値を記録する第2の記録手段と、前記仮数X1を用いて前記第1の記録手段から取得した前記仮数の前記べき乗値、前記小数Xamariを用いて前記第2の記録手段から取得した前記底の前記べき乗値、および前記整数Xintから、前記定数Yをべき指数とした、前記入力値Xのべき乗を演算するべき乗演算手段とを備える。   An arithmetic processing apparatus according to a first aspect of the present invention is an arithmetic processing apparatus that performs a power operation of a predetermined input value X with a constant Y as a power exponent, and the input value X in floating-point type data Is expressed as a mantissa part X1 representing a mantissa when the input value X is represented by a floating point number, and an exponent X2 representing an exponent part representing the exponent when the input value X is represented by a floating point number. A mantissa / exponent separating means for separating, and an integer / decimal separating means for separating a product of the exponent X2 and the constant Y into an integer Xint that is an integer part of the product and a decimal Xamari that is a decimal part of the product A first recording means for recording a power value of the mantissa of the input value X with the constant Y as a power exponent, which is determined with respect to the mantissa X1, and the decimal number Xamari determined with respect to the decimal number Xamari. Finger A second recording means for recording a power value of a base when the input value X is expressed by a floating-point number; and the power of the mantissa acquired from the first recording means using the mantissa X1 A power operation for calculating a power of the input value X using the constant Y as a power exponent from the value, the power value of the base obtained from the second recording means using the decimal number Xamari, and the integer Xint Means.

演算処理装置には、前記仮数X1を用いて前記第1の記録手段から取得した、複数の前記べき乗値を用いて補間処理を行い、最終的な前記仮数の前記べき乗値を求める補間手段をさらに設け、前記べき乗演算手段には、前記底の前記べき乗値、および前記整数Xint、および前記補間手段により求められた前記仮数の前記べき乗値から、前記定数Yをべき指数とした、前記入力値Xのべき乗を演算させることができる。   The arithmetic processing device further includes an interpolating unit that performs interpolation using a plurality of power values obtained from the first recording unit using the mantissa X1 and obtains the power value of the final mantissa. The power calculation means includes the input value X with the constant Y as a power exponent from the power value of the base, the integer Xint, and the power value of the mantissa obtained by the interpolation means. The power of can be calculated.

演算処理装置には、前記小数Xamariを用いて前記第2の記録手段から取得した、複数の前記べき乗値を用いて補間処理を行い、最終的な前記底の前記べき乗値を求める補間手段をさらに設け、前記べき乗演算手段には、前記仮数の前記べき乗値、および前記整数Xint、および前記補間手段により求められた前記底の前記べき乗値から、前記定数Yをべき指数とした、前記入力値Xのべき乗を演算させることができる。   The arithmetic processing device further includes an interpolation unit that performs interpolation processing using a plurality of power values acquired from the second recording unit using the decimal number Xamari, and obtains the final power value of the base. The power calculation means includes the input value X with the constant Y as a power exponent from the power value of the mantissa, the integer Xint, and the power value of the base obtained by the interpolation means. The power of can be calculated.

本発明の第1の側面の演算処理方法またはプログラムは、定数Yをべき指数とした、所定の入力値Xのべき乗の演算を行う場合に、浮動小数点型のデータにおける、前記入力値Xを浮動小数点数で表現したときの仮数を表す仮数部である仮数X1と、前記入力値Xを浮動小数点数で表現したときの指数を表す指数部である指数X2とに、前記入力値Xを分離し、前記指数X2と前記定数Yとの積を、前記積の整数部分である整数Xintと、前記積の小数部分である小数Xamariとに分離し、前記仮数X1を用いて取得した、前記仮数X1に対して定まる、前記定数Yをべき指数とする前記入力値Xの前記仮数のべき乗値、前記小数Xamariを用いて取得した、前記小数Xamariに対して定まる、前記入力値Xを浮動小数点数で表現したときの底の前記小数Xamariをべき指数とするべき乗値、および前記整数Xintから、前記定数Yをべき指数とした、前記入力値Xのべき乗を演算するステップを含む。   The arithmetic processing method or program according to the first aspect of the present invention floats the input value X in floating-point type data when performing a power operation of a predetermined input value X with a constant Y as a power exponent. The input value X is separated into a mantissa X1 which is a mantissa part representing a mantissa when expressed in a decimal number and an exponent X2 which is an exponent part representing an exponent when the input value X is represented as a floating point number. , The product of the exponent X2 and the constant Y is separated into an integer Xint that is an integer part of the product and a fraction Xamari that is a fractional part of the product, and the mantissa X1 obtained using the mantissa X1 The input value X is a floating-point number that is determined with respect to the decimal number Xamari obtained by using the mantissa power value of the input value X with the constant Y as an exponent and the decimal number Xamari. Exponential value to the fractional Xamari to the index of the bottom when revealed, and the integer Xint, and with the constant Y the exponent comprises the step of calculating the power of the input value X.

本発明の第1の側面においては、定数Yをべき指数とした、所定の入力値Xのべき乗の演算を行う場合に、浮動小数点型のデータにおける、前記入力値Xを浮動小数点数で表現したときの仮数を表す仮数部である仮数X1と、前記入力値Xを浮動小数点数で表現したときの指数を表す指数部である指数X2とに、前記入力値Xが分離され、前記指数X2と前記定数Yとの積が、前記積の整数部分である整数Xintと、前記積の小数部分である小数Xamariとに分離され、前記仮数X1に対して定まる、前記定数Yをべき指数とする前記入力値Xの前記仮数のべき乗値が記録され、前記小数Xamariに対して定まる、前記小数Xamariをべき指数とする、前記入力値Xを浮動小数点数で表現したときの底のべき乗値が記録され、前記仮数X1が用いられて取得された前記仮数の前記べき乗値、前記小数Xamariが用いられて取得された前記底の前記べき乗値、および前記整数Xintから、前記定数Yをべき指数とした、前記入力値Xのべき乗が演算される。 In the first aspect of the present invention, when performing a power operation of a predetermined input value X with a constant Y as a power exponent, the input value X in floating point type data is expressed by a floating point number. The input value X is separated into a mantissa X 1 which is a mantissa part representing the mantissa of the hour and an exponent X 2 which is an exponent part representing an exponent when the input value X is represented by a floating-point number, and the exponent The constant Y, wherein the product of X 2 and the constant Y is separated into an integer X int that is an integer part of the product and a decimal number X amari that is a decimal part of the product, and is determined with respect to the mantissa X 1 is recorded exponential value of the mantissa of the input value X to the exponent determined with respect to the fractional X amari, wherein the fractional X amari to the index, when representing said input values X in the floating-point number the exponential value of the bottom recording, said mantissa X 1 are used Obtained by said power value of the mantissa, the exponent value of the said bottom fraction X amari is acquired is used, and from the integer X int, and the exponent of the constant Y, a power of the input value X Is calculated.

本発明の第2の側面の演算処理装置は、定数Yをべき指数とした、所定の入力値Xのべき乗値の整数を求める演算処理装置であって、浮動小数点型のデータにおける、前記入力値Xを浮動小数点数で表現したときの仮数を表す仮数部である仮数X1と、前記入力値Xを浮動小数点数で表現したときの指数を表す指数部である指数X2とに、前記入力値Xを分離する仮数/指数分離手段と、前記指数X2と前記定数Yとの積を、前記積の整数部分である整数Xintと、前記積の小数部分である小数Xamariとに分離する整数/小数分離手段と、前記仮数X1に対して定まる、前記定数Yをべき指数とする前記入力値Xの前記仮数のべき乗値と、前記小数Xamariをべき指数とする、前記入力値Xを浮動小数点数で表現したときの底のべき乗値との積を示す固定小数点化されたデータに対して、前記固定小数点化されたデータの最下位ビットから小数点位置までのビット数から、前記整数Xintを減算して得られる数を示すビット数分だけ右シフト演算を行って、前記入力値Xのべき乗値の前記整数を求めるべき乗整数変換手段とを備える。   An arithmetic processing unit according to a second aspect of the present invention is an arithmetic processing unit that obtains an integer of a power value of a predetermined input value X with a constant Y as a power exponent, and the input value in floating-point type data The input value X1 is a mantissa X1 that is a mantissa representing a mantissa when X is represented by a floating-point number, and an exponent X2 that is an exponent representing an exponent when the input value X is represented by a floating-point number. An integer / decimal separator that separates a product of the exponent X2 and the constant Y into an integer Xint that is an integer part of the product and a decimal Xamari that is a decimal part of the product A power value of the mantissa of the input value X with the constant Y as a power exponent, and the input value X with a power of the decimal number Xamari, which is determined with respect to the mantissa X1 When the bottom of Indicates the number obtained by subtracting the integer Xint from the number of bits from the least significant bit of the fixed-point data to the decimal point position with respect to the fixed-point data that indicates the product with the raised value Power integer conversion means for performing a right shift operation by the number of bits and obtaining the integer of the power value of the input value X.

演算処理装置には、前記仮数X1に対して定まる、前記入力値Xの前記仮数の前記べき乗値を記録する第1の記録手段と、前記小数Xamariに対して定まる、前記底の前記べき乗値を記録する第2の記録手段とをさらに設け、前記べき乗整数変換手段には、前記仮数X1を用いて前記第1の記録手段から取得された前記仮数の前記べき乗値、および前記小数Xamariを用いて前記第2の記録手段から取得された前記底の前記べき乗値を用いて、前記入力値Xのべき乗値の前記整数を求めさせることができる。   The arithmetic processing unit includes a first recording unit that records the power value of the mantissa of the input value X, which is determined with respect to the mantissa X1, and the power value of the base that is determined with respect to the decimal number Xamari. A second recording means for recording, wherein the power integer conversion means uses the power value of the mantissa obtained from the first recording means using the mantissa X1 and the decimal number Xamari. The integer of the power value of the input value X can be obtained using the power value of the base acquired from the second recording means.

演算処理装置には、前記仮数X1を用いて前記第1の記録手段から取得した、複数の前記べき乗値を用いて補間処理を行い、最終的な前記仮数の前記べき乗値を求める補間手段をさらに設け、前記べき乗整数変換手段には、前記補間手段により求められた前記仮数の前記べき乗値を用いて、前記入力値Xのべき乗値の前記整数を求めさせることができる。   The arithmetic processing device further includes an interpolating unit that performs interpolation using a plurality of power values obtained from the first recording unit using the mantissa X1 and obtains the power value of the final mantissa. The power integer converting means may be configured to obtain the integer of the power value of the input value X using the power value of the mantissa obtained by the interpolation means.

演算処理装置には、前記小数Xamariを用いて前記第2の記録手段から取得した、複数の前記べき乗値を用いて補間処理を行い、最終的な前記底の前記べき乗値を求める補間手段をさらに設け、前記べき乗整数変換手段には、前記補間手段により求められた前記底の前記べき乗値を用いて、前記入力値Xのべき乗値の前記整数を求めさせることができる。   The arithmetic processing device further includes an interpolation unit that performs interpolation processing using a plurality of power values acquired from the second recording unit using the decimal number Xamari, and obtains the final power value of the base. The power integer converting means may be configured to obtain the integer of the power value of the input value X using the power value of the base obtained by the interpolation means.

本発明の第2の側面の演算処理方法またはプログラムは、定数Yをべき指数とした、所定の入力値Xのべき乗値の整数を求める場合に、浮動小数点型のデータにおける、前記入力値Xを浮動小数点数で表現したときの仮数を表す仮数部である仮数X1と、前記入力値Xを浮動小数点数で表現したときの指数を表す指数部である指数X2とに、前記入力値Xを分離し、前記指数X2と前記定数Yとの積を、前記積の整数部分である整数Xintと、前記積の小数部分である小数Xamariとに分離し、前記仮数X1に対して定まる、前記定数Yをべき指数とする前記入力値Xの前記仮数のべき乗値と、前記小数Xamariをべき指数とする、前記入力値Xを浮動小数点数で表現したときの底のべき乗値との積を示す固定小数点化されたデータに対して、前記固定小数点化されたデータの最下位ビットから小数点位置までのビット数から、前記整数Xintを減算して得られる数を示すビット数分だけ右シフト演算を行って、前記入力値Xのべき乗値の前記整数を求めるステップを含む。   When the arithmetic processing method or program according to the second aspect of the present invention obtains an integer that is a power value of a predetermined input value X with a constant Y as a power exponent, the input value X in the floating-point data is calculated. The input value X is separated into a mantissa X1 which is a mantissa part representing a mantissa when expressed in a floating-point number and an exponent X2 which is an exponent part representing an exponent when the input value X is represented as a floating-point number. The constant Y, which is determined by dividing the product of the exponent X2 and the constant Y into an integer Xint that is an integer part of the product and a decimal number Xamari that is a fractional part of the product, is determined with respect to the mantissa X1 A fixed-point indicating a product of the exponent value of the mantissa of the input value X having a power exponent and the power value of the base when the input value X is expressed as a floating-point number with the decimal number Xamari as a power exponent Day On the other hand, a right shift operation is performed by the number of bits indicating the number obtained by subtracting the integer Xint from the number of bits from the least significant bit of the fixed-point data to the decimal point position, and the input value Determining the integer value of the power of X.

本発明の第2の側面においては、定数Yをべき指数とした、所定の入力値Xのべき乗値の整数を求める場合に、浮動小数点型のデータにおける、前記入力値Xを浮動小数点数で表現したときの仮数を表す仮数部である仮数X1と、前記入力値Xを浮動小数点数で表現したときの指数を表す指数部である指数X2とに、前記入力値Xが分離され、前記指数X2と前記定数Yとの積が、前記積の整数部分である整数Xintと、前記積の小数部分である小数Xamariとに分離され、前記仮数X1に対して定まる、前記定数Yをべき指数とする前記入力値Xの前記仮数のべき乗値と、前記小数Xamariをべき指数とする、前記入力値Xを浮動小数点数で表現したときの底のべき乗値との積を示す固定小数点化されたデータに対して、前記固定小数点化されたデータの最下位ビットから小数点位置までのビット数から、前記整数Xintを減算して得られる数を示すビット数分だけ右シフト演算が行われて、前記入力値Xのべき乗値の前記整数が求められる。   In the second aspect of the present invention, when obtaining an integer of a power value of a predetermined input value X with a constant Y as a power exponent, the input value X in floating point type data is expressed by a floating point number. The input value X is separated into a mantissa X1 which is a mantissa part representing a mantissa when the input value X and an exponent X2 which is an exponent part representing an exponent when the input value X is represented by a floating-point number, and the exponent X2 And the constant Y are separated into an integer Xint that is an integer part of the product and a decimal Xamari that is a fractional part of the product, and the constant Y determined for the mantissa X1 is a power exponent Fixed-point data indicating the product of the exponent value of the mantissa of the input value X and the power value of the base when the input value X is expressed as a floating-point number with the decimal number Xamari as a power exponent On the other hand, A right shift operation is performed by the number of bits indicating the number obtained by subtracting the integer Xint from the number of bits from the least significant bit of the decimal point data to the decimal point position, and the power value of the input value X is calculated. The integer is determined.

本発明の第1の側面によれば、べき乗の演算を行うことができる。特に、本発明の第1の側面によれば、少ないメモリ量で、より簡単かつ精度よくべき乗の演算を行うことができる。   According to the first aspect of the present invention, a power can be calculated. In particular, according to the first aspect of the present invention, it is possible to perform power calculation more easily and accurately with a small amount of memory.

また、本発明の第2の側面によれば、べき乗の整数を求める演算を行うことができる。特に、本発明の第2の側面によれば、より簡単かつ精度よくべき乗の整数を求める演算を行うことができる。   Further, according to the second aspect of the present invention, it is possible to perform an operation for obtaining a power integer. In particular, according to the second aspect of the present invention, it is possible to perform an operation for obtaining a power integer in a simpler and more accurate manner.

以下、図面を参照して、本発明を適用した実施の形態について説明する。   Embodiments to which the present invention is applied will be described below with reference to the drawings.

[第1の実施の形態]
まず、本発明を適用した演算処理装置により行われる処理の概要を説明する。
[First Embodiment]
First, an outline of processing performed by the arithmetic processing device to which the present invention is applied will be described.

本発明を適用した演算処理装置は、入力値XのY乗を求める演算を行う。このとき、演算処理装置は、定数であるべき指数Yが例えばY=3.141592のような浮動小数点数など、どのような値であっても、べき乗の演算を行うことができるように、IEEE(Institute for Electrical and Electronics Engineering)754に基づく浮動小数点数の仮数と指数を利用して演算を行う。   The arithmetic processing apparatus to which the present invention is applied performs an operation for obtaining the Y power of the input value X. At this time, the arithmetic processing unit may use an IEEE (Institute) so that the exponent Y, which should be a constant, can perform a power operation regardless of any value such as a floating point number such as Y = 3.141592. for electrical and electronics engineering), using floating point mantissa and exponent based on 754.

例えば、IEEE754の規格に基づく単精度浮動小数点数を示す浮動小数点型のデータは、図4に示すように、32ビットのビット列で構成される。すなわち、浮動小数点数のデータの最下位ビットである0ビット目から22ビット目までの部分は、浮動小数点数の仮数を表す仮数部である仮数X1とされ、23ビット目から30ビット目までは、浮動小数点数の指数を表す指数部である指数X2とされ、最上位の31ビット目は符号ビットSとされる。 For example, as shown in FIG. 4, the floating-point type data indicating a single-precision floating-point number based on the IEEE754 standard is composed of a 32-bit bit string. That is, the portion from bit 0 is the least significant bit of the data of the floating-point number to a 22 th bit is a mantissa X 1 is a mantissa representing the mantissa of the floating-point number, up to 30 bit from 23 bit Is the exponent X 2 which is the exponent part representing the exponent of the floating-point number, and the most significant 31st bit is the sign bit S.

ここで、符号ビットSは、仮数部が正である場合には「0」とされ、仮数部が負の場合には「1」とされる。また、指数部のビット構成は「指数+バイアス」となる。したがって、指数部の指数X2は、実際の指数値にバイアスが加算された値である。例えば、IEEE754の規格では、単精度のバイアスとして127が用いられているため、指数値が「0」であるときは、指数X2の値は「127」(=0+127)となり、指数部は127のビット構成(0x7f)となる(「0x」は「7f」が16進数であることを示す)。 Here, the sign bit S is “0” when the mantissa part is positive, and is “1” when the mantissa part is negative. The bit structure of the exponent part is “exponent + bias”. Therefore, the exponent X 2 of the exponent part is a value obtained by adding a bias to the actual exponent value. For example, in the IEEE754 standard, 127 is used as a single precision bias. Therefore, when the exponent value is “0”, the value of the exponent X 2 is “127” (= 0 + 127), and the exponent part is 127. (0x7f) indicates that “7f” is a hexadecimal number.

なお、指数部が0と255の場合は、特別な意味があるが、その説明は省略する。   In addition, when the exponent part is 0 and 255, there is a special meaning, but the explanation is omitted.

このように浮動小数点型のデータにより表される入力値Xを数値表現形式で表すと、入力値Xは次式(18)に示すように表される。   Thus, when the input value X represented by the floating-point type data is represented in a numerical expression format, the input value X is represented as shown in the following equation (18).

Figure 2010032762
Figure 2010032762

なお、式(18)において、「.X1」は、仮数X1の上位ビットの前に小数点が位置するものとして仮数部を小数点表現していることを示す。また、式(18)における「B」はバイアス成分を示しており、「S」は符号ビットを示している。 In Expression (18), “.X 1 ” indicates that the mantissa part is expressed as a decimal point, assuming that the decimal point is located before the upper bits of the mantissa X 1 . Further, “B” in Expression (18) indicates a bias component, and “S” indicates a sign bit.

演算処理装置は、以上のような浮動小数点数である入力値Xを仮数X1と指数X2とに分離してべき乗の演算を行う。入力値XをIEEE754に基づく浮動小数点数で表すと、入力値Xは式(19)に示すように表される。 The arithmetic processing unit performs an exponentiation operation by separating the input value X, which is a floating point number as described above, into a mantissa X 1 and an exponent X 2 . When the input value X is expressed by a floating-point number based on IEEE754, the input value X is expressed as shown in Expression (19).

Figure 2010032762
Figure 2010032762

式(19)において、(1+X1/223)は、入力値Xを浮動小数点数で表現したときの仮数であり、この仮数におけるX1は、浮動小数点型のデータにおける、入力値Xの仮数を表す仮数部(仮数X1)である。また、式(19)において、X2は、浮動小数点型のデータにおける、入力値Xの指数を表す指数部(指数X2)である。さらに、式(19)では、浮動小数点数で表現された入力値Xの基数(底)は2とされている。 In the formula (19), (1 + X 1/2 23) is a mantissa when representing the input value X in the floating-point number, X 1 in the mantissa is in the floating-point data, the mantissa of the input value X Is a mantissa part (a mantissa X 1 ). In Expression (19), X 2 is an exponent part (exponent X 2 ) representing the exponent of the input value X in the floating-point data. Further, in the equation (19), the radix (base) of the input value X expressed by a floating point number is 2.

いま、入力値XのY乗を計算することを考えると、このべき乗の計算により得られる演算値P=XYは、次式(20)により表される。 Now, considering the calculation of the input value X to the Y power, the calculated value P = X Y obtained by this power calculation is expressed by the following equation (20).

Figure 2010032762
Figure 2010032762

また、式(20)における「X2×Y」の整数部分を整数Xintとし、小数部分を小数Xamariとすると、演算値P、整数Xint、および小数Xamariは、それぞれ式(21)乃至式(23)で表される。 Also, assuming that the integer part of “X 2 × Y” in the expression (20) is an integer X int and the decimal part is a decimal X amari , the calculated value P, the integer X int , and the decimal X amari are respectively expressed by the expression (21) Thru | or Formula (23).

Figure 2010032762
Figure 2010032762

Figure 2010032762
Figure 2010032762

Figure 2010032762
Figure 2010032762

なお、式(22)における(int)(A)は、浮動小数点数Aの小数部分を切り捨てて整数部分を得る演算を示しており、以下の説明において同じであるとする。   Note that (int) (A) in the equation (22) indicates an operation for rounding off the decimal part of the floating-point number A to obtain an integer part, and is the same in the following description.

演算処理装置は、式(21)の各項の値を求めることで、最終的に入力値Xをべき指数Yでべき乗した演算値Pを求める。なお、入力値X=0.0である場合は、浮動小数点数として特殊な場合であるので、演算値P=0.0Y=0として別途求まるものとする。 The arithmetic processing unit finally obtains a calculation value P obtained by raising the power of the input value X by a power exponent Y by obtaining the value of each term of Expression (21). Note that the case where the input value X = 0.0 is a special case as a floating-point number, and therefore it is separately obtained as the calculation value P = 0.0 Y = 0.

次に、図5に本発明を適用した演算処理装置の一実施の形態の構成例を示す。   Next, FIG. 5 shows a configuration example of an embodiment of an arithmetic processing apparatus to which the present invention is applied.

演算処理装置91は、仮数/指数分離部101、整数/小数分離部102、仮数のべき乗テーブル保持部103、小数のべき乗テーブル保持部104、べき乗演算部105、および整数変換部106から構成される。演算処理装置91では、仮数/指数分離部101に入力値Xが供給され、整数/小数分離部102に、定数であるべき指数Yが供給される。   The arithmetic processing unit 91 includes a mantissa / exponent separator 101, an integer / decimal separator 102, a mantissa power table holding unit 103, a decimal power table holding unit 104, a power operator 105, and an integer converter 106. . In the arithmetic processing unit 91, the input value X is supplied to the mantissa / exponent separator 101 and the exponent Y, which should be a constant, is supplied to the integer / decimal separator 102.

仮数/指数分離部101は、供給された入力値Xを、IEEE754に基づく浮動小数点数の仮数X1および指数X2に分離し、仮数X1をべき乗演算部105に供給するとともに、指数X2を整数/小数分離部102に供給する。整数/小数分離部102は、仮数/指数分離部101からの指数X2と、供給されたべき指数Yとの積の整数Xintおよび小数Xamariを求め、べき乗演算部105に供給する。 The mantissa / exponent separation unit 101 separates the supplied input value X into a floating-point number mantissa X 1 and an exponent X 2 based on IEEE 754, supplies the mantissa X 1 to the power operation unit 105, and uses the exponent X 2. Is supplied to the integer / decimal separator 102. The integer / decimal separator 102 obtains an integer X int and a decimal X amari of the product of the exponent X 2 from the mantissa / exponent separator 101 and the supplied exponent Y, and supplies them to the power calculator 105.

仮数のべき乗テーブル保持部103は、仮数X1の値により定まる、入力値Xの仮数部分のべき乗の値が含まれる仮数のべき乗テーブルを保持している。すなわち、仮数のべき乗テーブルには、仮数X1から求められ、入力値Xの仮数部分のべき乗の値を特定するために用いられるインデックスindex1と、そのインデックスindex1に対応付けられた入力値Xの仮数部分のべき乗の値とのセットが複数含まれている。ここで、入力値Xの仮数部分とは、式(19)における(1+X1/223)であり、べき乗のべき指数は、べき指数Yとされる。 Power table holding unit 103 of the mantissa is determined by the value of the mantissa X 1, it holds the power table of mantissa that includes power value of the mantissa part of the input value X. That is, the mantissa power table is obtained from the mantissa X 1 and used to specify the power value of the mantissa part of the input value X, and the mantissa of the input value X associated with the index index 1 Multiple sets of power values for parts are included. Here, the mantissa part of the input value X, represented by the formula (19) in the (1 + X 1/2 23 ), exponent of power is the exponent Y.

小数のべき乗テーブル保持部104は、小数Xamariの値により定まり、小数Xamariをべき指数とする、入力値Xを浮動小数点数で表現したときの基数(底)のべき乗の値が含まれる小数のべき乗テーブルを保持している。すなわち、小数のべき乗テーブルには、小数Xamariから求められ、入力値Xの基数のべき乗の値を特定するために用いられるインデックスindex2と、そのインデックスindex2に対応付けられた入力値Xの基数のべき乗の値とのセットが複数含まれている。 Power table storing unit 104 in decimal, Sadamari the value of the fractional X amari, and fractional X amari to the index, fraction containing the power of the value of the radix (base) when representing the input value X in the floating-point number Holds a power table. That is, in the power table of the decimal number, the index index2 obtained from the decimal number X amari and used to specify the power value of the radix of the input value X, and the radix of the input value X associated with the index index2 Multiple sets with power values are included.

べき乗演算部105は、仮数のべき乗テーブル保持部103の仮数のべき乗テーブル、および小数のべき乗テーブル保持部104の小数のべき乗テーブルを参照して、仮数/指数分離部101からの仮数X1と、整数/小数分離部102からの整数Xintおよび小数Xamariとから演算値Pを求める。べき乗演算部105は求めた演算値Pを整数変換部106に供給する。整数変換部106は、べき乗演算部105からの演算値Pに定数αが加算されて得られる数の整数部分を求め、出力する。 The power calculation unit 105 refers to the mantissa power table of the mantissa power table holding unit 103 and the mantissa power table of the decimal power table holding unit 104, and the mantissa X 1 from the mantissa / exponent separation unit 101, The calculated value P is obtained from the integer X int and the decimal number X amari from the integer / decimal separator 102. The power calculation unit 105 supplies the calculated calculation value P to the integer conversion unit 106. The integer conversion unit 106 calculates and outputs the integer part of the number obtained by adding the constant α to the calculation value P from the power calculation unit 105.

このように演算処理装置91は、入力値Xに対してべき指数Yのべき乗演算を行い、その結果得られる演算値P=XYに予め定められた定数αを加算して得られる数の整数部分を求めて出力する。したがって、例えば、入力値Xが式(1)における(AX/2q/4)であり、べき指数Yが3/4であり、定数αが「-0.0946+0.5」である場合には、演算処理装置91は、図1の量子化部27に対応する装置となる。すなわち、そのような場合、演算処理装置91は、入力されたオーディオ信号としての入力値Xを非線形量子化する量子化装置となる。 In this way, the arithmetic processing unit 91 performs the exponentiation operation of the exponent Y with respect to the input value X, and an integer of the number obtained by adding a predetermined constant α to the operation value P = XY obtained as a result. Find the part and output it. Therefore, for example, when the input value X is (AX / 2 q / 4 ) in the formula (1), the power index Y is 3/4, and the constant α is “−0.0946 + 0.5”, The arithmetic processing device 91 is a device corresponding to the quantization unit 27 of FIG. That is, in such a case, the arithmetic processing unit 91 is a quantization device that nonlinearly quantizes the input value X as an input audio signal.

次に、図6のフローチャートを参照して、演算処理装置91によるべき乗演算処理について説明する。   Next, with reference to the flowchart of FIG. 6, the power calculation process by the calculation processing device 91 will be described.

ステップS41において、仮数のべき乗テーブル保持部103は、仮数のべき乗テーブルを生成する。すなわち、仮数のべき乗テーブル保持部103は、仮数のべき乗テーブルのテーブルサイズを2N=SIZEとすると、次式(24)に示される、入力値Xの仮数部分をY乗して得られる浮動小数点型のデータのべき乗値frctable[i]からなる仮数のべき乗テーブルを生成する。 In step S41, the mantissa power table holding unit 103 generates a mantissa power table. That is, the mantissa power table holding unit 103 sets the mantissa power table size to 2 N = SIZE, and the floating point obtained by raising the mantissa part of the input value X shown in the following equation (24) to the Y power Generates a mantissa power table consisting of power values frctable [i] of type data.

Figure 2010032762
Figure 2010032762

ここで、テーブルサイズSIZEは、Nビットのデータで表すことのできる数の個数であり、このテーブルサイズSIZEの個数だけべき乗値frctable[i]が用意されることになる。また、べき乗値frctable[i]の変数iは、仮数X1から求まるインデックスindex1の値を示しており、変数i=0,・・・,(SIZE−1)とされる。 Here, the table size SIZE is the number of numbers that can be represented by N-bit data, and power values frctable [i] corresponding to the number of table sizes SIZE are prepared. Further, the variable i of the exponential value frctable [i] indicates the value of the index index1 obtained from mantissa X 1, variable i = 0, · · ·, are (SIZE-1).

インデックスindex1を仮数X1の上位何ビットかの値とすれば、式(24)における(1+i/SIZE)Yは、仮数X1の値に対する、入力値Xの仮数部分をY乗して得られる値(1+X1/223Yの近似値となる。 If the index index1 and many of the high-order bits of the value of the mantissa X 1, (1 + i / SIZE) Y in the formula (24), for the values of the mantissa X 1, obtained by multiplication Y mantissa part of the input value X the approximation of a value (1 + X 1/2 23 ) Y.

仮数のべき乗テーブル保持部103は、(SIZE)個の各変数の値iのそれぞれに対する、べき乗値frctable[i]のそれぞれを求めると、それらの値iとべき乗値frctable[i]とを対応付けて仮数のべき乗テーブルを生成し、保持する。   When the mantissa power table holding unit 103 obtains each power value frctable [i] for each of the (SIZE) variable values i, the mantissa power table holding unit 103 associates the value i with the power value frctable [i]. To generate and hold a mantissa power table.

ステップS42において、小数のべき乗テーブル保持部104は、小数のべき乗テーブルを生成する。すなわち、小数のべき乗テーブル保持部104は、小数のべき乗テーブルのテーブルサイズを2N=SIZEとすると、次式(25)に示される入力値X(演算値P)の基数である2をXamari乗して得られる浮動小数点型のデータのべき乗値twotable[i]からなる小数のべき乗テーブルを生成する。 In step S42, the decimal power table holding unit 104 generates a decimal power table. That is, power table storing unit 104 in decimal, when the table size of the fractional powers table and 2 N = SIZE, 2 is a base of the input values shown in the following equation (25) X (calculated value P) X amari Generates a power table of decimal numbers consisting of power values twotable [i] of floating-point data obtained by multiplication.

Figure 2010032762
Figure 2010032762

ここで、べき乗値twotable[i]の変数iは、小数Xamariから求まるインデックスindex2の値を示しており、変数i=0,・・・,(SIZE−1)とされる。 Here, the variable i of the power value twotable [i] indicates the value of the index index2 obtained from the decimal number X amari , and the variable i = 0,..., (SIZE−1).

インデックスindex2を、小数Xamariの上位何ビットかの値とすれば、式(25)における2(i/SIZE)は、小数Xamariの値に対する、入力値Xの基数「2」のXamari乗の値2^Xamariの近似値となる。 If the index index2 is a value of several high-order bits of the decimal number X amari , 2 (i / SIZE) in equation (25 ) is the power of the base value “2” of the input value X with respect to the value of the decimal number X amari to the X amari power The value of 2 ^ X amari is an approximate value.

小数のべき乗テーブル保持部104は、(SIZE)個の各変数の値iのそれぞれに対する、べき乗値twotable[i]のそれぞれを求めると、それらの値iとべき乗値twotable[i]とを対応付けて小数のべき乗テーブルを生成し、保持する。   When the power table holding unit 104 of decimal numbers obtains each power value twotable [i] for each of the values i of (SIZE) variables, the value i is associated with the power value twotable [i]. To generate and hold a power table of decimal numbers.

なお、仮数のべき乗テーブルおよび小数のべき乗テーブルを生成する処理は、入力値Xのべき乗演算前に1度行っておけばよい。つまり、1度これらのテーブルを生成しておけば、その後、入力値Xのべき乗演算を行うときは、既に生成されて保持されている仮数のべき乗テーブルおよび小数のべき乗テーブルを用いればよい。   Note that the process of generating the mantissa power table and the decimal power table may be performed once before the power calculation of the input value X. In other words, once these tables are generated, then when performing a power operation of the input value X, a mantissa power table and a decimal power table already generated and held may be used.

ステップS43において、仮数/指数分離部101は、供給された入力値Xの仮数X1および指数X2を求め、仮数X1をべき乗演算部105に供給するとともに、指数X2を整数/小数分離部102に供給する。 In step S43, the mantissa / exponent separating unit 101 obtains the mantissa X 1 and exponent X 2 of the supplied input values X, to supply a mantissa X 1 in exponentiation unit 105, the index X 2 integer / fraction separation To the unit 102.

ここで、例えば、入力値Xが図4に示した浮動小数点型のデータとされる場合、入力値Xのデータの下位23ビットの部分が、仮数X1のデータとされ、入力値Xのデータの30ビット目から23ビット目までの8ビットの部分からバイアス値を引き算した値が、指数X2のデータとされる。つまり、仮数X1および指数X2は、浮動小数点数の仮数部および指数部を表す整数型のデータとされる。 Here, for example, when the input value X is the floating-point type data shown in FIG. 4, the lower 23 bits of the input value X data are the mantissa X 1 data, and the input value X data the value obtained by subtracting the bias value from 8 bits portion from 30 bit to 23 bit of is the exponent X 2 data. That is, the mantissa X 1 and the exponent X 2 are integer type data representing the mantissa part and the exponent part of the floating-point number.

ステップS44において、整数/小数分離部102は、仮数/指数分離部101からの指数X2と、供給されたべき指数Yとの積の整数Xintおよび小数Xamariを求め、べき乗演算部105に供給する。 In step S 44, the integer / decimal separator 102 obtains an integer X int and a decimal X amari of the product of the exponent X 2 from the mantissa / exponent separator 101 and the supplied exponent Y, and Supply.

具体的には、整数/小数分離部102は、指数X2と、べき指数Yとの積(X2×Y)を求め、その積を用いて次式(26)により整数Xintを求める。 Specifically, the integer / decimal separator 102 obtains the product (X 2 × Y) of the exponent X 2 and the power exponent Y, and uses the product to obtain the integer X int by the following equation (26).

Figure 2010032762
Figure 2010032762

すなわち、積(X2×Y)が0以上である場合には、その積の整数部分が抽出されて整数Xintとされ、積(X2×Y)が0未満である場合には、その積の整数部分が抽出され、その整数部分からさらに1が減算された値が整数Xintとされる。この整数Xintのデータは、整数型のデータとされる。 That is, when the product (X 2 × Y) is 0 or more, the integer part of the product is extracted to be an integer X int, and when the product (X 2 × Y) is less than 0, An integer part of the product is extracted, and a value obtained by further subtracting 1 from the integer part is set as an integer X int . The integer X int data is integer type data.

また、整数/小数分離部102は、積(X2×Y)を用いて、次式(27)により小数Xamariを求める。 Further, the integer / decimal separator 102 uses the product (X 2 × Y) to obtain the decimal X amari by the following equation (27).

Figure 2010032762
Figure 2010032762

式(27)では、積(X2×Y)から、その積の整数部分が減算されて得られる値(差分)に、さらに223が乗算された値の整数部分が小数Xamariとされる。つまり、積(X2×Y)と積の整数部分との差分を求めることで、積(X2×Y)の小数部分の値が求まる。そして、その小数部分の値に223を乗算して、その結果得られる値の整数部分を抽出することで、積(X2×Y)の小数部分が、小数点が23ビット目に位置する固定小数点数のデータに変換される。 In the equation (27), the integer part of the value obtained by multiplying the product (X 2 × Y) by subtracting the integer part of the product (difference) and further multiplying by 2 23 is defined as the decimal X amari. . That is, the value of the fractional part of the product (X 2 × Y) can be obtained by obtaining the difference between the product (X 2 × Y) and the integer part of the product. Then, by multiplying the 2 23 to the value of the fractional part, by extracting the integer part of a value obtained as a result, the fractional part of the product (X 2 × Y) is, the decimal point is positioned in the 23 th bit fixed Converted to decimal data.

ステップS45において、べき乗演算部105は、仮数/指数分離部101から供給された仮数X1を用いて、べき指数Yに対する入力値Xの仮数部分のべき乗の値(1+X1/223Yを求める。 In step S45, the power calculation unit 105, by using the mantissa X 1 supplied from the mantissa / exponent separation unit 101, a power value (1 + X 1/2 23 ) Y mantissa part of the input value X for the exponent Y Ask.

すなわち、べき乗演算部105は、次式(28)を計算することにより、仮数X1の22ビット目から上位Nビットの値をインデックスindex1として求め、そのインデックスindex1を用いて式(29)により、入力値Xの仮数部分のべき乗の値を求める。 That is, the power calculation unit 105 calculates the following equation (28) to obtain the value of the upper N bits from the 22nd bit of the mantissa X 1 as the index index1, and uses the index index1 to The power value of the mantissa part of the input value X is obtained.

Figure 2010032762
Figure 2010032762

Figure 2010032762
Figure 2010032762

なお、式(28)において「>>」は右シフトを示している。図4に示したように、仮数X1は23ビットの値であるので、仮数X1を(23−N)ビットだけ右シフトすれば、仮数X1の上位Nビットの値を取り出すことができる。 In Expression (28), “>>” indicates a right shift. As shown in FIG. 4, since the mantissa X 1 is a 23-bit value, if the mantissa X 1 (23-N) bits shifted right, it is possible to retrieve the value of the upper N bits of the mantissa X 1 .

べき乗演算部105は、仮数X1から抽出した上位Nビットの値をインデックスindex1とし、そのインデックスindex1を変数iの値としたべき乗値frctable[index1]を、仮数のべき乗テーブル保持部103の仮数のべき乗テーブルから取得する。そして、この取得されたべき乗値frctable[index1]が、入力値Xの仮数部分のべき乗の値(1+X1/223Yとされる。 The exponent operation unit 105 uses the value of the upper N bits extracted from the mantissa X 1 as the index index 1, and sets the exponent value frctable [index 1] with the index index 1 as the value of the variable i as the mantissa of the mantissa power table holding unit 103. Get from the power table. Then, the obtained exponential value frctable [index1] is, power of the value of the mantissa part of the input value X (1 + X 1/2 23) are Y.

ステップS46において、べき乗演算部105は、整数/小数分離部102から供給された小数Xamariを用いて、小数Xamariをべき指数とする、入力値Xの基数である2のべき乗を求める。 In step S <b > 46, the power calculation unit 105 uses the decimal number X amari supplied from the integer / decimal number separation unit 102 to obtain a power of 2 that is a radix of the input value X using the decimal number X amari as a power exponent.

すなわち、べき乗演算部105は、次式(30)および式(31)を計算することで、インデックスindex2を求め、そのインデックスindex2を用いて式(32)より、入力値Xの基数のべき乗の値を求める。   That is, the power calculation unit 105 calculates the following expression (30) and expression (31) to obtain the index index2, and uses the index index2 to calculate the power of the radix of the input value X from the expression (32). Ask for.

Figure 2010032762
Figure 2010032762

Figure 2010032762
Figure 2010032762

Figure 2010032762
Figure 2010032762

なお、式(30)において「>>」は右シフトを示しており、式(31)において「&」は論理積演算を示している。   In Expression (30), “>>” indicates a right shift, and in Expression (31), “&” indicates a logical product operation.

すなわち、べき乗演算部105は、小数Xamariを(23−N)ビットだけ右シフトすることにより、小数Xamariの(23−N)ビット目から上位ビットの値を取り出してindex2’とする。ここで、小数Xamariは式(27)の計算により、小数点位置が23ビット目にある固定小数点数とされているので、小数Xamariを(23−N)ビットだけ右シフトすると、小数Xamariの小数部分の(23−N)ビット目から上位ビットの値が抽出される。 That is, the power calculation unit 105, by right shifting the fraction X amari only (23-N) bits, retrieve the values of the upper bits from the (23-N) th bit of the fraction X amari and index2 '. Here, the fractional X amari by calculation of equation (27), since there is a fixed-point number-point position is 23 bit, right shifting the fraction X amari only (23-N) bits, the fractional X amari The value of the upper bit is extracted from the (23-N) th bit of the decimal part.

また、べき乗演算部105は、このようにして得られたindex2’と、(SIZE−1)との論理積演算をすることでNビットのインデックスindex2を求め、そのインデックスindex2を変数iの値としたべき乗値twotable[index2]を、小数のべき乗テーブル保持部104の小数のべき乗テーブルから取得する。そして、この取得されたべき乗値twotable[index2]が、基数である2のべき乗値(2^(Xamari))とされる。 The power calculation unit 105 obtains an N-bit index index2 by performing an AND operation between the index2 ′ obtained in this way and (SIZE−1), and uses the index index2 as the value of the variable i. The raised power value twotable [index2] is obtained from the power table of decimal numbers in the power table holding unit 104 of decimal numbers. Then, the acquired power value twotable [index2] is set to a power value of 2 (2 ^ (X amari )) as a radix.

ここで、式(31)の論理積演算と、式(26)の積(X2×Y)が負である場合における、積(X2×Y)の整数からの1の減算とを行うことは、次の演算を行うことと等価である。すなわち、式(31)および式(26)の演算は、積(X2×Y)=(Xint×Xamari)における小数Xamariが負であるときに、積の整数Xintから1を減算し、積の小数Xamariに1を加算することと等価である。 Here, by performing a logical AND operation of formula (31), when the product of formula (26) (X 2 × Y) is negative, and one subtraction from integer product (X 2 × Y) Is equivalent to performing the following operation. That is, the operations of the equations (31) and (26) subtract 1 from the product integer X int when the fraction X amari in the product (X 2 × Y) = (X int × X amari ) is negative. This is equivalent to adding 1 to the product decimal X amari .

このような演算を行うと、インデックスindex2を用いて、小数のべき乗テーブルからインデックスindex2により特定されるべき乗値を取得する際に、必要となる条件分岐の数を減らすことができ、より迅速にべき乗値を得ることができるようになる。   When such an operation is performed, the number of conditional branches required when the power value specified by the index index2 is obtained from the power table of the decimal number using the index index2 can be reduced, and the power can be raised more quickly. You will be able to get the value.

なお、2のべき乗演算を、テーブルを用いてべき指数の小数と整数とに分けて行う場合に、べき指数が負であるときに小数に1を加算し、整数から1を減算することで、テーブル引きの条件分岐数を削減する技術は、特開2004−172700に記載されている。   In addition, when the exponentiation operation of 2 is performed by dividing into a power exponent fraction and an integer using a table, by adding 1 to the decimal and subtracting 1 from the integer when the power exponent is negative, A technique for reducing the number of conditional branches for table lookup is described in Japanese Patent Application Laid-Open No. 2004-172700.

以上のようにして、べき乗の値(1+X1/223Yと、べき乗の値(2^(Xamari))とがテーブル引きにより求められる。 As described above, the power of a value (1 + X 1/2 23 ) Y, power value (2 ^ (X amari)) and is determined by the table lookup.

ステップS47において、べき乗演算部105は、べき乗の値(1+X1/223Y、およびべき乗の値(2^(Xamari))と、整数/小数分離部102からの整数Xintとを用いて演算値Pを求める。 In step S47, the power calculation unit 105, using power of a value (1 + X 1/2 23 ) Y, and the power of the value (2 ^ (X amari)) , and integer X int from Integer / fractional separation unit 102 To obtain the calculated value P.

すなわち、べき乗演算部105は、次式(33)を計算することで、演算値Pを得る。   That is, the power calculation unit 105 obtains the calculated value P by calculating the following equation (33).

Figure 2010032762
Figure 2010032762

ここで、式(33)において、「(1+X1/223Y」および「2^Xamari」は既に求められているので、整数Xintをべき指数とする、入力値Xの基数である2のべき乗の値「2^Xint」を求めればよいことになる。 Here, in the formula (33), "(1 + X 1/2 23 ) Y " so and "2 ^ X amari" has already been obtained, and exponent integer X int, is the cardinality of the input value X What is necessary is just to obtain | require the value of 2 power "2 ^ Xint ".

そこで、べき乗演算部105は、式(34)を計算することで、べき乗の値「2^Xint」を求める。 Therefore, the power calculation unit 105 calculates the power value “2 ^ X int ” by calculating Expression (34).

Figure 2010032762
Figure 2010032762

なお、式(34)において、「<<」は左シフトを示している。すなわち、べき乗演算部105は、求めようとするべき乗の値「2^Xint」、つまり演算値Pを、IEEE754に基づく浮動小数点型のフォーマットのデータとするために、整数Xintにバイアス成分「127」を加算し、23ビットだけ左シフトする。 In Expression (34), “<<” indicates a left shift. That is, the power calculating section 105, power value "2 ^ X int" to be obtained, i.e. the calculated value P, to the floating-point format data based on the IEEE754, bias component to the integer X int " 127 "is added and left shifted by 23 bits.

左シフト演算が行われるのは、図4に示したように、浮動小数点数の指数部が、データにおける30ビット目から23ビット目までの部分となるからである。これにより、指数部が「Xint+127」である浮動小数点型のデータが得られる。なお、べき乗値(1+X1/223Yおよびべき乗値(2^Xamari)も、予めまたは演算により浮動小数点型のデータとされるようになされる。 The left shift operation is performed because, as shown in FIG. 4, the exponent part of the floating-point number is the part from the 30th bit to the 23rd bit in the data. As a result, floating-point type data whose exponent is “X int +127” is obtained. Incidentally, exponential value (1 + X 1/2 23 ) Y and exponential value (2 ^ X amari) are also adapted to be a floating-point data in advance by or operation.

さらに、べき乗演算部105は、「(1+X1/223Y」、「2^Xamari」、および「2^Xint」を上述した式(33)に代入することで、演算値Pを示す浮動小数点型のデータを得る。このようにして求められた演算値Pは、べき乗演算部105から整数変換部106に供給される。 Further, exponentiation unit 105, "(1 + X 1/2 23 ) Y ", "2 ^ X amari", and "2 ^ X int" and by substituting the equation (33) described above, the calculated value P Get the floating-point data shown. The calculation value P obtained in this way is supplied from the power calculation unit 105 to the integer conversion unit 106.

ステップS48において、整数変換部106は、べき乗演算部105から供給された演算値Pを整数化して出力し、べき乗演算処理は終了する。   In step S48, the integer conversion unit 106 converts the calculation value P supplied from the power calculation unit 105 into an integer and outputs it, and the power calculation process ends.

すなわち、整数変換部106は、次式(35)を計算することにより、演算値Pに定数αが加算されて得られる数の整数部分を求め、求められた値を、整数化された演算値Pである出力値として出力する。   That is, the integer conversion unit 106 calculates the following equation (35) to obtain the integer part of the number obtained by adding the constant α to the operation value P, and the obtained value is converted into an integer operation value. Output as an output value P.

Figure 2010032762
Figure 2010032762

以上のようにして、演算処理装置91は、入力値Xを浮動小数点数の仮数X1および指数X2に分離し、仮数X1と、指数X2およびべき指数Yから得られる小数Xamariおよび整数Xintとを用いて、入力値Xのべき乗を演算する。 As described above, the processing unit 91 separates the input value X in mantissa X 1 and exponent X 2 floating-point numbers, and mantissa X 1, fractional X amari obtained from the exponent X 2 and exponent Y and by using the integer X int, it calculates the power of the input value X.

このように、入力値Xから得られる仮数X1と、小数Xamariおよび整数Xintとを用いて、入力値Xのべき乗を演算することで、任意の入力値Xに対して、より簡単かつ精度よくべき乗の演算を行うことができる。 In this way, by calculating the power of the input value X using the mantissa X 1 obtained from the input value X, the decimal number X amari and the integer X int, it is simpler and easier for any input value X. The power can be calculated with high accuracy.

すなわち、このようにしてべき乗の演算を行うことにより、べき指数が分数表現されたものに限らず、Y=3.141592のような浮動小数点数である場合であっても、簡単な処理で迅速にべき乗の演算を行うことができる。また、浮動小数点数の仮数X1および指数X2を用いた演算を行うため、上述した式(12)に示される、従来の指数調整テーブルを用いた煩雑な処理が必要なくなる。 That is, by performing the power operation in this way, the power exponent is not limited to a fractional expression, and even if it is a floating-point number such as Y = 3.141592, the power can be quickly raised with simple processing. Can be performed. In addition, since the calculation using the mantissa X 1 and the exponent X 2 of the floating-point number is performed, complicated processing using the conventional exponent adjustment table shown in the above-described equation (12) is not necessary.

さらに、(SIZE)個の仮数のべき乗テーブルと、(SIZE)個の小数のべき乗テーブルとを用いて、つまり合計(SIZE×2)個のテーブルを用いるだけで、べき乗の演算を簡単かつ迅速に行うことができる。特に、従来の特許文献1の例と比較すると、テーブル数を1/Bにするこができ、テーブルを記録しておくメモリのメモリ容量を大幅に削減することができる。   Furthermore, using (SIZE) mantissa power tables and (SIZE) fractional power tables, that is, using only a total of (SIZE x 2) tables, the power calculation can be performed easily and quickly. It can be carried out. In particular, compared with the example of the conventional patent document 1, the number of tables can be reduced to 1 / B, and the memory capacity of the memory storing the tables can be greatly reduced.

なお、以上においては、仮数のべき乗テーブルと小数のべき乗テーブルのテーブルサイズが同じである例について説明したが、それらのテーブルサイズは、必要な精度に応じて異なる大きさとされてもよい。   In the above description, an example in which the mantissa power table and the decimal power table have the same table size has been described. However, the table sizes may be different depending on required accuracy.

また、浮動小数点数の形式(フォーマット)は、単精度浮動小数点の形式に限らず、倍精度浮動小数点の形式などであってもよい。   Further, the format (format) of the floating point number is not limited to the single precision floating point format, and may be a double precision floating point format.

[第2の実施の形態]
ところで、本出願人が、べき指数Y=3.141592とし、L=8192個のデータを用いて、上述した式(17)を計算して求まる相対誤差平均Tにより、演算処理装置91のべき乗の演算精度の評価を行ったところ、N=8のとき、つまりテーブルサイズSIZE=256のとき、T=6.0×10-3であった。また、N=16のとき、つまりテーブルサイズSIZE=65536のとき、T=3.85×10-6であった。
[Second Embodiment]
By the way, the present applicant sets power exponent Y = 3.141592 and uses L = 8192 data to calculate the above-described equation (17), thereby calculating the power of the arithmetic processing unit 91 based on the relative error average T. When N = 8, that is, when the table size SIZE = 256, T = 6.0 × 10 −3 . Further, when N = 16, that is, when the table size SIZE = 65536, T = 3.85 × 10 −6 .

この評価結果から、演算処理装置91では、仮数のべき乗テーブルおよび小数のべき乗テーブルを記録させておくメモリ容量は少なくて済むが、べき乗演算の精度をより高くしようとすると、やはりテーブルサイズを増やす必要があることが分かる。   From this evaluation result, the arithmetic processing unit 91 requires less memory capacity to record the mantissa power table and the fractional power table, but it is necessary to increase the table size to increase the accuracy of the power operation. I understand that there is.

そこで、演算処理装置において、仮数のべき乗テーブルおよび小数のべき乗テーブルの値(べき乗の値)に対して補間処理を行うことで、テーブルサイズを増やさずにべき乗演算の精度を向上させることができるようにする。   Therefore, by performing interpolation processing on the values of the mantissa power table and decimal power table (power value) in the arithmetic processing device, the accuracy of the power operation can be improved without increasing the table size. To.

具体的には、例えば、図7に示すように、演算処理装置91は、浮動小数点数のデータの22ビット目から0ビット目までの仮数部のうち、22ビット目から上位Nビットの部分を用いてべき乗の値を得ていた。つまり、上位Nビットの部分を用いた近似により、べき乗の値を得ていたので、この近似には誤差が含まれる。   Specifically, for example, as shown in FIG. 7, the arithmetic processing unit 91 calculates the upper N bits from the 22nd bit of the mantissa part from the 22nd bit to the 0th bit of the floating point number data. Used to obtain a power value. In other words, since the power value is obtained by approximation using the upper N bits, this approximation includes an error.

そこで、22ビット目から上位Nビットの部分を用いてべき乗の値を得て、さらに残りの(23−N)ビットの部分、つまり(22−N)ビット目から0ビット目までの部分を、べき乗の値の補間処理に用いることで、べき乗演算の精度を向上させる。   Therefore, the power value is obtained from the 22nd bit using the upper N bits, and the remaining (23-N) bit, that is, the (22-N) th bit to the 0th bit is obtained. By using the interpolation process for the power value, the accuracy of the power operation is improved.

そのような場合、演算処理装置は、図8に示すように構成される。なお、図8において、図5における場合と対応する部分には、同一の符号を付してあり、その説明は省略する。   In such a case, the arithmetic processing unit is configured as shown in FIG. In FIG. 8, parts corresponding to those in FIG. 5 are denoted by the same reference numerals, and description thereof is omitted.

演算処理装置131は、仮数/指数分離部101、整数/小数分離部102、仮数のべき乗テーブル保持部103、小数のべき乗テーブル保持部104、べき乗演算部105、整数変換部106、および補間処理部141から構成される。すなわち、演算処理装置131には、演算処理装置91に、さらに補間処理部141が設けられている。   The arithmetic processing unit 131 includes a mantissa / exponent separation unit 101, an integer / decimal separation unit 102, a mantissa power table holding unit 103, a decimal power table holding unit 104, a power operation unit 105, an integer conversion unit 106, and an interpolation processing unit. 141. That is, the arithmetic processing unit 131 is further provided with an interpolation processing unit 141 in addition to the arithmetic processing unit 91.

補間処理部141は、仮数/指数分離部101からの仮数X1を用いてインデックスindex1を求め、仮数のべき乗テーブル保持部103の仮数のべき乗テーブルから、インデックスindex1の近傍の複数のテーブル値(べき乗値)を取得する。また、補間処理部141は、仮数のべき乗テーブルから取得したテーブル値を用いて補間処理を行い、これにより求められた入力値Xの仮数部分のべき乗の値である補間値(1+X1/223Yを、補間処理により得られた最終的な入力値Xの仮数部分のべき乗の値として、べき乗演算部105に供給する。 Interpolation processing unit 141 obtains an index index1 with mantissa X 1 from mantissa / exponent separation unit 101, a power table for the mantissa of the mantissa of the power table holding unit 103, a plurality of table values in the vicinity of the index index1 (exponentiation Value). Further, the interpolation processing unit 141 performs interpolation processing using the table values obtained from the mantissa of the power table, thereby a power of a value of the mantissa part of the input value X obtained interpolated value (1 + X 1/2 23 ) Y is supplied to the power calculation unit 105 as the power value of the mantissa part of the final input value X obtained by the interpolation process.

補間処理部141は、整数/小数分離部102からの小数Xamariを用いてインデックスindex2を求め、小数のべき乗テーブル保持部104の小数のべき乗テーブルから、インデックスindex2の近傍の複数のテーブル値(べき乗値)を取得する。また、補間処理部141は、小数のべき乗テーブルから取得したテーブル値を用いて補間処理を行い、これにより求められた入力値Xの基数のべき乗の値である補間値(2^Xamari)を、補間処理により得られた最終的な基数のべき乗値としてべき乗演算部105に供給する。 The interpolation processing unit 141 obtains the index index2 using the decimal number X amari from the integer / decimal separation unit 102, and uses a plurality of table values (powers) in the vicinity of the index index2 from the decimal power table of the decimal power table holding unit 104. Value). Further, the interpolation processing unit 141 performs an interpolation process using the table value acquired from the decimal power table, and obtains an interpolation value (2 ^ X amari ) that is a power value of the radix of the input value X obtained thereby. The final power of the radix obtained by the interpolation process is supplied to the power calculation unit 105.

次に、図9のフローチャートを参照して、演算処理装置131によるべき乗演算処理について説明する。   Next, with reference to the flowchart of FIG. 9, the power calculation process by the calculation processing device 131 will be described.

なお、ステップS71の処理乃至ステップS74の処理は、図6のステップS41の処理乃至ステップS44の処理と同様であるため、その説明は省略する。   Note that the processing from step S71 to step S74 is the same as the processing from step S41 to step S44 in FIG.

但し、仮数のべき乗テーブルおよび小数のべき乗テーブルのテーブルサイズは、補間処理部141により補間処理として線形補間が行われる場合には2N+1=SIZE+1とされ、補間処理として2次の多項式補間が行われる場合には2N+2=SIZE+2とされる。 However, the table sizes of the mantissa power table and the decimal power table are 2 N + 1 = SIZE + 1 when linear interpolation is performed as interpolation processing by the interpolation processing unit 141, and second-order polynomial interpolation is performed as interpolation processing. In this case, 2 N + 2 = SIZE + 2.

例えば、補間処理として2次の多項式補間が行われる場合、式(24)および式(25)に示した仮数のべき乗テーブルおよび小数のべき乗テーブルが生成され、変数i=0,・・・,SIZE+1とされる。   For example, when quadratic polynomial interpolation is performed as the interpolation processing, the mantissa power table and the decimal power table shown in Expression (24) and Expression (25) are generated, and variables i = 0,..., SIZE + 1 It is said.

また、仮数/指数分離部101により求められた仮数X1は補間処理部141に供給される。さらに、整数/小数分離部102により求められた小数Xamariは補間処理部141に供給され、整数Xintはべき乗演算部105に供給される。 Further, the mantissa X 1 obtained by the mantissa / exponent separation unit 101 is supplied to the interpolation processing unit 141. Further, the decimal number X amari obtained by the integer / decimal separation unit 102 is supplied to the interpolation processing unit 141, and the integer X int is supplied to the power calculation unit 105.

ステップS75において、補間処理部141は、仮数/指数分離部101からの仮数X1を用いて補間処理を行って、入力値Xの仮数部分のべき乗の値の補間値(1+X1/223Yを求め、べき乗演算部105に供給する。 In step S75, the interpolation processing unit 141 performs interpolation processing using the mantissa X 1 from mantissa / exponent separation unit 101, the interpolation value of the power value of the mantissa part of the input value X (1 + X 1/2 23) Y is obtained and supplied to the power calculation unit 105.

すなわち、補間処理部141は、上述した式(28)を計算することにより、仮数X1の22ビット目から上位Nビットをインデックスindex1として求める。 That is, the interpolation processing unit 141, by calculating equation (28) described above, obtaining the upper N bits as an index index1 from 22 bits of the mantissa X 1.

また、補間処理部141は、次式(36)を計算することにより、仮数X1の(22−N)ビット目から0ビット目までの部分の値である下位値Xh1を求める。 In addition, the interpolation processing unit 141 calculates the following expression (36) to obtain the lower value X h1 that is the value of the portion from the (22-N) -th bit to the 0-th bit of the mantissa X 1 .

Figure 2010032762
Figure 2010032762

なお、式(36)において、「&」は論理積演算を示しており、以下の説明において同じであるとする。式(36)では、仮数X1と(223-N−1)との論理積演算を行うことにより、仮数X1の(22−N)ビット目から0ビット目までの部分が抽出される。すなわち、(223-N−1)は、下位(23−N)ビットの値だけが「1」となり、他のビットの値は「0」となる値であるので、論理積演算により、仮数X1の下位(23−N)ビットの値だけが抽出される。 In Expression (36), “&” indicates a logical product operation, and is assumed to be the same in the following description. In Expression (36), by performing a logical product operation of the mantissa X 1 and (2 23-N −1), a portion from the (22−N) th bit to the 0th bit of the mantissa X 1 is extracted. . That is, (2 23-N −1) is a value in which only the value of the lower (23-N) bits is “1” and the value of the other bits is “0”. only the value of the lower (23-N) bits of X 1 are extracted.

さらに、補間処理部141は、式(37)乃至式(39)により、入力値Xの仮数部分のべき乗の値のテーブル値V10乃至テーブル値V12を求める。 Further, the interpolation processing unit 141 obtains the table value V 10 to the table value V 12 of the power value of the mantissa part of the input value X by Expressions (37) to (39).

Figure 2010032762
Figure 2010032762

Figure 2010032762
Figure 2010032762

Figure 2010032762
Figure 2010032762

すなわち、補間処理部141は、インデックスindex1を変数iの値としたべき乗値frctable[index1]をテーブル値V10として、仮数のべき乗テーブル保持部103の仮数のべき乗テーブルから取得する。同様に、補間処理部141は、インデックスindex1+1およびインデックスindex1+2を変数iの値としたべき乗値frctable[index1+1]およびべき乗値frctable[index1+2]をテーブル値V11およびテーブル値V12として、仮数のべき乗テーブルから取得する。 That is, the interpolation processing unit 141, a power value frctable [index1] table value V 10 to which the index index1 and the value of the variable i, obtained from a power table mantissa of the mantissa of the power table holding unit 103. Likewise, the interpolation processing unit 141, the index index1 + 1 and indices index1 + 2 as exponential value frctable [index1 + 1] and exponential value frctable [index1 + 2] table values V 11 and table values V 12 and that the value of the variable i and mantissa power table Get from.

そして、補間処理部141は、下位値Xh1と、テーブル値V10乃至テーブル値V12とを用いて補間処理を行い、入力値Xの仮数部分のべき乗の値の補間値(1+X1/223Yを求める。 Then, the interpolation processing unit 141 performs an interpolation process using the lower value X h1 and the table values V 10 to V 12, and an interpolated value (1 + X 1/2) of the power value of the mantissa part of the input value X 23 ) Find Y.

例えば、補間処理部141は、補間処理として線形補間を行う場合、式(40)を計算することにより、補間値H=(1+X1/223Yを求める。 For example, the interpolation processing unit 141, when performing a linear interpolation as the interpolation process by calculating equation (40) obtains an interpolation value H = (1 + X 1/ 2 23) Y.

Figure 2010032762
Figure 2010032762

なお、式(40)における「a」および「xin」は、それぞれ式(41)および式(42)により求められる。   Note that “a” and “xin” in Equation (40) are obtained by Equation (41) and Equation (42), respectively.

Figure 2010032762
Figure 2010032762

Figure 2010032762
Figure 2010032762

すなわち、補間処理として線形補間が行われる場合、図10に示すように、テーブル値V10を原点とみなして、インデックスに対するべき乗値の傾きaが求められ、インデックス(index1)の値がxinであるときのべき乗値が補間値Hとして求められる。なお、図10において、縦軸はべき乗値を示しており、横軸はインデックスindex1の値を示している。 That is, when the linear interpolation is performed as the interpolation processing, as shown in FIG. 10, is regarded as a table value V 10 as the origin, the gradient a of the power value is determined for index, the value of the index (index1) is in xin The power value of time is obtained as the interpolation value H. In FIG. 10, the vertical axis indicates the power value, and the horizontal axis indicates the value of the index index1.

また、例えば、補間処理部141は、補間処理として2次の多項式補間を行う場合、式(43)を計算することにより、補間値H=(1+X1/223Yを求める。 Further, for example, the interpolation processing unit 141, when performing a second-order polynomial interpolation as the interpolation process by calculating equation (43) obtains an interpolation value H = (1 + X 1/ 2 23) Y.

Figure 2010032762
Figure 2010032762

なお、式(43)における「a」、「b」、および「xin」は、それぞれ式(44)乃至式(46)により求められる。   Note that “a”, “b”, and “xin” in the equation (43) are obtained by the equations (44) to (46), respectively.

Figure 2010032762
Figure 2010032762

Figure 2010032762
Figure 2010032762

Figure 2010032762
Figure 2010032762

すなわち、補間処理として2次の多項式補間が行われる場合、図11に示すように、テーブル値V10を原点とみなして、下位値Xh1から求まるインデックスの値xinの2乗の値に乗算される係数aと、値xinに乗算される係数bとが求められ、インデックス(index1)の値がxinであるときのべき乗値が補間値Hとして求められる。なお、図11において、縦軸はべき乗値を示しており、横軸はインデックスindex1の値を示している。 That is, when quadratic polynomial interpolation is performed as the interpolation processing, as shown in FIG. 11, the table value V 10 is regarded as the origin, and the square value of the index value xin obtained from the lower value X h1 is multiplied. The coefficient a and the coefficient b multiplied by the value xin are obtained, and the power value when the value of the index (index1) is xin is obtained as the interpolation value H. In FIG. 11, the vertical axis indicates the power value, and the horizontal axis indicates the value of the index index1.

なお、補間処理部141は、補間処理を行わない場合には、テーブル値V10を、入力値Xの仮数部分のべき乗の値の補間値(1+X1/223Yとする。 Incidentally, the interpolation processing unit 141, the case without interpolation, the table value V 10, the interpolation value of power values of the mantissa part of the input value X (1 + X 1/2 23) to Y.

図9のフローチャートの説明に戻り、最終的な入力値Xの仮数部分のべき乗の値としての補間値(1+X1/223Yが求められると、処理はステップS75からステップS76へと進む。 Returning to Fig. 9, when the final input value interpolation value as a power value of the mantissa part of the X (1 + X 1/2 23) Y is required, the process proceeds from step S75 to step S76.

ステップS76において、補間処理部141は、整数/小数分離部102からの小数Xamariを用いて補間処理を行って、入力値Xの基数のべき乗の値の補間値(2^Xamari)を求め、べき乗演算部105に供給する。 In step S76, the interpolation processing unit 141 performs an interpolation process using the decimal number X amari from the integer / decimal separation unit 102 to obtain an interpolation value (2 ^ X amari ) of the power of the radix of the input value X. , And supplied to the power calculation unit 105.

すなわち、補間処理部141は、上述した式(30)および式(31)を計算することにより、固定小数点化された小数Xamariの22ビット目から上位Nビットの値をindex2として取り出す。 That is, the interpolation processing unit 141 calculates the above-described Expression (30) and Expression (31), and extracts the value of the upper N bits from the 22nd bit of the fixed-point decimal number X amari as index2.

また、補間処理部141は、次式(47)を計算することにより、小数Xamariの(22−N)ビット目から0ビット目までの部分の値である下位値Xh2を求める。 Further, the interpolation processing unit 141 calculates the following expression (47) to obtain the lower value X h2 that is the value of the portion from the (22-N) th bit to the 0th bit of the decimal number X amari .

Figure 2010032762
Figure 2010032762

式(47)では、式(36)における場合と同様に、小数Xamariと(223-N−1)との論理積演算を行うことにより、小数Xamariの(22−N)ビット目から0ビット目までの部分が抽出される。 In the equation (47), as in the case of the equation (36), by performing an AND operation between the decimal number X amari and (2 23-N −1), the (22−N) -th bit of the decimal number X amari is obtained. Portions up to the 0th bit are extracted.

さらに、補間処理部141は、式(48)乃至式(50)により、入力値Xの基数のべき乗の値のテーブル値V20乃至テーブル値V22を求める。 Further, the interpolation processing unit 141 obtains the table value V 20 to the table value V 22 of the power of the radix of the input value X by using the equations (48) to (50).

Figure 2010032762
Figure 2010032762

Figure 2010032762
Figure 2010032762

Figure 2010032762
Figure 2010032762

すなわち、補間処理部141は、インデックスindex2を変数iの値とした入力値Xの基数のべき乗の値twotable[index2]をテーブル値V20として、小数のべき乗テーブル保持部104の小数のべき乗テーブルから取得する。 That is, the interpolation processing unit 141 sets the power value twotable [index2] of the radix of the input value X with the index index2 as the value of the variable i as the table value V 20 , from the decimal power table of the decimal power table holding unit 104. get.

同様に、補間処理部141は、インデックスindex2+1およびインデックスindex2+2を変数iの値としたべき乗値twotable[index2+1]およびべき乗値twotable[index2+2]をテーブル値V21およびテーブル値V22として、小数のべき乗テーブルから取得する。 Likewise, the interpolation processing unit 141, as an index index2 + 1 and index index2 + 2 values and the exponential value Twotable variable i [index2 + 1] and exponential value twotable [index2 + 2] table values V 21 and table values V 22 and fractional power table Get from.

そして、補間処理部141は、下位値Xh2と、テーブル値V20乃至テーブル値V22とを用いて補間処理を行い、入力値Xの基数のべき乗の値の補間値(2^Xamari)を求める。 Then, the interpolation processing unit 141 performs an interpolation process using the lower value X h2 and the table value V 20 to the table value V 22, and an interpolation value (2 ^ X amari ) of the power value of the radix of the input value X. Ask for.

例えば、補間処理部141は、補間処理として線形補間を行う場合、式(40)乃至式(42)を計算することにより、補間値H=(2^Xamari)を求める。なお、この場合、式(40)乃至式(42)における下位値Xh1、テーブル値V10、およびテーブル値V11は、下位値Xh2、テーブル値V20、およびテーブル値V21とされる(置き換えられる)。 For example, when performing linear interpolation as the interpolation processing, the interpolation processing unit 141 calculates the equation (40) to (42) to obtain the interpolation value H = (2 ^ X amari ). In this case, the lower value X h1 , the table value V 10 , and the table value V 11 in the equations (40) to (42) are the lower value X h2 , the table value V 20 , and the table value V 21. (Replaced).

また、例えば、補間処理部141は、補間処理として2次の多項式補間を行う場合、式(43)乃至式(46)を計算することにより、補間値H=(2^Xamari)を求める。なお、この場合、式(43)乃至式(46)における下位値Xh1、テーブル値V10、テーブル値V11、およびテーブル値V12は、下位値Xh2、テーブル値V20、テーブル値V21、およびテーブル値V22、とされる(置き換えられる)。 Further, for example, when performing quadratic polynomial interpolation as the interpolation processing, the interpolation processing unit 141 calculates the interpolation value H = (2 ^ X amari ) by calculating Expression (43) to Expression (46). In this case, the lower value X h1 , the table value V 10 , the table value V 11 , and the table value V 12 in the equations (43) to (46) are the lower value X h2 , the table value V 20 , and the table value V. 21 and the table value V 22 .

なお、補間処理部141は、補間処理を行わない場合には、テーブル値V20を、入力値Xの基数のべき乗の値の補間値(2^Xamari)とする。 When the interpolation processing unit 141 does not perform the interpolation processing, the table value V 20 is set to the interpolation value (2 ^ X amari ) of the power of the radix of the input value X.

ステップS77において、べき乗演算部105は、整数/小数分離部102からの整数Xintと、補間処理部141からの補間値(1+X1/223Yおよび補間値(2^Xamari)とから、上述した式(33)および式(34)を計算することにより演算値Pを求める。 In step S77, the power calculation unit 105, since the integer X int from Integer / fractional separation unit 102, the interpolation value from the interpolation processing section 141 (1 + X 1/2 23) Y and the interpolation value (2 ^ X amari) Then, the calculation value P is obtained by calculating the above-described equations (33) and (34).

その後、ステップS78の処理が行われて、べき乗演算処理は終了するが、ステップS78の処理は、図6のステップS48の処理と同様であるため、その説明は省略する。   Thereafter, the process of step S78 is performed, and the exponentiation calculation process ends. However, the process of step S78 is the same as the process of step S48 of FIG.

このようにして、演算処理装置131は、仮数のべき乗テーブルから取得したテーブル値を用いて補間処理を行い、最終的な入力値Xの仮数部分のべき乗の値を求めるとともに、小数のべき乗テーブルから取得したテーブル値を用いて補間処理を行い、最終的な入力値Xの基数のべき乗の値を求める。そして、演算処理装置131は、求めたそれらのべき乗の値を用いて演算値Pを求め、整数化する。   In this way, the arithmetic processing unit 131 performs an interpolation process using the table value acquired from the mantissa power table, obtains the power value of the mantissa part of the final input value X, and uses the decimal power table. Interpolation processing is performed using the acquired table value, and the final power value of the radix of the input value X is obtained. Then, the arithmetic processing unit 131 obtains the arithmetic value P by using the obtained power value and converts it to an integer.

このように、補間処理を行って、入力値Xの仮数部分のべき乗の値と、入力値Xの基数のべき乗の値とを求めることにより、仮数のべき乗テーブルおよび小数のべき乗テーブルのテーブルサイズを増やさずにべき乗演算の精度を向上させることができる。   In this way, the table size of the mantissa power table and the power table of the decimal number is obtained by performing the interpolation process to obtain the power value of the mantissa part of the input value X and the power value of the radix of the input value X. The accuracy of the power operation can be improved without increasing it.

具体的には、本出願人は、べき指数Y=3.141592とし、L=8192個のデータを用いて、上述した式(17)を計算して求まる相対誤差平均Tにより、演算処理装置131のべき乗の演算精度の評価を行った。N=8のとき、つまりテーブルサイズSIZE=256のとき、仮数のべき乗テーブルの値、および小数のべき乗テーブルの値に、それぞれ補間処理を加えた場合と、加えない場合との組み合わせについて、図12に示す評価結果が得られた。   Specifically, the present applicant sets power exponent of the arithmetic processing unit 131 based on the relative error average T obtained by calculating the above equation (17) using L = 8192 pieces of data with power index Y = 3.141592. The calculation accuracy was evaluated. When N = 8, that is, when the table size is SIZE = 256, FIG. 12 shows a combination of the case where the interpolation processing is added to the value of the mantissa power table and the value of the decimal power table, and the case where the interpolation processing is not added. The evaluation results shown in Fig. 1 were obtained.

図12には、補間処理を加えた場合と、加えない場合との各組み合わせについての相対誤差平均Tの値が示されている。すなわち、文字「小数:補間なし」は、小数のべき乗テーブルの値を補間処理せずに演算値Pの算出に用いたことを示しており、文字「小数:線形補間」および「小数:2次補間」は、小数のべき乗テーブルの値に線形補間および2次の多項式補間を行って演算値Pの算出に用いたことを示している。   FIG. 12 shows the value of the relative error average T for each combination of the case where the interpolation process is added and the case where the interpolation process is not added. That is, the character “decimal: no interpolation” indicates that the value of the decimal power table is used for calculation of the operation value P without performing interpolation processing, and the characters “decimal: linear interpolation” and “decimal: secondary” are used. “Interpolation” indicates that linear interpolation and quadratic polynomial interpolation are performed on the values of the power table of the decimal and used for calculation of the calculation value P.

同様に、文字「仮数:補間なし」は、仮数のべき乗テーブルの値を補間処理せずに演算値Pの算出に用いたことを示しており、文字「仮数:線形補間」および「仮数:2次補間」は、仮数のべき乗テーブルの値に線形補間および2次の多項式補間を行って演算値Pの算出に用いたことを示している。   Similarly, the character “mantissa: no interpolation” indicates that the value of the mantissa power table is used for calculation of the operation value P without performing interpolation processing, and the characters “mantissa: linear interpolation” and “mantissa: 2” are used. “Next interpolation” indicates that the value of the mantissa power table is subjected to linear interpolation and quadratic polynomial interpolation and used to calculate the operation value P.

図12では、仮数のべき乗テーブルの値、または小数のべき乗テーブルの値の少なくとも何れか一方に補間処理を施すことで、べき乗の演算精度が改善されることが分かる。例えば、仮数のべき乗テーブルの値および小数のべき乗テーブルの値の両方に線形補間を施すとT=5.31×10-6となり、仮数のべき乗テーブルの値および小数のべき乗テーブルの値の両方に2次の多項式補間を施すとT=3.93×10-8となっている。 In FIG. 12, it can be seen that the power calculation accuracy is improved by performing an interpolation process on at least one of the value of the mantissa power table or the value of the decimal power table. For example, the secondary when subjected to linear interpolation T = 5.31 × 10 -6, and the both values and the value of the fraction of power table of the mantissa of the power table for both values of and fractional power table of the mantissa of the power table When polynomial interpolation is performed, T = 3.93 × 10 −8 .

このように、両方のテーブル値に2次の多項式補間を施したときの相対誤差平均の値は、従来の量子化装置51において、N=16のとき、つまりテーブルサイズSIZE=65536としたときのテーブルを用いた整数部分の演算精度と同等以上の精度である。   In this way, the relative error average value when second-order polynomial interpolation is performed on both table values is the value obtained when N = 16, that is, when the table size SIZE = 65536, in the conventional quantization apparatus 51. The accuracy is equal to or better than the calculation accuracy of the integer part using a table.

また、N=1,・・・,8の場合、つまりテーブルサイズSIZE=2,・・・,256の場合、仮数のべき乗テーブルの値、および小数のべき乗テーブルの値の両方の値に、補間処理を施さないとき、線形補間を施したとき、および2次の多項式補間を施したときのそれぞれの相対誤差平均Tとして、図13に示される結果が得られた。   Further, when N = 1,..., 8, that is, when the table size is SIZE = 2,..., 256, interpolation is performed for both the mantissa power table value and the decimal power table value. The result shown in FIG. 13 was obtained as the relative error average T when the processing was not performed, when the linear interpolation was performed, and when the second-order polynomial interpolation was performed.

なお、図中、「テーブルサイズ」の欄は、テーブルサイズSIZEの数(個数)を示しており、文字「補間なし」、文字「線形補間」、および「2次補間」のそれぞれは、仮数のべき乗テーブルの値、および小数のべき乗テーブルの値に、補間処理を施さない場合、線形補間を施す場合、および2次の多項式補間を施す場合のそれぞれを示している。   In the figure, the “table size” column indicates the number (number) of table sizes SIZE, and each of the characters “no interpolation”, “linear interpolation”, and “secondary interpolation” is a mantissa. The figure shows the case where the interpolation table is not subjected to the power table value and the value of the decimal power table, when the linear interpolation is performed, and when the second-order polynomial interpolation is performed.

図13では、テーブルサイズが「16」で線形補間を行う場合と、テーブルサイズが「4」で2次の多項式補間を行う場合とで、「補間なし」のテーブルサイズが「256」のときの精度と同等の精度が実現されていることが分かる。   In FIG. 13, when the table size is “16” and linear interpolation is performed, and when the table size is “4” and quadratic polynomial interpolation is performed, the table size of “no interpolation” is “256”. It can be seen that an accuracy equivalent to the accuracy is realized.

すなわち、テーブルサイズが「256」で補間処理を行わない場合、相対誤差平均T=6.00×10-3である。また、テーブルサイズが「16」で線形補間を行う場合、相対誤差平均T=1.37×10-3であり、テーブルサイズが「4」で2次の多項式補間を行う場合、相対誤差平均T=2.52×10-3である。このように、演算処理装置131では、補間処理を行うことで、より少ないテーブルサイズ(テーブル数)で、より高い精度のべき乗の演算を行うことができる。 That is, when the table size is “256” and the interpolation process is not performed, the relative error average T = 6.00 × 10 −3 . When linear interpolation is performed with a table size of “16”, the relative error average T = 1.37 × 10 −3 , and when linear interpolation is performed with the table size of “4”, the relative error average T = 2.52. × 10 -3 . As described above, the arithmetic processing unit 131 can perform a power calculation with higher accuracy with a smaller table size (number of tables) by performing the interpolation process.

なお、以上においては、仮数のべき乗テーブルと小数のべき乗テーブルのテーブルサイズが同じである例について説明したが、それらのテーブルサイズは、べき乗演算の必要な精度に応じて異なる大きさとされてもよい。テーブルサイズが変更される場合、そのサイズに合わせて補間処理部141により行われる補間処理時のビット位置、つまり下位値Xh1または下位値Xh2の大きさも変更される。 In the above description, the example in which the mantissa power table and the decimal power table have the same table size has been described. However, the table sizes may be different depending on the accuracy required for the power operation. . When the table size is changed, the bit position at the time of the interpolation process performed by the interpolation processing unit 141, that is, the size of the lower value X h1 or the lower value X h2 is also changed according to the size.

また、仮数のべき乗テーブルの値と、小数のべき乗テーブルの値との両方に補間処理を施すと説明したが、補間処理の処理量と必要となる演算精度に応じて、どちらか一方の値に補間処理が施されるようにしてもよいし、それぞれ異なる補間処理が施されるようにしてもよい。さらに、補間処理として、線形補間や2次の多項式補間に限らず、3次以上の多項式補間やスプライン補間が施されるようにしてもよい。   In addition, it has been explained that interpolation processing is performed on both the mantissa power table value and the decimal power table value, but depending on the amount of interpolation processing and the required calculation accuracy, either value is set. Interpolation processing may be performed, or different interpolation processing may be performed. Further, the interpolation processing is not limited to linear interpolation or quadratic polynomial interpolation, but may be performed by higher-order polynomial interpolation or spline interpolation.

[第3の実施の形態]
ところで、以上においては、べき乗演算により得られた演算値Pを整数化する場合に、演算値Pに定数αを加算してから整数化が行われると説明した。例えば、式(1)に示したように、オーディオ信号の量子化などの多くの規格等においては、べき指数Yの値が決められていることが多いので、定数αを演算値Pに加算するのではなく、予め入力値Xにα1/Yを加算しておくとことで、簡単な演算で演算値の整数部分を得ることができるようになる。
[Third Embodiment]
By the way, in the above, when calculating the arithmetic value P obtained by the exponentiation calculation into an integer, it explained that the integer was performed after adding the constant α to the arithmetic value P. For example, as shown in the equation (1), in many standards such as quantization of audio signals, the value of the power exponent Y is often determined, so the constant α is added to the calculated value P. Instead of adding α 1 / Y to the input value X in advance, the integer part of the calculated value can be obtained by a simple calculation.

すなわち、これまでの入力値をX’(以上において説明した入力値X)とすると、X’にα1/Yが加算された値を新たな入力値X=X’+α1/Yとしてべき乗演算に用いる。例えば、式(1)に示したオーディオ信号の量子化の場合には、入力値X=X’+α4/3とされる。 That is, assuming that the input value so far is X ′ (the input value X described above), the value obtained by adding α 1 / Y to X ′ is a new input value X = X ′ + α 1 / Y and a power operation is performed. Used for. For example, in the case of quantization of the audio signal shown in Expression (1), the input value is X = X ′ + α 4/3 .

このように、定数αの1/Y乗の値が変数X’に加算されて入力値Xとされる場合、演算処理装置は、図14に示すように構成される。なお、図14において、図5における場合と対応する部分には同一の符号を付してあり、その説明は適宜、省略する。   Thus, when the value of the constant α to the 1 / Yth power is added to the variable X ′ to obtain the input value X, the arithmetic processing unit is configured as shown in FIG. In FIG. 14, portions corresponding to those in FIG. 5 are denoted by the same reference numerals, and description thereof is omitted as appropriate.

演算処理装置171は、仮数/指数分離部101、整数/小数分離部102、仮数のべき乗テーブル保持部181、小数のべき乗テーブル保持部182、およびべき乗整数変換部183から構成される。   The arithmetic processing unit 171 includes a mantissa / exponent separation unit 101, an integer / decimal separation unit 102, a mantissa power table holding unit 181, a decimal power table holding unit 182, and a power integer conversion unit 183.

この演算処理装置171では、仮数/指数分離部101に入力値X=X’+α1/Yが供給され、整数/小数分離部102にべき指数Yが供給される。すなわち、演算処理装置171は、変数X’に定数α1/Yを加算して入力値Xとし、その入力値Xを仮数/指数分離部101に供給する。 In this arithmetic processing unit 171, the input value X = X ′ + α 1 / Y is supplied to the mantissa / exponent separator 101, and the exponent Y is supplied to the integer / decimal separator 102. That is, the arithmetic processing unit 171 adds the constant α 1 / Y to the variable X ′ to obtain the input value X, and supplies the input value X to the mantissa / exponent separation unit 101.

仮数のべき乗テーブル保持部181は、仮数X1の値により定まる、入力値Xの仮数部分のべき乗の値が含まれる仮数のべき乗テーブルを保持している。なお、仮数のべき乗テーブルにおける、入力値Xの仮数部分のべき乗の値は、小数点位置が23ビット目にある固定小数点数とされている。 The mantissa power table holding unit 181 holds a mantissa power table including the power value of the mantissa part of the input value X determined by the value of the mantissa X 1 . In the mantissa power table, the power value of the mantissa part of the input value X is a fixed-point number whose decimal point position is the 23rd bit.

小数のべき乗テーブル保持部182は、小数Xamariの値により定まり、小数Xamariをべき指数とする入力値X(演算値(P+α))の基数(底)のべき乗の値が含まれる小数のべき乗テーブルを保持している。 Power table storing unit 182 in decimal, Sadamari the value of the fractional X amari, fractional power of containing the power of the value of the radix (bottom) of the input value X (calculated value (P + alpha)) to fractional X amari to the index Holding a table.

なお、小数のべき乗テーブルにおける、入力値Xの基数のべき乗の値は、小数点位置が23ビット目にある固定小数点数とされている。   Note that the power of the radix of the input value X in the decimal power table is a fixed-point number whose decimal point position is the 23rd bit.

べき乗整数変換部183は、仮数のべき乗テーブル保持部181の仮数のべき乗テーブル、および小数のべき乗テーブル保持部182の小数のべき乗テーブルを参照して、仮数/指数分離部101からの仮数X1と、整数/小数分離部102からの整数Xintおよび小数Xamariとから演算値(P+α)の整数部分を求め、出力する。ここで、演算値(P+α)は、演算値P=X’Yに定数αが加算された値である。 The power integer conversion unit 183 refers to the mantissa power table of the mantissa power table holding unit 181 and the mantissa power table of the decimal power table holding unit 182, and the mantissa X 1 from the mantissa / exponent separation unit 101 The integer part of the calculated value (P + α) is obtained from the integer X int and the decimal number X amari from the integer / decimal separator 102 and output. Here, the calculated value (P + α) is a value constant alpha is added to the calculated value P = X 'Y.

次に、図15のフローチャートを参照して、演算処理装置171によるべき乗演算処理について説明する。   Next, with reference to the flowchart of FIG. 15, the power calculation process by the calculation processing device 171 will be described.

ステップS111において、仮数のべき乗テーブル保持部181は、仮数のべき乗テーブルを生成する。すなわち、仮数のべき乗テーブル保持部181は、仮数のべき乗テーブルのテーブルサイズを2N=SIZEとすると、次式(51)に示される、入力値Xの仮数部分をY乗して得られるべき乗値frctable[i]からなる仮数のべき乗テーブルを生成する。 In step S111, the mantissa power table holding unit 181 generates a mantissa power table. That is, power table storing unit 181 of the mantissa, if the table size of the mantissa of the power table and 2 N = SIZE, shown in the following equation (51), the input value power values obtained mantissa portion of the X and multiply Y Generate a power table of mantissa consisting of frctable [i].

Figure 2010032762
Figure 2010032762

ここで、テーブルサイズSIZEは、Nビットのデータで表すことのできる数の個数であり、このテーブルサイズSIZEの個数だけべき乗値frctable[i]が用意されることになる。また、べき乗値frctable[i]の変数iは、仮数X1から求まるインデックスindex1の値を示しており、変数i=0,・・・,(SIZE−1)とされる。 Here, the table size SIZE is the number of numbers that can be represented by N-bit data, and power values frctable [i] corresponding to the number of table sizes SIZE are prepared. Further, the variable i of the exponential value frctable [i] indicates the value of the index index1 obtained from mantissa X 1, variable i = 0, · · ·, are (SIZE-1).

例えば、インデックスindex1を仮数X1の上位何ビットかの値とすれば、式(51)における(1+i/SIZE)Yは、仮数X1の値に対する、入力値Xの仮数部分をY乗して得られる値(1+X1/223Yの近似値となる。さらに、式(51)では、近似値(1+i/SIZE)Yに223が乗算されて整数化され(int(A)の演算)、近似値が固定小数点化されている。つまり、べき乗値frctable[i]は、小数点位置が23ビット目にある固定小数点数とされる。 For example, if the index index1 and many of the high-order bits of the value of the mantissa X 1, (1 + i / SIZE) Y in the formula (51), for the values of the mantissa X 1, the mantissa part of the input value X to multiply Y the values obtained (1 + X 1/2 23 ) the approximation of Y. Furthermore, (calculation of int (A)) Formula (51), approximation (1 + i / SIZE) Y 2 23 is integer is multiplied, the approximate value is a fixed point of. That is, the power value frctable [i] is a fixed-point number whose decimal point position is the 23rd bit.

仮数のべき乗テーブル保持部181は、(SIZE)個の各変数の値iのそれぞれに対する、べき乗値frctable[i]のそれぞれを求めると、それらの値iとべき乗値frctable[i]とを対応付けて仮数のべき乗テーブルを生成し、保持する。   When the mantissa power table holding unit 181 determines each power value frctable [i] for each of the (SIZE) variable values i, the mantissa power table holding unit 181 associates the value i with the power value frctable [i]. To generate and hold a mantissa power table.

ステップS112において、小数のべき乗テーブル保持部182は、小数のべき乗テーブルを生成する。すなわち、小数のべき乗テーブル保持部182は、小数のべき乗テーブルのテーブルサイズを2N=SIZEとすると、次式(52)に示される入力値Xの基数である2をXamari乗して得られるべき乗値twotable[i]からなる小数のべき乗テーブルを生成する。 In step S112, the decimal power table holding unit 182 generates a decimal power table. In other words, the decimal power table holding unit 182 is obtained by raising the base 2 of the input value X represented by the following equation (52) to the X amari power, where the table size of the decimal power table is 2 N = SIZE. Generate a power table of decimal numbers consisting of power values twotable [i].

Figure 2010032762
Figure 2010032762

ここで、べき乗値twotable[i]の変数iは、小数Xamariから求まるインデックスindex2の値を示しており、変数i=0,・・・,(SIZE−1)とされる。 Here, the variable i of the power value twotable [i] indicates the value of the index index2 obtained from the decimal number X amari , and the variable i = 0,..., (SIZE−1).

インデックスindex2を、小数Xamariの上位何ビットかの値とすれば、式(52)における2(i/SIZE)は、小数Xamariの値に対する、入力値Xの基数「2」のXamari乗の値2^Xamariの近似値となる。さらに、式(52)では、近似値2(i/SIZE)に223が乗算されて整数化され、近似値が固定小数点化されている。つまり、べき乗値twotable[i]は、小数点位置が23ビット目にある固定小数点数とされる。 Assuming that the index index2 is a value of several high-order bits of the decimal number X amari , 2 (i / SIZE) in the equation (52) is the X amari power of the base “2” of the input value X with respect to the value of the decimal number X amari. The value of 2 ^ X amari is an approximate value. Furthermore, in Formula (52), is 2 23 is multiplied integer approximation value 2 (i / SIZE), the approximate value is a fixed point of. That is, the power value twotable [i] is a fixed-point number whose decimal point position is the 23rd bit.

小数のべき乗テーブル保持部182は、(SIZE)個の各変数の値iのそれぞれに対する、べき乗値twotable[i]のそれぞれを求めると、それらの値iとべき乗値twotable[i]とを対応付けて小数のべき乗テーブルを生成し、保持する。   When the power table holding unit 182 of decimal numbers finds each power value twotable [i] for each value i of (SIZE) variables, the value i and the power value twotable [i] are associated with each other. To generate and hold a power table of decimal numbers.

なお、仮数のべき乗テーブルおよび小数のべき乗テーブルを生成する処理は、入力値Xのべき乗演算前に1度行っておけばよい。つまり、1度これらのテーブルを生成しておけば、その後、入力値Xのべき乗演算を行うときは、既に生成されて保持されている仮数のべき乗テーブルおよび小数のべき乗テーブルを用いればよい。   Note that the process of generating the mantissa power table and the decimal power table may be performed once before the power calculation of the input value X. In other words, once these tables are generated, then when performing a power operation of the input value X, a mantissa power table and a decimal power table already generated and held may be used.

このようにして、仮数のべき乗テーブルおよび小数のべき乗テーブルが生成されると、その後、ステップS113およびステップS114の処理が行われるが、これらの処理は、図6のステップS43およびステップS44の処理と同様であるので、その説明は省略する。なお、仮数/指数分離部101により求められた、入力値X=X’+α1/Yの仮数X1はべき乗整数変換部183に供給され、入力値X=X’+α1/Yの指数X2は整数/小数分離部102に供給される。 When the mantissa power table and the decimal power table are generated in this manner, the processes of step S113 and step S114 are performed thereafter. These processes are the same as the processes of step S43 and step S44 of FIG. Since it is the same, the description is abbreviate | omitted. The mantissa X 1 of the input value X = X ′ + α 1 / Y obtained by the mantissa / exponent separation unit 101 is supplied to the power integer conversion unit 183, and the exponent X of the input value X = X ′ + α 1 / Y 2 is supplied to the integer / decimal separator 102.

また、整数/小数分離部102が式(26)および式(27)を計算することにより求められた、指数X2とべき指数Yとの積の整数Xintおよび小数Xamariは、べき乗整数変換部183に供給される。 Further, the integer X int and the decimal number X amari of the product of the exponent X 2 and the power exponent Y, which are obtained by the integer / decimal separator 102 calculating the formulas (26) and (27), are a power integer transform. To the unit 183.

ステップS115において、べき乗整数変換部183は、仮数/指数分離部101から供給された仮数X1を用いて、べき指数Yに対する入力値Xの仮数部分のべき乗の値(1+X1/223Yを求める。 In step S115, power integer transform unit 183, using a mantissa X 1 supplied from the mantissa / exponent separation unit 101, should a power of a value of the mantissa part of the input value X for the index Y (1 + X 1/2 23) Y Ask for.

具体的には、べき乗整数変換部183は、式(28)を計算することによりインデックスindex1を求め、そのインデックスindex1を用いて式(29)より、入力値Xの仮数部分のべき乗の値を求める。すなわち、べき乗整数変換部183は、インデックスindex1を変数iの値としたべき乗値frctable[index1]を、仮数のべき乗テーブル保持部181の仮数のべき乗テーブルから取得する。そして、この取得されたべき乗値frctable[index1]が、入力値Xの仮数部分のべき乗の値(1+X1/223Yとされる。 Specifically, the power integer conversion unit 183 calculates the index index1 by calculating Expression (28), and calculates the power value of the mantissa part of the input value X from Expression (29) using the index index1. . That is, the power integer conversion unit 183 obtains the power value frctable [index1] with the index index1 as the value of the variable i from the mantissa power table of the mantissa power table holding unit 181. Then, the obtained exponential value frctable [index1] is, power of the value of the mantissa part of the input value X (1 + X 1/2 23) are Y.

ステップS116において、べき乗整数変換部183は、整数/小数分離部102から供給された小数Xamariを用いて、小数Xamariをべき指数とする、入力値Xの基数である2のべき乗を求める。 In step S116, the power integer conversion unit 183 uses the decimal number X amari supplied from the integer / decimal number separation unit 102 to obtain the power of 2, which is the base of the input value X, with the decimal number X amari as a power exponent.

具体的には、べき乗整数変換部183は、次式(30)および式(31)を計算することで、インデックスindex2を求め、そのインデックスindex2を用いて式(32)より、入力値Xの基数のべき乗の値を求める。すなわち、べき乗整数変換部183は、インデックスindex2を変数iの値としたべき乗値twotable[index2]を、小数のべき乗テーブル保持部182の小数のべき乗テーブルから取得する。そして、この取得されたべき乗値twotable[index2]が、基数である2のべき乗値(2^(Xamari))とされる。 Specifically, the power integer conversion unit 183 calculates an index index2 by calculating the following expressions (30) and (31), and uses the index index2 to calculate the radix of the input value X from the expression (32). Find the power value of. That is, the power integer conversion unit 183 acquires the power value twotable [index2] with the index index2 as the value of the variable i from the power table of the decimal number in the power table holding unit 182 of the decimal number. Then, the acquired power value twotable [index2] is set to a power value of 2 (2 ^ (X amari )) as a radix.

ステップS117において、べき乗整数変換部183は、べき乗の値(1+X1/223Y、およびべき乗の値(2^(Xamari))と、整数/小数分離部102からの整数Xintとを用いて演算値(P+α)の整数部分を求め、求められた値を、整数化された演算値(P+α)である出力値として出力する。 In step S117, the power integer transform unit 183, a power value (1 + X 1/2 23 ) Y, and the power of the value (2 ^ (X amari)) , and integer X int from Integer / fractional separation unit 102 Using this, the integer part of the calculated value (P + α) is obtained, and the obtained value is output as an output value which is an integerized calculated value (P + α).

すなわち、べき乗整数変換部183は、次式(53)を計算することで、演算値(P+α)の整数部分を得る。   That is, the power integer conversion unit 183 obtains the integer part of the calculated value (P + α) by calculating the following equation (53).

Figure 2010032762
Figure 2010032762

ここで、式(53)において、「>>」は右シフトを示している。べき乗整数変換部183は、整数Xintが0以上である場合、「(1+X1/223Y×2^Xamari」を(46−Xint)ビットだけ右シフトさせて、演算値(P+α)の整数部分の値(int)(P+α)を得る。また、べき乗整数変換部183は、整数Xintが0未満である場合、値「0」を演算値(P+α)の整数部分の値(int)(P+α)とする。 Here, in the formula (53), “>>” indicates a right shift. Power integer transform unit 183, when the integer X int is greater than or equal to 0, "(1 + X 1/2 23 ) Y × 2 ^ X amari " a (46-X int) by shifted right bit calculated value (P + alpha ) (Int) (P + α) of the integer part of. Further, when the integer X int is less than 0, the power integer conversion unit 183 sets the value “0” as the value (int) (P + α) of the integer part of the operation value (P + α).

なお、整数Xintが0以上である場合に、(46−Xint)ビットの右シフトを行うのは、次のような理由からである。すなわち、テーブル引きにより求められたべき乗値(1+X1/223Y、およびべき乗値2^Xamariは、小数点位置が23ビット目の位置にあるため、それらのべき乗値の積の値の小数点位置は、46ビット目となる。 Note that the right shift of (46−X int ) bits is performed when the integer X int is 0 or more for the following reason. That is, power value obtained by the table lookup (1 + X 1/2 23 ) Y, and exponential value 2 ^ X amari, because the decimal point is at the position of 23 th bit, the decimal point of the product of the values of their exponential value The position is the 46th bit.

また、演算値(P+α)を、基数を用いずに(通常の小数で)表現するには、べき乗値(1+X1/223Yと、べき乗値2^Xamariとの積の値の小数点位置を、整数Xintだけ下位ビット側に移動(左シフト演算)させればよい。 The arithmetic value (P + alpha), to represent (in the usual decimal) without using radix, exponential value (1 + X 1/2 23 ) Y and decimal point of the product of the value of the exponential value 2 ^ X amari The position may be moved to the lower bit side by an integer X int (left shift operation).

したがって、整数Xintが0以上である場合、べき乗値(1+X1/223Yと、べき乗値2^Xamariとの積の値を(46−Xint)ビットだけ右シフトすれば、演算値(P+α)の整数部分の値が得られる。また、整数Xintが負(0未満)である場合には、演算値(P+α)は、1未満の値となるので、演算値(P+α)の整数部分は0とされる。 Therefore, when the integer X int is greater than zero, the exponential value (1 + X 1/2 23 ) Y, if only the right shift (46-X int) bit value of the product of the exponential value 2 ^ X amari, operation The value of the integer part of the value (P + α) is obtained. When the integer X int is negative (less than 0), the calculated value (P + α) is less than 1, and therefore the integer part of the calculated value (P + α) is set to 0.

このようにして、演算値(P+α)の整数部分が求められると、べき乗整数変換部183は、演算値(P+α)の整数部分、つまり整数化された演算値(P+α)を出力し、べき乗演算処理は終了する。   When the integer part of the operation value (P + α) is obtained in this way, the power integer conversion unit 183 outputs the integer part of the operation value (P + α), that is, the operation value (P + α) converted to an integer, so that the power operation The process ends.

以上のようにして、演算処理装置171は、値X’に定数α1/Yが加算された値を新たな入力値Xとし、テーブルを利用して得られたべき乗値の積と、整数Xintとからシフト演算を利用して、演算値(P+α)の整数部分を求める。 As described above, the processing unit 171, a value that the constant alpha 1 / Y is added to the value X 'as a new input value X, the product of power values obtained by using the table, the integer X The integer part of the calculated value (P + α) is obtained from int using shift calculation.

これより、より簡単かつ迅速に演算値(P+α)の整数部分の値を求めることができる。すなわち、一旦、演算値Pを求めてから、さらに演算値(P+α)の整数部分を求める必要がなく、仮数のべき乗テーブルおよび小数のべき乗テーブルを参照して、仮数X1と、小数Xamariおよび整数Xintとから、シフト演算により直接、演算値(P+α)の整数部分を求めることができる。したがって、図5の整数変換部106に相当する処理ブロックが不要となり、演算処理装置171の小型化も図ることができる。 Thus, the value of the integer part of the calculation value (P + α) can be obtained more easily and quickly. That is, it is not necessary to obtain the arithmetic value P once and then further obtain the integer part of the arithmetic value (P + α). With reference to the mantissa power table and the decimal power table, the mantissa X 1 , the decimal number X amari, and From the integer X int , the integer part of the calculated value (P + α) can be obtained directly by shift calculation. Therefore, a processing block corresponding to the integer conversion unit 106 in FIG. 5 is not required, and the arithmetic processing device 171 can be downsized.

なお、以上においては、仮数のべき乗テーブルと小数のべき乗テーブルのテーブルサイズが同じである例について説明したが、それらのテーブルサイズは、べき乗演算の必要な精度に応じて異なる大きさとされてもよい。   In the above description, the example in which the mantissa power table and the decimal power table have the same table size has been described. However, the table sizes may be different depending on the accuracy required for the power operation. .

[第4の実施の形態]
ところで、以上において説明した例では、入力値Xの仮数部分(1+X1/223)は、1.0≦(1+X1/223)<2.0であり、小数Xamariは、0.0≦Xamari<1.0であり、べき指数Yは定数であった。
[Fourth Embodiment]
Incidentally, in the example described in the above, the mantissa part of the input value X (1 + X 1/2 23) is, 1.0 ≦ (1 + X 1 /2 23) is <2.0, the fractional X amari is a 0.0 ≦ X amari <1.0 Yes, the power index Y was a constant.

したがって、入力値Xから、演算値P(または演算値(P+α))の整数部分を求めるために、べき乗の演算を仮数のべき乗テーブルや小数のべき乗テーブルを用いずに、べき乗演算装置により直接演算しても、それほど処理量は多くならない。つまり、べき乗演算装置の小型化が期待できる。そこで、浮動小数点数の演算を行う、べき乗演算装置を利用して、入力値Xから演算値(P+α)の整数部分を求めるようにしてもよい。   Therefore, in order to obtain the integer part of the operation value P (or operation value (P + α)) from the input value X, the power operation is directly performed by the power operation device without using the mantissa power table or the decimal power table. However, the amount of processing does not increase that much. That is, the power arithmetic device can be expected to be downsized. Therefore, an integer part of the operation value (P + α) may be obtained from the input value X using a power operation device that performs an operation on a floating point number.

そのような場合、演算処理装置は、例えば図16に示すように構成される。なお、図16において、図5における場合と対応する部分には、同一の符号を付してあり、その説明は適宜、省略する。   In such a case, the arithmetic processing unit is configured as shown in FIG. 16, for example. In FIG. 16, portions corresponding to those in FIG. 5 are denoted with the same reference numerals, and description thereof will be omitted as appropriate.

演算処理装置211は、仮数/指数分離部101、整数/小数分離部102、およびべき乗整数変換部221から構成される。また、演算処理装置211では、仮数/指数分離部101に入力値X=X’+α1/Yが供給され、整数/小数分離部102およびべき乗整数変換部221にべき指数Yが供給される。なお、入力値Xは、上述した第3の実施の形態と同様であり、入力値X=X’+α1/Yである。 The arithmetic processing unit 211 includes a mantissa / exponent separator 101, an integer / decimal separator 102, and a power integer converter 221. Further, in the arithmetic processing unit 211, the input value X = X ′ + α 1 / Y is supplied to the mantissa / exponent separator 101, and the exponent Y is supplied to the integer / decimal separator 102 and the power integer converter 221. The input value X is the same as that in the third embodiment described above, and the input value X = X ′ + α 1 / Y.

べき乗整数変換部221は、例えば、浮動小数点数の演算を行う、べき乗演算装置などから構成され、仮数/指数分離部101からの仮数X1、整数/小数分離部102からの整数Xintおよび小数Xamari、並びに供給されたべき指数Yを用いて、演算値(P+α)の整数部分を求め、出力する。 Power integer transform unit 221 performs, for example, calculation of the floating point number is composed of such exponentiation device, mantissa X 1 from mantissa / exponent separation unit 101, integer X int and decimal integer / fraction separating unit 102 X amari, and using the supplied exponent Y, determine the integer portion of the calculated value (P + α), and outputs.

次に、図17のフローチャートを参照して、演算処理装置211によるべき乗演算処理について説明する。   Next, with reference to the flowchart of FIG. 17, power calculation processing by the calculation processing device 211 will be described.

なお、ステップS141およびステップS142の処理は、図6のステップS43およびステップS44の処理と同様であるので、その説明は省略する。なお、仮数/指数分離部101により求められた、入力値Xの仮数X1はべき乗整数変換部221に供給され、指数X2は整数/小数分離部102に供給される。 In addition, since the process of step S141 and step S142 is the same as the process of step S43 and step S44 of FIG. 6, the description is abbreviate | omitted. Note that the mantissa X 1 of the input value X obtained by the mantissa / exponent separator 101 is supplied to the power integer converter 221, and the exponent X 2 is supplied to the integer / decimal separator 102.

また、整数/小数分離部102が式(26)および式(27)を計算することにより求められた、指数X2とべき指数Yとの積の整数Xintおよび小数Xamariは、べき乗整数変換部221に供給される。 Further, the integer X int and the decimal number X amari of the product of the exponent X 2 and the power exponent Y, which are obtained by the integer / decimal separator 102 calculating the formulas (26) and (27), are a power integer transform. To the unit 221.

ステップS143において、べき乗整数変換部221は、供給されたべき指数Yと、仮数/指数分離部101から供給された仮数X1とを用いて、べき乗整数変換部221に内蔵されているべき乗演算装置により、べき指数Yに対する入力値Xの仮数部分のべき乗の値(1+X1/223Yを求める。 In step S 143, the power integer conversion unit 221 uses the exponent Y supplied and the mantissa X 1 supplied from the mantissa / exponent separation unit 101 to perform a power operation unit built in the power integer conversion unit 221. Accordingly, should a power of a value of the mantissa part of the input value X for the index Y (1 + X 1/2 23) determining the Y.

ステップS144において、べき乗整数変換部221は、整数/小数分離部102から供給された小数Xamariを用いて、べき乗整数変換部221に内蔵されているべき乗演算装置により、小数Xamariをべき指数とする、入力値Xの基数である2のべき乗を求める。これにより、2のべき乗値(2^(Xamari))が求められる。 In step S144, power integer transform unit 221 uses the fractional X amari supplied from the integer / fraction separating unit 102, the exponentiation device built into power integer transform unit 221, and the exponent a fraction X amari The power of 2 that is the radix of the input value X is obtained. As a result, a power value of 2 (2 ^ (X amari )) is obtained.

ステップS145において、べき乗整数変換部221は、求めたべき乗の値(1+X1/223Y、およびべき乗値(2^(Xamari))と、整数/小数分離部102からの整数Xintとを用いて、上述した式(53)から、演算値(P+α)の整数部分を求める。そして、べき乗整数変換部221は、求められた演算値(P+α)の整数部分を出力値として出力し、べき乗演算処理は終了する。 In step S145, power integer transform unit 221, a power value obtained (1 + X 1/2 23 ) Y, and a power value (2 ^ (X amari)) , and an integer X int from Integer / fractional separation unit 102 Is used to find the integer part of the calculated value (P + α) from the above equation (53). The power integer conversion unit 221 then outputs the integer part of the calculated value (P + α) as an output value, and the power calculation process ends.

このようにして、演算処理装置211は、べき乗演算装置を利用して、直接べき乗の演算を行い、入力値Xから演算値(P+α)の整数部分を求める。このように、処理量の少ないべき乗の演算を、べき乗演算装置により行うことで、演算処理装置211の小型化を図ることができる。   In this way, the arithmetic processing unit 211 uses the power arithmetic unit to perform direct power arithmetic and obtains an integer part of the arithmetic value (P + α) from the input value X. In this way, the arithmetic processing unit 211 can be reduced in size by performing the power operation with a small amount of processing by the power arithmetic unit.

[第5の実施の形態]
ところで、上述した第3の実施の形態の演算処理装置171では、仮数のべき乗テーブルや小数のべき乗テーブルの値の補間処理が行われないため、べき乗の演算精度、つまり演算値の整数部分の演算精度を向上させるには、それらのテーブルのサイズを大きくする必要がある。
[Fifth Embodiment]
By the way, in the arithmetic processing unit 171 of the third embodiment described above, the interpolation processing of the values of the mantissa power table and the power table of the decimal number is not performed, so that the power calculation accuracy, that is, the calculation of the integer part of the operation value is performed. In order to improve accuracy, it is necessary to increase the size of these tables.

具体的に、演算処理装置171により算出された演算値(P+α)の整数部分Rと、数学ライブラリを用いた計算により得られた演算値(P+α)の整数部分QとからなるL個のデータのセットを用いて、次式(54)を計算し、絶対誤差平均Uを求めて整数部分Rの算出精度を評価することを考える。   Specifically, L pieces of data consisting of an integer part R of the operation value (P + α) calculated by the arithmetic processing unit 171 and an integer part Q of the operation value (P + α) obtained by calculation using a mathematical library are stored. It is assumed that the following equation (54) is calculated using the set, the absolute error average U is obtained, and the calculation accuracy of the integer part R is evaluated.

Figure 2010032762
Figure 2010032762

なお、式(54)において、Riは、演算処理装置171により算出された整数部分RのL個の整数部分(サンプル)のうちのi番目のサンプルを示しており、Qiは、数学ライブラリにより求められた、Riに対応する整数部分を示している。 In equation (54), R i represents the i-th sample of L integer parts (samples) of the integer part R calculated by the arithmetic processing unit 171, and Q i is a mathematical library obtained by, and an integer part corresponding to R i.

例えば、べき指数Y=3.141592とし、L=8192として整数部分Rの算出精度の評価を行ったところ、テーブルサイズ2NにおけるNが8であるとき、すなわちSIZE=256のとき、絶対誤差平均U=2.09×101となり、それほど高い精度は得られなかった。また、テーブルサイズ2NにおけるNが16であるとき、すなわちSIZE=65536のとき、絶対誤差平均U=1.15×10-2となり、N=8の場合よりも高い精度が得られた。 For example, the index Y = 3.141592 should, were evaluated in the calculation accuracy of the integral part R as L = 8192, when N in the table size 2 N is eight, that is, when the SIZE = 256, absolute error Mean U = It was 2.09 × 10 1 and so high accuracy could not be obtained. Further, when N in the table size 2 N is 16, that is, when SIZE = 65536, the absolute error average U = 1.15 × 10 −2 is obtained, and higher accuracy is obtained than in the case of N = 8.

このような絶対誤差平均Uによる評価の結果からも分かるように、演算処理装置171においては、整数部分の演算精度を向上させるには、仮数のべき乗テーブルや小数のべき乗テーブルのサイズを大きくする必要がある。   As can be seen from the evaluation result based on the absolute error average U, the arithmetic processing unit 171 needs to increase the size of the mantissa power table and the decimal power table in order to improve the arithmetic accuracy of the integer part. There is.

そこで、入力値X=X’+α1/Yとし、仮数のべき乗テーブルおよび小数のべき乗テーブルの値の補間処理を行うようにすることで、より簡単に演算値の整数化を行うとともに、整数化の演算精度を向上させる。 Therefore, by making the input value X = X ′ + α 1 / Y and interpolating the values of the mantissa power table and the decimal power table, the arithmetic value can be converted into an integer and the integer can be converted into an integer. Improve the calculation accuracy.

そのような場合、演算処理装置は、例えば図18に示すように構成される。なお、図18において、図5、または図8における場合と対応する部分には、同一の符号を付してあり、その説明は適宜、省略する。   In such a case, the arithmetic processing unit is configured as shown in FIG. 18, for example. In FIG. 18, the same reference numerals are given to the portions corresponding to those in FIG. 5 or FIG. 8, and description thereof will be omitted as appropriate.

演算処理装置251は、仮数/指数分離部101、整数/小数分離部102、補間処理部141、仮数のべき乗テーブル保持部261、小数のべき乗テーブル保持部262、およびべき乗整数変換部263から構成される。   The arithmetic processing unit 251 includes a mantissa / exponent separation unit 101, an integer / decimal separation unit 102, an interpolation processing unit 141, a mantissa power table holding unit 261, a decimal power table holding unit 262, and a power integer conversion unit 263. The

仮数のべき乗テーブル保持部261は、仮数X1の値により定まる、入力値Xの仮数部分のべき乗の値であるテーブル値が含まれる仮数のべき乗テーブルを保持している。なお、仮数のべき乗テーブルにおける、テーブル値は、小数点位置が23ビット目にある固定小数点数とされている。 The mantissa power table holding unit 261 holds a mantissa power table including a table value that is a power value of the mantissa part of the input value X, which is determined by the value of the mantissa X 1 . The table value in the mantissa power table is a fixed-point number whose decimal point position is the 23rd bit.

小数のべき乗テーブル保持部262は、小数Xamariをべき指数とし、小数Xamariの値により定まる、入力値Xの基数(底)のべき乗の値であるテーブル値が含まれる小数のべき乗テーブルを保持している。なお、小数のべき乗テーブルにおける、テーブル値は、小数点位置が23ビット目にある固定小数点数とされている。 The decimal power table holding unit 262 holds a power table of decimal numbers including a table value that is a power value of the base (base) of the input value X, which is determined by the value of the decimal number X amari , with the decimal number X amari being a power index. is doing. The table value in the power table of decimal numbers is a fixed-point number with the decimal point position at the 23rd bit.

また、仮数のべき乗テーブル保持部261のべき乗の値(テーブル値)、および小数のべき乗テーブル保持部262のべき乗の値(テーブル値)は、補間処理部141に供給される。さらに、補間処理部141において、仮数のべき乗テーブル保持部261および小数のべき乗テーブル保持部262からのテーブル値を用いた補間処理により、入力値Xの仮数部分のべき乗の値である補間値(1+X1/223Y、および入力値Xの基数のべき乗の値である補間値(2^Xamari)が得られる。これらの補間値は、補間処理部141からべき乗整数変換部263に供給される。 Further, the power value (table value) of the mantissa power table holding unit 261 and the power value (table value) of the decimal power table holding unit 262 are supplied to the interpolation processing unit 141. Further, in the interpolation processing unit 141, an interpolation value (1 + X) that is a power value of the mantissa part of the input value X is obtained by interpolation processing using the table values from the mantissa power table holding unit 261 and the decimal power table holding unit 262. 1/2 23) Y, and input value a power of the value is interpolated values radix X (2 ^ X amari) is obtained. These interpolation values are supplied from the interpolation processing unit 141 to the power integer conversion unit 263.

べき乗整数変換部263は、補間処理部141からの補間値と、整数/小数分離部102からの整数Xintとを用いて、演算値(P+α)の整数部分を求め、出力する。 The power integer conversion unit 263 uses the interpolation value from the interpolation processing unit 141 and the integer X int from the integer / decimal number separation unit 102 to obtain and output the integer part of the calculated value (P + α).

次に、図19のフローチャートを参照して、演算処理装置251によるべき乗演算処理について説明する。   Next, with reference to the flowchart of FIG. 19, the power calculation process by the calculation processing device 251 will be described.

ステップS171において、仮数のべき乗テーブル保持部261は、仮数のべき乗テーブルを生成する。例えば、補間処理部141により補間処理として2次の多項式補間が行われる場合、仮数のべき乗テーブル保持部261は、仮数のべき乗テーブルのテーブルサイズを2N+2=SIZE+2とする。そして、仮数のべき乗テーブル保持部261は、次式(55)に示されるテーブル値frctable[i]からなる仮数のべき乗テーブルを生成する。 In step S171, the mantissa power table holding unit 261 generates a mantissa power table. For example, when quadratic polynomial interpolation is performed as an interpolation process by the interpolation processing unit 141, the mantissa power table holding unit 261 sets the table size of the mantissa power table to 2 N + 2 = SIZE + 2. Then, the mantissa power table holding unit 261 generates a mantissa power table composed of table values frctable [i] represented by the following equation (55).

Figure 2010032762
Figure 2010032762

ここで、テーブル値frctable[i]の変数iは、仮数X1から求まるインデックスindex1の値を示しており、変数i=0,・・・,(SIZE+1)とされる。 Here, the variable i of the table values frctable [i] indicates the value of the index index1 obtained from mantissa X 1, variable i = 0, · · ·, are (SIZE + 1).

例えば、インデックスindex1を仮数X1の上位何ビットかの値とすれば、式(55)における(1+i/SIZE)Yは、仮数X1の値に対する、入力値Xの仮数部分をY乗して得られる値(1+X1/223Yの近似値となる。さらに、式(55)では、近似値(1+i/SIZE)Yに223が乗算されて整数化され、近似値が固定小数点化されている。つまり、テーブル値frctable[i]は、小数点位置が23ビット目にある固定小数点数とされる。 For example, if the index index1 and many of the high-order bits of the value of the mantissa X 1, (1 + i / SIZE) Y in the formula (55), for the values of the mantissa X 1, the mantissa part of the input value X to multiply Y the values obtained (1 + X 1/2 23 ) the approximation of Y. Furthermore, in Formula (55), is 2 23 is multiplied integer an approximation (1 + i / SIZE) Y , the approximate value is a fixed point of. That is, the table value frctable [i] is a fixed-point number whose decimal point position is the 23rd bit.

仮数のべき乗テーブル保持部261は、(SIZE+2)個の各変数の値iのそれぞれに対する、テーブル値frctable[i]のそれぞれを求めると、それらの値iとテーブル値frctable[i]とを対応付けて仮数のべき乗テーブルを生成し、保持する。   When the mantissa power table holding unit 261 obtains each of the table values frctable [i] for each of the values i of (SIZE + 2) variables, the value i is associated with the table value frctable [i]. To generate and hold a mantissa power table.

なお、補間処理として、補間処理部141により線形補間が行われる場合には、仮数のべき乗テーブルのテーブルサイズは2N+1=SIZE+1とされ、式(55)のテーブル値frctable[i]からなる仮数のべき乗テーブルが生成される。 As the interpolation process, when linear interpolation is performed by the interpolation processing unit 141, the table size of the power table of the mantissa is 2 N + 1 = SIZE + 1, and the mantissa composed of the table value frctable [i] in Expression (55) A power-of-power table is generated.

ステップS172において、小数のべき乗テーブル保持部262は、小数のべき乗テーブルを生成する。例えば、補間処理部141により補間処理として2次の多項式補間が行われる場合、小数のべき乗テーブル保持部262は、小数のべき乗テーブルのテーブルサイズを2N+2=SIZE+2とする。そして、小数のべき乗テーブル保持部262は、次式(56)に示されるテーブル値twotable[i]からなる小数のべき乗テーブルを生成する。 In step S172, the decimal power table holding unit 262 generates a power table of decimal numbers. For example, when the interpolation processing unit 141 performs quadratic polynomial interpolation as the interpolation processing, the decimal power table holding unit 262 sets the table size of the decimal power table to 2 N + 2 = SIZE + 2. Then, the decimal power table holding unit 262 generates a decimal power table composed of table values twotable [i] represented by the following equation (56).

Figure 2010032762
Figure 2010032762

ここで、テーブル値twotable[i]の変数iは、小数Xamariから求まるインデックスindex2の値を示しており、変数i=0,・・・,(SIZE+1)とされる。 Here, the variable i of the table value twotable [i] indicates the value of the index index2 obtained from the decimal number X amari , and the variable i = 0,..., (SIZE + 1).

インデックスindex2を、小数Xamariの上位何ビットかの値とすれば、式(56)における2(i/SIZE)は、小数Xamariの値に対する、入力値Xの基数「2」のXamari乗の値2^Xamariの近似値となる。さらに、式(56)では、近似値2(i/SIZE)に223が乗算されて整数化され、近似値が固定小数点化されている。つまり、テーブル値twotable[i]は、小数点位置が23ビット目にある固定小数点数とされる。 If the index index2 is a value of several high-order bits of the decimal number X amari , 2 (i / SIZE) in the equation (56) is the X amari power of the base “2” of the input value X with respect to the value of the decimal number X amari. The value of 2 ^ X amari is an approximate value. Furthermore, in Formula (56), is 2 23 is multiplied integer approximation value 2 (i / SIZE), the approximate value is a fixed point of. That is, the table value twotable [i] is a fixed-point number whose decimal point position is the 23rd bit.

小数のべき乗テーブル保持部262は、(SIZE+2)個の各変数の値iのそれぞれに対するテーブル値twotable[i]のそれぞれを求めると、それらの値iとテーブル値twotable[i]とを対応付けて小数のべき乗テーブルを生成し、保持する。   When the power table holding unit 262 of decimal numbers obtains each of the table values twotable [i] for each of the values i of (SIZE + 2) variables, the values i and the table values twotable [i] are associated with each other. Generate and maintain a fractional power table.

なお、補間処理として、補間処理部141により線形補間が行われる場合には、小数のべき乗テーブルのテーブルサイズは2N+1=SIZE+1とされ、式(56)のテーブル値twotable[i]からなる小数のべき乗テーブルが生成される。 As the interpolation processing, when linear interpolation is performed by the interpolation processing unit 141, the table size of the power table of the decimal number is 2 N + 1 = SIZE + 1, and the decimal number composed of the table value twotable [i] in Expression (56) A power-of-power table is generated.

また、仮数のべき乗テーブルおよび小数のべき乗テーブルを生成する処理は、入力値Xのべき乗演算前に1度行っておけばよい。つまり、1度これらのテーブルを生成しておけば、その後、入力値Xのべき乗演算を行うときは、既に生成されて保持されている仮数のべき乗テーブルおよび小数のべき乗テーブルを用いればよい。   Further, the process of generating the mantissa power table and the decimal power table may be performed once before the power calculation of the input value X. In other words, once these tables are generated, then when performing a power operation of the input value X, a mantissa power table and a decimal power table already generated and held may be used.

このようにして、仮数のべき乗テーブルおよび小数のべき乗テーブルが生成されると、その後、ステップS173およびステップS174の処理が行われるが、これらの処理は、図6のステップS43およびステップS44の処理と同様であるので、その説明は省略する。なお、仮数/指数分離部101により求められた、入力値Xの仮数X1は補間処理部141に供給され、指数X2は整数/小数分離部102に供給される。 When the mantissa power table and the decimal power table are generated in this manner, the processes of step S173 and step S174 are performed thereafter. These processes are the same as the processes of step S43 and step S44 of FIG. Since it is the same, the description is abbreviate | omitted. The mantissa X 1 of the input value X obtained by the mantissa / exponent separator 101 is supplied to the interpolation processor 141, and the exponent X 2 is supplied to the integer / decimal separator 102.

また、整数/小数分離部102が式(26)および式(27)を計算することにより求められた、指数X2とべき指数Yとの積の整数Xintおよび小数Xamariは、べき乗整数変換部263および補間処理部141に供給される。 Further, the integer X int and the decimal number X amari of the product of the exponent X 2 and the power exponent Y, which are obtained by the integer / decimal separator 102 calculating the formulas (26) and (27), are a power integer transform. Is supplied to the unit 263 and the interpolation processing unit 141.

ステップS175において、補間処理部141は、仮数/指数分離部101からの仮数X1を用いて補間処理を行って、入力値Xの仮数部分のべき乗の値の補間値(1+X1/223Yを求め、べき乗整数変換部263に供給する。 In step S175, the interpolation processing unit 141 performs interpolation processing using the mantissa X 1 from mantissa / exponent separation unit 101, the interpolation value of the power value of the mantissa part of the input value X (1 + X 1/2 23) Y is obtained and supplied to the power integer conversion unit 263.

すなわち、補間処理部141は、上述した式(28)を計算することにより、仮数X1の22ビット目から上位Nビットをインデックスindex1として求める。 That is, the interpolation processing unit 141, by calculating equation (28) described above, obtaining the upper N bits as an index index1 from 22 bits of the mantissa X 1.

また、補間処理部141は、上述した式(36)を計算することにより、仮数X1の(22−N)ビット目から0ビット目までの部分の値である下位値Xh1を求める。 Further, the interpolation processing unit 141, by calculating equation (36) described above, obtaining the lower value X h1 is the value of the part of the mantissa X 1 from (22-N) th bit to 0-th bit.

さらに、補間処理部141は、式(37)乃至式(39)により、入力値Xの仮数部分のべき乗の値のテーブル値V10乃至テーブル値V12を求める。 Further, the interpolation processing unit 141 obtains the table value V 10 to the table value V 12 of the power value of the mantissa part of the input value X by Expressions (37) to (39).

すなわち、補間処理部141は、インデックスindex1を変数iの値としたテーブル値frctable[index1]をテーブル値V10として、仮数のべき乗テーブル保持部261の仮数のべき乗テーブルから取得する。同様に、補間処理部141は、インデックスindex1+1およびインデックスindex1+2を変数iの値としたテーブル値frctable[index1+1]およびテーブル値frctable[index1+2]をテーブル値V11およびテーブル値V12として、仮数のべき乗テーブルから取得する。 That is, the interpolation processing unit 141, as a table value frctable [index1] table value V 10 to which the index index1 and the value of the variable i, obtained from a power table mantissa of the mantissa of the power table holding unit 261. Likewise, the interpolation processing unit 141, the index index1 + 1 and the index index1 + 2 to the value of the variable i and table value frctable [index1 + 1] and table values frctable [index1 + 2] table values V 11 and the table value V 12 of the mantissa of a power table Get from.

そして、補間処理部141は、下位値Xh1と、テーブル値V10乃至テーブル値V12とを用いて補間処理を行い、入力値Xの仮数部分のべき乗の値の補間値(1+X1/223Yを求める。 Then, the interpolation processing unit 141 performs an interpolation process using the lower value X h1 and the table values V 10 to V 12, and an interpolated value (1 + X 1/2) of the power value of the mantissa part of the input value X 23 ) Find Y.

例えば、補間処理部141は、補間処理として線形補間を行う場合、式(40)乃至式(42)を計算することにより、補間値H=(1+X1/223Yを求める。また、例えば、補間処理部141は、補間処理として2次の多項式補間を行う場合、式(43)乃至式(46)を計算することにより、補間値H=(1+X1/223Yを求める。 For example, the interpolation processing unit 141, when performing a linear interpolation as the interpolation process by calculating equation (40) through (42), determine the interpolation value H = (1 + X 1/ 2 23) Y. Further, for example, the interpolation processing unit 141, when performing a second-order polynomial interpolation as the interpolation process by calculating equation (43) through (46), the interpolation value H = (1 + X 1/ 2 23) Y Ask.

なお、補間処理部141は、補間処理を行わない場合には、テーブル値V10を、入力値Xの仮数部分のべき乗の値の補間値(1+X1/223Yとする。 Incidentally, the interpolation processing unit 141, the case without interpolation, the table value V 10, the interpolation value of power values of the mantissa part of the input value X (1 + X 1/2 23) to Y.

入力値Xの仮数部分のべき乗の値の補間値(1+X1/223Yが求められると、処理はステップS175からステップS176へと進む。 When power of the interpolation value of the value (1 + X 1/2 23 ) Y mantissa part of the input value X is determined, the process proceeds from step S175 to step S176.

ステップS176において、補間処理部141は、整数/小数分離部102からの小数Xamariを用いて補間処理を行って、入力値Xの基数のべき乗の値の補間値(2^Xamari)を求め、べき乗整数変換部263に供給する。 In step S176, the interpolation processing unit 141 performs an interpolation process using the decimal number X amari from the integer / decimal number separation unit 102 to obtain an interpolation value (2 ^ X amari ) of the power of the radix of the input value X. , And supplied to the power integer conversion unit 263.

すなわち、補間処理部141は、上述した式(30)および式(31)を計算することにより、固定小数点化された小数Xamariの22ビット目から上位Nビットの値をindex2として取り出す。また、補間処理部141は、式(47)を計算することにより、小数Xamariの(22−N)ビット目から0ビット目までの部分の値である下位値Xh2を求める。 That is, the interpolation processing unit 141 calculates the above-described Expression (30) and Expression (31), and extracts the value of the upper N bits from the 22nd bit of the fixed-point decimal number X amari as index2. In addition, the interpolation processing unit 141 calculates a lower value X h2 that is the value of the portion from the (22-N) -th bit to the 0-th bit of the decimal number X amari by calculating Expression (47).

さらに、補間処理部141は、式(48)乃至式(50)により、入力値Xの基数のべき乗の値のテーブル値V20乃至テーブル値V22を求める。 Further, the interpolation processing unit 141, by the equation (48) through (50), obtains the table values V 20 to the table value V 22 of the power values of input base value X.

すなわち、補間処理部141は、インデックスindex2を変数iの値とした入力値Xの基数のべき乗の値、つまりテーブル値twotable[index2]をテーブル値V20として、小数のべき乗テーブル保持部262の小数のべき乗テーブルから取得する。 That is, the interpolation processing unit 141, a power value input base value X where the index index2 the value of the variable i, that is the table value twotable [index2] as a table value V 20, fractional fractional power table holding unit 262 Get from the power table.

同様に、補間処理部141は、インデックスindex2+1およびインデックスindex2+2を変数iの値としたテーブル値twotable[index2+1]およびテーブル値twotable[index2+2]をテーブル値V21およびテーブル値V22として、小数のべき乗テーブルから取得する。 Likewise, the interpolation processing unit 141, as an index index2 + 1 and index index2 + 2 values and the table value Twotable of the variable i [index2 + 1] and table values twotable [index2 + 2] table values V 21 and table values V 22 and fractional power table Get from.

そして、補間処理部141は、下位値Xh2と、テーブル値V20乃至テーブル値V22とを用いて補間処理を行い、入力値Xの基数のべき乗の値の補間値(2^Xamari)を求める。 Then, the interpolation processing unit 141 performs an interpolation process using the lower value X h2 and the table value V 20 to the table value V 22, and an interpolation value (2 ^ X amari ) of the power value of the radix of the input value X. Ask for.

例えば、補間処理部141は、補間処理として線形補間を行う場合、式(40)乃至式(42)を計算することにより、補間値H=(2^Xamari)を求める。なお、この場合、式(40)乃至式(42)における下位値Xh1、テーブル値V10、およびテーブル値V11は、下位値Xh2、テーブル値V20、およびテーブル値V21とされる。 For example, when performing linear interpolation as the interpolation processing, the interpolation processing unit 141 calculates the equation (40) to (42) to obtain the interpolation value H = (2 ^ X amari ). In this case, the lower value X h1 , the table value V 10 , and the table value V 11 in the equations (40) to (42) are the lower value X h2 , the table value V 20 , and the table value V 21. .

また、例えば、補間処理部141は、補間処理として2次の多項式補間を行う場合、式(43)乃至式(46)を計算することにより、補間値H=(2^Xamari)を求める。なお、この場合、式(43)乃至式(46)における下位値Xh1、テーブル値V10、テーブル値V11、およびテーブル値V12は、下位値Xh2、テーブル値V20、テーブル値V21、およびテーブル値V22、とされる。 Further, for example, when performing quadratic polynomial interpolation as the interpolation processing, the interpolation processing unit 141 calculates the interpolation value H = (2 ^ X amari ) by calculating Expression (43) to Expression (46). In this case, the lower value X h1 , the table value V 10 , the table value V 11 , and the table value V 12 in the equations (43) to (46) are the lower value X h2 , the table value V 20 , and the table value V. 21 and the table value V 22 .

なお、補間処理部141は、補間処理を行わない場合には、テーブル値V20を、入力値Xの基数のべき乗の値の補間値(2^Xamari)とする。 When the interpolation processing unit 141 does not perform the interpolation processing, the table value V 20 is set to the interpolation value (2 ^ X amari ) of the power of the radix of the input value X.

ステップS177において、べき乗整数変換部263は、補間処理部141からの補間値(1+X1/223Yおよび補間値(2^Xamari)と、整数/小数分離部102からの整数Xintとを用いて、式(53)を計算し、演算値(P+α)の整数部分を求める。そして、べき乗整数変換部263は、求められた整数部分を出力値として出力し、べき乗演算処理は終了する。 In step S177, power integer transform unit 263, the interpolation value from the interpolation processing section 141 (1 + X 1/2 23) Y and the interpolation value (2 ^ X amari), and an integer X int from Integer / fractional separation unit 102 Is used to calculate equation (53), and the integer part of the calculated value (P + α) is obtained. Then, the power integer conversion unit 263 outputs the obtained integer part as an output value, and the power calculation process ends.

以上のようにして、演算処理装置251は、補間処理を行って得られた補間値を用いて、演算値(P+α)の整数部分を求める。このように、補間処理を行って、入力値Xの仮数部分のべき乗の値の補間値と、入力値Xの基数のべき乗の補間値とを求めることにより、仮数のべき乗テーブルおよび小数のべき乗テーブルのテーブルサイズを増やさずに演算値(P+α)の整数部分を求める演算の精度を向上させることができる。   As described above, the arithmetic processing unit 251 obtains an integer part of the arithmetic value (P + α) using the interpolation value obtained by performing the interpolation processing. In this way, by performing the interpolation process to obtain the interpolated value of the power of the mantissa part of the input value X and the interpolated value of the power of the radix of the input value X, the power table of the mantissa and the power table of the decimal number are obtained. It is possible to improve the accuracy of the calculation for obtaining the integer part of the calculation value (P + α) without increasing the table size.

具体的には、本出願人は、上述した式(54)を計算して求まる絶対誤差平均Uにより、演算処理装置251の整数部分の演算精度の評価を行った。N=8のとき、つまりSIZE=256のとき、仮数のべき乗テーブルの値(テーブル値)、および小数のべき乗テーブルの値(テーブル値)に、それぞれ補間処理を加えた場合と、加えない場合との組み合わせについて、図20に示す評価結果が得られた。   Specifically, the present applicant evaluated the calculation accuracy of the integer part of the arithmetic processing unit 251 based on the absolute error average U obtained by calculating the above-described equation (54). When N = 8, that is, when SIZE = 256, when interpolation processing is added to the value of the mantissa power table (table value) and the value of the decimal power table (table value), respectively, Evaluation results shown in FIG. 20 were obtained for these combinations.

図20は、補間処理を加えた場合と、加えない場合との各組み合わせについての絶対誤差平均Uの値が示されている。すなわち、文字「小数:補間なし」は、小数のべき乗テーブルの値を補間処理せずに演算値(P+α)の整数部分の算出に用いたことを示しており、文字「小数:線形補間」および「小数:2次補間」は、小数のべき乗テーブルの値に線形補間および2次の多項式補間を行って演算値(P+α)の整数部分の算出に用いたことを示している。   FIG. 20 shows the value of the absolute error average U for each combination of the case where the interpolation process is added and the case where the interpolation process is not added. In other words, the character “decimal: no interpolation” indicates that the value of the decimal power table is used for calculation of the integer part of the calculated value (P + α) without performing interpolation processing, and the characters “decimal: linear interpolation” and “Decimal number: quadratic interpolation” indicates that linear interpolation and quadratic polynomial interpolation are performed on the value of the power table of the decimal and used to calculate the integer part of the calculated value (P + α).

同様に、文字「仮数:補間なし」は、仮数のべき乗テーブルの値を補間処理せずに演算値(P+α)の整数部分の算出に用いたことを示しており、文字「仮数:線形補間」および「仮数:2次補間」は、仮数のべき乗テーブルの値に線形補間および2次の多項式補間を行って演算値(P+α)の整数部分の算出に用いたことを示している。   Similarly, the character “mantissa: no interpolation” indicates that the value of the power table of the mantissa is used for calculation of the integer part of the operation value (P + α) without performing the interpolation process, and the character “mantissa: linear interpolation” is used. "Mantissa: quadratic interpolation" indicates that linear interpolation and quadratic polynomial interpolation are performed on the value of the exponent table of the mantissa and used to calculate the integer part of the calculated value (P + α).

図20では、仮数のべき乗テーブルの値、または小数のべき乗テーブルの値の少なくとも何れか一方に補間処理を施すことで、整数部分の演算精度が改善されることが分かる。例えば、仮数のべき乗テーブルの値および小数のべき乗テーブルの値の両方に線形補間を施すとU=1.71×10-2となり、仮数のべき乗テーブルの値および小数のべき乗テーブルの値の両方に2次の多項式補間を施すとU=2.44×10-4となっている。 In FIG. 20, it can be seen that the calculation accuracy of the integer portion is improved by performing interpolation processing on at least one of the value of the mantissa power table or the value of the decimal power table. For example, if linear interpolation is applied to both the value of the mantissa power table and the value of the decimal power table, U = 1.71 × 10 −2 , and both the value of the mantissa power table and the value of the decimal power table are quadratic. When the polynomial interpolation is performed, U = 2.44 × 10 −4 .

このように、両方のテーブル値に2次の多項式補間を施したときの絶対誤差平均の値は、従来の量子化装置51において、N=16のとき、つまりSIZE=65536としたときのテーブルを用いた整数部分の演算精度と同等以上の精度である。   In this way, the absolute error average value when the second-order polynomial interpolation is applied to both table values is the table when N = 16, that is, when SIZE = 65536, in the conventional quantizer 51. The accuracy is equal to or better than the calculation accuracy of the integer part used.

なお、以上においては、仮数のべき乗テーブルと小数のべき乗テーブルのテーブルサイズが同じである例について説明したが、それらのテーブルサイズは、べき乗演算の必要な精度に応じて異なる大きさとされてもよい。テーブルサイズが変更される場合、そのサイズに合わせて補間処理部141により行われる補間処理時のビット位置、つまり下位値Xh1または下位値Xh2の大きさも変更される。 In the above description, the example in which the mantissa power table and the decimal power table have the same table size has been described. However, the table sizes may be different depending on the accuracy required for the power operation. . When the table size is changed, the bit position at the time of the interpolation process performed by the interpolation processing unit 141, that is, the size of the lower value X h1 or the lower value X h2 is also changed according to the size.

また、仮数のべき乗テーブルの値と、小数のべき乗テーブルの値との両方に補間処理を施すと説明したが、補間処理の処理量と必要となる演算精度に応じて、どちらか一方の値に補間処理が施されるようにしてもよいし、それぞれ異なる補間処理が施されるようにしてもよい。さらに、補間処理として、線形補間および2次の多項式補間に限らず、3次以上の多項式補間やスプライン補間が施されるようにしてもよい。   In addition, it has been explained that interpolation processing is performed on both the mantissa power table value and the decimal power table value, but depending on the amount of interpolation processing and the required calculation accuracy, either value is set. Interpolation processing may be performed, or different interpolation processing may be performed. Furthermore, the interpolation processing is not limited to linear interpolation and quadratic polynomial interpolation, and may be performed by higher-order polynomial interpolation or spline interpolation.

さらに、以上においては、浮動小数点数としての入力値Xの基数が「2」である場合について説明したが、この基数は、2に限らず任意の値とすることができる。   Furthermore, in the above description, the case where the radix of the input value X as a floating-point number is “2” has been described, but this radix is not limited to 2 and can be any value.

上述した一連の処理は、ハードウェアにより実行することもできるし、ソフトウェアにより実行することもできる。一連の処理をソフトウェアにより実行する場合には、そのソフトウェアを構成するプログラムが、専用のハードウェアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータなどに、プログラム記録媒体からインストールされる。   The series of processes described above can be executed by hardware or can be executed by software. When a series of processing is executed by software, a program constituting the software may execute various functions by installing a computer incorporated in dedicated hardware or various programs. For example, it is installed from a program recording medium in a general-purpose personal computer or the like.

図21は、上述した一連の処理をプログラムにより実行するコンピュータのハードウェアの構成例を示すブロック図である。   FIG. 21 is a block diagram illustrating a configuration example of hardware of a computer that executes the above-described series of processing by a program.

コンピュータにおいて、CPU(Central Processing Unit)501,ROM(Read Only Memory)502,RAM(Random Access Memory)503は、バス504により相互に接続されている。   In a computer, a CPU (Central Processing Unit) 501, a ROM (Read Only Memory) 502, and a RAM (Random Access Memory) 503 are connected to each other by a bus 504.

バス504には、さらに、入出力インターフェース505が接続されている。入出力インターフェース505には、キーボード、マウス、マイクロホンなどよりなる入力部506、ディスプレイ、スピーカなどよりなる出力部507、ハードディスクや不揮発性のメモリなどよりなる記録部508、ネットワークインターフェースなどよりなる通信部509、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリなどのリムーバブルメディア511を駆動するドライブ510が接続されている。   An input / output interface 505 is further connected to the bus 504. The input / output interface 505 includes an input unit 506 including a keyboard, mouse, and microphone, an output unit 507 including a display and a speaker, a recording unit 508 including a hard disk and a non-volatile memory, and a communication unit 509 including a network interface. A drive 510 for driving a removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory is connected.

以上のように構成されるコンピュータでは、CPU501が、例えば、記録部508に記録されているプログラムを、入出力インターフェース505及びバス504を介して、RAM503にロードして実行することにより、上述した一連の処理が行われる。   In the computer configured as described above, the CPU 501 loads the program recorded in the recording unit 508 to the RAM 503 via the input / output interface 505 and the bus 504 and executes the program, for example. Is performed.

コンピュータ(CPU501)が実行するプログラムは、例えば、磁気ディスク(フレキシブルディスクを含む)、光ディスク(CD-ROM(Compact Disc-Read Only Memory),DVD(Digital Versatile Disc)等)、光磁気ディスク、もしくは半導体メモリなどよりなるパッケージメディアであるリムーバブルメディア511に記録して、あるいは、ローカルエリアネットワーク、インターネット、デジタル衛星放送といった、有線または無線の伝送媒体を介して提供される。   The program executed by the computer (CPU 501) is, for example, a magnetic disk (including a flexible disk), an optical disk (CD-ROM (Compact Disc-Read Only Memory), DVD (Digital Versatile Disc), etc.), a magneto-optical disk, or a semiconductor. The program is recorded on a removable medium 511 that is a package medium including a memory or the like, or provided via a wired or wireless transmission medium such as a local area network, the Internet, or digital satellite broadcasting.

そして、プログラムは、リムーバブルメディア511をドライブ510に装着することにより、入出力インターフェース505を介して、記録部508にインストールすることができる。また、プログラムは、有線または無線の伝送媒体を介して、通信部509で受信し、記録部508にインストールすることができる。その他、プログラムは、ROM502や記録部508に、あらかじめインストールしておくことができる。   The program can be installed in the recording unit 508 via the input / output interface 505 by attaching the removable medium 511 to the drive 510. Further, the program can be received by the communication unit 509 via a wired or wireless transmission medium and installed in the recording unit 508. In addition, the program can be installed in the ROM 502 or the recording unit 508 in advance.

なお、コンピュータが実行するプログラムは、本明細書で説明する順序に沿って時系列に処理が行われるプログラムであっても良いし、並列に、あるいは呼び出しが行われたとき等の必要なタイミングで処理が行われるプログラムであっても良い。   The program executed by the computer may be a program that is processed in time series in the order described in this specification, or in parallel or at a necessary timing such as when a call is made. It may be a program for processing.

なお、本発明の実施の形態は、上述した実施の形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変更が可能である。   The embodiment of the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the gist of the present invention.

従来の符号化装置の構成を示す図である。It is a figure which shows the structure of the conventional encoding apparatus. 従来の量子化装置の構成を示す図である。It is a figure which shows the structure of the conventional quantization apparatus. 従来の量子化装置による量子化処理を説明するフローチャートである。It is a flowchart explaining the quantization process by the conventional quantization apparatus. 単精度浮動小数点数を示す浮動小数点型のデータの構成を示す図である。It is a figure which shows the structure of the data of the floating point type which shows a single precision floating point number. 本発明を適用した演算処理装置の一実施の形態の構成例を示す図である。It is a figure which shows the structural example of one Embodiment of the arithmetic processing apparatus to which this invention is applied. べき乗演算処理を説明するフローチャートである。It is a flowchart explaining a power calculation process. 浮動小数点型のデータにおいて、べき乗値を得るために用いられる部分を説明する図である。It is a figure explaining the part used in order to obtain a power value in floating point type data. 演算処理装置の他の構成例を示す図である。It is a figure which shows the other structural example of an arithmetic processing unit. べき乗演算処理を説明するフローチャートである。It is a flowchart explaining a power calculation process. 線形補間を説明する図である。It is a figure explaining linear interpolation. 2次の多項式補間を説明する図である。It is a figure explaining a quadratic polynomial interpolation. 相対誤差平均を示す図である。It is a figure which shows a relative error average. 相対誤差平均を示す図である。It is a figure which shows a relative error average. 演算処理装置の他の構成例を示す図である。It is a figure which shows the other structural example of an arithmetic processing unit. べき乗演算処理を説明するフローチャートである。It is a flowchart explaining a power calculation process. 演算処理装置の他の構成例を示す図である。It is a figure which shows the other structural example of an arithmetic processing unit. べき乗演算処理を説明するフローチャートである。It is a flowchart explaining a power calculation process. 演算処理装置の他の構成例を示す図である。It is a figure which shows the other structural example of an arithmetic processing unit. べき乗演算処理を説明するフローチャートである。It is a flowchart explaining a power calculation process. 絶対値誤差平均を示す図である。It is a figure which shows an absolute value error average. コンピュータの構成例を示す図である。It is a figure which shows the structural example of a computer.

符号の説明Explanation of symbols

91 演算処理装置, 101 仮数/指数分離部, 102 整数/小数分離部, 103 仮数のべき乗テーブル保持部, 104 小数のべき乗テーブル保持部, 105 べき乗演算部, 106 整数変換部, 131 演算処理装置, 141 補間処理部, 171 演算処理装置, 181 仮数のべき乗テーブル保持部, 182 小数のべき乗テーブル保持部, 183 べき乗整数変換部, 211 演算処理装置, 221 べき乗整数変換部, 251 演算処理装置, 261 仮数のべき乗テーブル保持部, 262 小数のべき乗テーブル保持部, 263 べき乗整数変換部   91 arithmetic processing unit, 101 mantissa / exponent separation unit, 102 integer / decimal separation unit, 103 mantissa power table holding unit, 104 decimal power table holding unit, 105 power operation unit, 106 integer conversion unit, 131 arithmetic processing unit, 141 interpolation processing unit, 171 arithmetic processing unit, 181 mantissa power table holding unit, 182 decimal power table holding unit, 183 power integer conversion unit, 211 arithmetic processing unit, 221 power integer conversion unit, 251 arithmetic processing unit, 261 mantissa Power table holding unit, 262 decimal power table holding unit, 263 power integer conversion unit

Claims (11)

定数Yをべき指数とした、所定の入力値Xのべき乗の演算を行う演算処理装置であって、
浮動小数点型のデータにおける、前記入力値Xを浮動小数点数で表現したときの仮数を表す仮数部である仮数X1と、前記入力値Xを浮動小数点数で表現したときの指数を表す指数部である指数X2とに、前記入力値Xを分離する仮数/指数分離手段と、
前記指数X2と前記定数Yとの積を、前記積の整数部分である整数Xintと、前記積の小数部分である小数Xamariとに分離する整数/小数分離手段と、
前記仮数X1に対して定まる、前記定数Yをべき指数とする前記入力値Xの前記仮数のべき乗値を記録する第1の記録手段と、
前記小数Xamariに対して定まる、前記小数Xamariをべき指数とする、前記入力値Xを浮動小数点数で表現したときの底のべき乗値を記録する第2の記録手段と、
前記仮数X1を用いて前記第1の記録手段から取得した前記仮数の前記べき乗値、前記小数Xamariを用いて前記第2の記録手段から取得した前記底の前記べき乗値、および前記整数Xintから、前記定数Yをべき指数とした、前記入力値Xのべき乗を演算するべき乗演算手段と
を備える演算処理装置。
An arithmetic processing device that performs a power of a predetermined input value X with a constant Y as a power exponent,
In floating-point data, the mantissa X 1 is a mantissa representing the mantissa when that expresses the input value X in the floating-point number, the exponent for exponentiation upon representing said input values X in the floating-point number A mantissa / exponent separation means for separating the input value X into an exponent X 2 of
An integer / decimal separating means for separating the product of the exponent X 2 and the constant Y into an integer X int that is an integer part of the product and a decimal X amari that is a decimal part of the product;
First recording means for recording a power value of the mantissa of the input value X, which is determined with respect to the mantissa X 1 and has the constant Y as a power exponent;
Determined with respect to the fractional X amari, a second recording unit operable to fractional X amari to the index, record the exponential value of the bottom when the representing said input values X in the floating-point number,
The power value of the mantissa obtained from the first recording means using the mantissa X 1 , the power value of the base obtained from the second recording means using the decimal number X amari , and the integer X An arithmetic processing unit comprising: a power calculating means for calculating a power of the input value X, using the constant Y as a power exponent from int .
前記仮数X1を用いて前記第1の記録手段から取得した、複数の前記べき乗値を用いて補間処理を行い、最終的な前記仮数の前記べき乗値を求める補間手段をさらに備え、
前記べき乗演算手段は、前記底の前記べき乗値、および前記整数Xint、および前記補間手段により求められた前記仮数の前記べき乗値から、前記定数Yをべき指数とした、前記入力値Xのべき乗を演算する
請求項1に記載の演算処理装置。
The mantissa and X 1 using the obtained from the first recording means, performs interpolation processing using a plurality of the power values, further comprising an interpolation means for obtaining the final the exponential value of the mantissa,
The power calculation means is a power of the input value X with the constant Y as a power exponent from the power value of the base, the integer X int , and the power value of the mantissa obtained by the interpolation means. The arithmetic processing device according to claim 1.
前記小数Xamariを用いて前記第2の記録手段から取得した、複数の前記べき乗値を用いて補間処理を行い、最終的な前記底の前記べき乗値を求める補間手段をさらに備え、
前記べき乗演算手段は、前記仮数の前記べき乗値、および前記整数Xint、および前記補間手段により求められた前記底の前記べき乗値から、前記定数Yをべき指数とした、前記入力値Xのべき乗を演算する
請求項1に記載の演算処理装置。
Interpolating using a plurality of power values obtained from the second recording means using the decimal number X amari , and further comprising an interpolation means for obtaining the final power value of the base,
The power calculation means is a power of the input value X using the constant Y as a power exponent from the power value of the mantissa, the integer X int , and the power value of the base obtained by the interpolation means. The arithmetic processing device according to claim 1.
定数Yをべき指数とした、所定の入力値Xのべき乗の演算を行う演算処理装置であり、
浮動小数点型のデータにおける、前記入力値Xを浮動小数点数で表現したときの仮数を表す仮数部である仮数X1と、前記入力値Xを浮動小数点数で表現したときの指数を表す指数部である指数X2とに、前記入力値Xを分離する仮数/指数分離手段と、
前記指数X2と前記定数Yとの積を、前記積の整数部分である整数Xintと、前記積の小数部分である小数Xamariとに分離する整数/小数分離手段と、
前記仮数X1に対して定まる、前記定数Yをべき指数とする前記入力値Xの前記仮数のべき乗値を記録する第1の記録手段と、
前記小数Xamariに対して定まる、前記小数Xamariをべき指数とする、前記入力値Xを浮動小数点数で表現したときの底のべき乗値を記録する第2の記録手段と、
前記仮数X1を用いて前記第1の記録手段から取得した前記仮数の前記べき乗値、前記小数Xamariを用いて前記第2の記録手段から取得した前記底の前記べき乗値、および前記整数Xintから、前記定数Yをべき指数とした、前記入力値Xのべき乗を演算するべき乗演算手段と
を備える演算処理装置の演算処理方法であって、
前記仮数/指数分離手段が前記入力値Xを前記仮数X1と前記指数X2とに分離し、
前記整数/小数分離手段が前記指数X2と前記定数Yとの前記積を、前記整数Xintと前記小数Xamariとに分離し、
前記べき乗演算手段が前記定数Yをべき指数とした、前記入力値Xのべき乗を演算する
ステップを含む演算処理方法。
An arithmetic processing unit that performs a power of a predetermined input value X with a constant Y as a power exponent;
In floating-point data, the mantissa X 1 is a mantissa representing the mantissa when that expresses the input value X in the floating-point number, the exponent for exponentiation upon representing said input values X in the floating-point number A mantissa / exponent separation means for separating the input value X into an exponent X 2 of
An integer / decimal separating means for separating the product of the exponent X 2 and the constant Y into an integer X int that is an integer part of the product and a decimal X amari that is a decimal part of the product;
First recording means for recording a power value of the mantissa of the input value X, which is determined with respect to the mantissa X 1 and has the constant Y as a power exponent;
Determined with respect to the fractional X amari, a second recording unit operable to fractional X amari to the index, record the exponential value of the bottom when the representing said input values X in the floating-point number,
The power value of the mantissa obtained from the first recording means using the mantissa X 1 , the power value of the base obtained from the second recording means using the decimal number X amari , and the integer X an arithmetic processing method of an arithmetic processing device comprising: a power calculating means for calculating a power of the input value X from the int with the constant Y as a power exponent,
The mantissa / exponent separation means separates the input value X into the mantissa X 1 and the exponent X 2 ,
The integer / decimal separating means separates the product of the exponent X 2 and the constant Y into the integer X int and the decimal X amari ;
An arithmetic processing method including a step of calculating a power of the input value X, wherein the power calculation means uses the constant Y as a power exponent.
定数Yをべき指数とした、所定の入力値Xのべき乗の演算を行う演算処理装置に、
浮動小数点型のデータにおける、前記入力値Xを浮動小数点数で表現したときの仮数を表す仮数部である仮数X1と、前記入力値Xを浮動小数点数で表現したときの指数を表す指数部である指数X2とに、前記入力値Xを分離し、
前記指数X2と前記定数Yとの積を、前記積の整数部分である整数Xintと、前記積の小数部分である小数Xamariとに分離し、
前記仮数X1を用いて取得した、前記仮数X1に対して定まる、前記定数Yをべき指数とする前記入力値Xの前記仮数のべき乗値、前記小数Xamariを用いて取得した、前記小数Xamariに対して定まる、前記入力値Xを浮動小数点数で表現したときの底の前記小数Xamariをべき指数とするべき乗値、および前記整数Xintから、前記定数Yをべき指数とした、前記入力値Xのべき乗を演算する
ステップを含む処理を実行させるプログラム。
In an arithmetic processing unit that performs a power of a predetermined input value X with a constant Y as a power exponent,
In floating point type data, a mantissa X 1 which is a mantissa representing a mantissa when the input value X is represented by a floating point number, and an exponent part representing an exponent when the input value X is represented by a floating point number The input value X is separated into an index X 2 that is
The product of the exponent X 2 and the constant Y, separated an integer X int is an integer part of the product, in a fraction X amari a fractional part of the product,
The mantissa obtained using the X 1, determined with respect to the mantissa X 1, power value of the mantissa of the input value X to the constant Y the exponent was obtained using the fractional X amari, the fractional The constant Y is defined as a power exponent from a power value that uses the decimal value X amari at the base when the input value X is expressed as a floating-point number, and the integer X int , which is determined with respect to X amari . A program for executing a process including a step of calculating a power of the input value X.
定数Yをべき指数とした、所定の入力値Xのべき乗値の整数を求める演算処理装置であって、
浮動小数点型のデータにおける、前記入力値Xを浮動小数点数で表現したときの仮数を表す仮数部である仮数X1と、前記入力値Xを浮動小数点数で表現したときの指数を表す指数部である指数X2とに、前記入力値Xを分離する仮数/指数分離手段と、
前記指数X2と前記定数Yとの積を、前記積の整数部分である整数Xintと、前記積の小数部分である小数Xamariとに分離する整数/小数分離手段と、
前記仮数X1に対して定まる、前記定数Yをべき指数とする前記入力値Xの前記仮数のべき乗値と、前記小数Xamariをべき指数とする、前記入力値Xを浮動小数点数で表現したときの底のべき乗値との積を示す固定小数点化されたデータに対して、前記固定小数点化されたデータの最下位ビットから小数点位置までのビット数から、前記整数Xintを減算して得られる数を示すビット数分だけ右シフト演算を行って、前記入力値Xのべき乗値の前記整数を求めるべき乗整数変換手段と
を備える演算処理装置。
An arithmetic processing unit that obtains an integer of a power value of a predetermined input value X with a constant Y as a power exponent,
In floating-point data, the mantissa X 1 is a mantissa representing the mantissa when that expresses the input value X in the floating-point number, the exponent for exponentiation upon representing said input values X in the floating-point number A mantissa / exponent separation means for separating the input value X into an exponent X 2 of
An integer / decimal separating means for separating the product of the exponent X 2 and the constant Y into an integer X int that is an integer part of the product and a decimal X amari that is a decimal part of the product;
The input value X represented by a floating-point number, which is determined with respect to the mantissa X 1 , is a power value of the mantissa of the input value X having the constant Y as a power exponent, and the decimal number X amari is a power exponent. Obtained by subtracting the integer X int from the number of bits from the least significant bit of the fixed-point data to the decimal point position, for the fixed-point data that represents the product of the power of the base An arithmetic processing unit comprising: a power integer conversion unit that performs a right shift operation by the number of bits indicating the number to be obtained to obtain the integer of the power value of the input value X.
前記仮数X1に対して定まる、前記入力値Xの前記仮数の前記べき乗値を記録する第1の記録手段と、
前記小数Xamariに対して定まる、前記底の前記べき乗値を記録する第2の記録手段と
をさらに備え、
前記べき乗整数変換手段は、前記仮数X1を用いて前記第1の記録手段から取得された前記仮数の前記べき乗値、および前記小数Xamariを用いて前記第2の記録手段から取得された前記底の前記べき乗値を用いて、前記入力値Xのべき乗値の前記整数を求める
請求項6に記載の演算処理装置。
First recording means for recording the power value of the mantissa of the input value X, which is determined with respect to the mantissa X 1 ;
Second recording means for recording the power value of the base determined for the decimal number X amari ; and
The power integer converting means is the power value of the mantissa acquired from the first recording means using the mantissa X 1 and the power acquired from the second recording means using the decimal number X amari. The arithmetic processing device according to claim 6, wherein the integer of the power value of the input value X is obtained using the power value of the base.
前記仮数X1を用いて前記第1の記録手段から取得した、複数の前記べき乗値を用いて補間処理を行い、最終的な前記仮数の前記べき乗値を求める補間手段をさらに備え、
前記べき乗整数変換手段は、前記補間手段により求められた前記仮数の前記べき乗値を用いて、前記入力値Xのべき乗値の前記整数を求める
請求項7に記載の演算処理装置。
The mantissa and X 1 using the obtained from the first recording means, performs interpolation processing using a plurality of the power values, further comprising an interpolation means for obtaining the final the exponential value of the mantissa,
The arithmetic processing apparatus according to claim 7, wherein the power integer conversion unit obtains the integer of the power value of the input value X using the power value of the mantissa obtained by the interpolation unit.
前記小数Xamariを用いて前記第2の記録手段から取得した、複数の前記べき乗値を用いて補間処理を行い、最終的な前記底の前記べき乗値を求める補間手段をさらに備え、
前記べき乗整数変換手段は、前記補間手段により求められた前記底の前記べき乗値を用いて、前記入力値Xのべき乗値の前記整数を求める
請求項7に記載の演算処理装置。
Interpolating using a plurality of power values obtained from the second recording means using the decimal number X amari , and further comprising an interpolation means for obtaining the final power value of the base,
The arithmetic processing device according to claim 7, wherein the power integer conversion unit obtains the integer of the power value of the input value X using the power value of the base obtained by the interpolation unit.
定数Yをべき指数とした、所定の入力値Xのべき乗値の整数を求める演算処理装置であり、
浮動小数点型のデータにおける、前記入力値Xを浮動小数点数で表現したときの仮数を表す仮数部である仮数X1と、前記入力値Xを浮動小数点数で表現したときの指数を表す指数部である指数X2とに、前記入力値Xを分離する仮数/指数分離手段と、
前記指数X2と前記定数Yとの積を、前記積の整数部分である整数Xintと、前記積の小数部分である小数Xamariとに分離する整数/小数分離手段と、
前記仮数X1に対して定まる、前記定数Yをべき指数とする前記入力値Xの前記仮数のべき乗値と、前記小数Xamariをべき指数とする、前記入力値Xを浮動小数点数で表現したときの底のべき乗値との積を示す固定小数点化されたデータに対して、前記固定小数点化されたデータの最下位ビットから小数点位置までのビット数から、前記整数Xintを減算して得られる数を示すビット数分だけ右シフト演算を行って、前記入力値Xのべき乗値の前記整数を求めるべき乗整数変換手段と
を備える演算処理装置の演算処理方法であって、
前記仮数/指数分離手段が前記入力値Xを前記仮数X1と前記指数X2とに分離し、
前記整数/小数分離手段が前記指数X2と前記定数Yとの前記積を前記整数Xintと前記小数Xamariとに分離し、
前記べき乗整数変換手段が前記入力値Xのべき乗値の前記整数を求める
ステップを含む演算処理方法。
An arithmetic processing unit that obtains an integer of a power value of a predetermined input value X with a constant Y as a power exponent;
In floating-point data, the mantissa X 1 is a mantissa representing the mantissa when that expresses the input value X in the floating-point number, the exponent for exponentiation upon representing said input values X in the floating-point number A mantissa / exponent separation means for separating the input value X into an exponent X 2 of
An integer / decimal separating means for separating the product of the exponent X 2 and the constant Y into an integer X int that is an integer part of the product and a decimal X amari that is a decimal part of the product;
The input value X represented by a floating-point number, which is determined with respect to the mantissa X 1 , is a power value of the mantissa of the input value X having the constant Y as a power exponent, and the decimal number X amari is a power exponent. Obtained by subtracting the integer X int from the number of bits from the least significant bit of the fixed-point data to the decimal point position, for the fixed-point data that represents the product of the power of the base An arithmetic processing method of an arithmetic processing device, comprising: a power integer conversion unit that performs a right shift operation by the number of bits indicating the number to be obtained and obtains the integer of the power value of the input value X,
The mantissa / exponent separation means separates the input value X into the mantissa X 1 and the exponent X 2 ,
The integer / decimal separating means separates the product of the exponent X 2 and the constant Y into the integer X int and the decimal X amari ;
An arithmetic processing method including a step in which the power integer conversion means obtains the integer of the power value of the input value X.
定数Yをべき指数とした、所定の入力値Xのべき乗値の整数を求める演算処理装置に、
浮動小数点型のデータにおける、前記入力値Xを浮動小数点数で表現したときの仮数を表す仮数部である仮数X1と、前記入力値Xを浮動小数点数で表現したときの指数を表す指数部である指数X2とに、前記入力値Xを分離し、
前記指数X2と前記定数Yとの積を、前記積の整数部分である整数Xintと、前記積の小数部分である小数Xamariとに分離し、
前記仮数X1に対して定まる、前記定数Yをべき指数とする前記入力値Xの前記仮数のべき乗値と、前記小数Xamariをべき指数とする、前記入力値Xを浮動小数点数で表現したときの底のべき乗値との積を示す固定小数点化されたデータに対して、前記固定小数点化されたデータの最下位ビットから小数点位置までのビット数から、前記整数Xintを減算して得られる数を示すビット数分だけ右シフト演算を行って、前記入力値Xのべき乗値の前記整数を求める
ステップを含む処理を実行させるプログラム。
In an arithmetic processing unit that obtains an integer of a power value of a predetermined input value X with a constant Y as a power exponent,
In floating point type data, a mantissa X 1 which is a mantissa representing a mantissa when the input value X is represented by a floating point number, and an exponent part representing an exponent when the input value X is represented by a floating point number The input value X is separated into an index X 2 that is
The product of the exponent X 2 and the constant Y, separated an integer X int is an integer part of the product, in a fraction X amari a fractional part of the product,
The input value X represented by a floating-point number, which is determined with respect to the mantissa X 1 , is a power value of the mantissa of the input value X having the constant Y as a power exponent, and the decimal number X amari is a power exponent. Obtained by subtracting the integer X int from the number of bits from the least significant bit of the fixed-point data to the decimal point position, for the fixed-point data that represents the product of the power of the base A program for executing a process including a step of calculating a right power value of the input value X by performing a right shift operation by the number of bits indicating a given number.
JP2008194689A 2008-07-29 2008-07-29 Arithmetic processing unit and method, and program Withdrawn JP2010032762A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008194689A JP2010032762A (en) 2008-07-29 2008-07-29 Arithmetic processing unit and method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008194689A JP2010032762A (en) 2008-07-29 2008-07-29 Arithmetic processing unit and method, and program

Publications (1)

Publication Number Publication Date
JP2010032762A true JP2010032762A (en) 2010-02-12

Family

ID=41737309

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008194689A Withdrawn JP2010032762A (en) 2008-07-29 2008-07-29 Arithmetic processing unit and method, and program

Country Status (1)

Country Link
JP (1) JP2010032762A (en)

Similar Documents

Publication Publication Date Title
JP4529098B2 (en) Arithmetic processing apparatus and method, and program
EP1801691B1 (en) Information encoding method, decoding method, common multiplier estimation method, device using these methods, program, and recording medium
EP2750134B1 (en) Encoding device and method, decoding device and method, and program
US20190098309A1 (en) Method and apparatus for pyramid vector quantization indexing and de-indexing of audio/video sample vectors
RU2006130966A (en) DEVICE AND METHOD FOR DETERMINING QUANTIZER STEP QUANTITY
US6304890B1 (en) Exponential calculation device and decoding device
JP6739604B2 (en) Encoding method, device, program, and recording medium
KR100771401B1 (en) Computing circuits and method for running an mpeg-2 aac or mpeg-4 aac audio decoding algorithm on programmable processors
KR100921795B1 (en) Method for producing a representation of a calculation result that is linearly dependent on the square of a value
JP2010078965A (en) Computation apparatus and method, quantization device and method, and program
US20150317985A1 (en) Signal Adaptive FIR/IIR Predictors for Minimizing Entropy
US7426462B2 (en) Fast codebook selection method in audio encoding
JP4702645B2 (en) Arithmetic apparatus and method, quantization apparatus and method, and program
JP2010032762A (en) Arithmetic processing unit and method, and program
JP5336942B2 (en) Encoding method, decoding method, encoder, decoder, program
KR101883823B1 (en) Coding device, decoding device, method, program and recording medium thereof
JP3194930B2 (en) Audio coding device
JP6780108B2 (en) Encoding device, decoding device, smoothing device, de-smoothing device, their methods, and programs
JP4438655B2 (en) Encoding device, decoding device, encoding method, and decoding method
US20090326932A1 (en) Reducing Computational Complexity in Determining the Distance from Each of a Set of Input Points to Each of a Set of Fixed Points
JP2002344316A (en) Nonlinear quantizer and nonlinear quantizing method, nonlinear quantizing program
KR101500972B1 (en) Method and Apparatus of Encoding/Decoding Multi-Channel Signal
JP2008090178A (en) Signal processing method, signal processor, and program

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20111004