CN1677308A - Logarithmic Transformation Method and Device - Google Patents

Logarithmic Transformation Method and Device Download PDF

Info

Publication number
CN1677308A
CN1677308A CN 200410033338 CN200410033338A CN1677308A CN 1677308 A CN1677308 A CN 1677308A CN 200410033338 CN200410033338 CN 200410033338 CN 200410033338 A CN200410033338 A CN 200410033338A CN 1677308 A CN1677308 A CN 1677308A
Authority
CN
China
Prior art keywords
mantissa
unit
coefficient
mth
temp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200410033338
Other languages
Chinese (zh)
Other versions
CN100340940C (en
Inventor
姚锦树
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.)
BenQ Corp
Original Assignee
BenQ 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 BenQ Corp filed Critical BenQ Corp
Priority to CNB2004100333383A priority Critical patent/CN100340940C/en
Publication of CN1677308A publication Critical patent/CN1677308A/en
Application granted granted Critical
Publication of CN100340940C publication Critical patent/CN100340940C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

The invention provides a logarithmic conversion method for a digital processing unit. The logarithm conversion method is to convert a number x to be processed into a logarithm L with a base b, and the logarithm L includes a characteristic number In and a mantissa number Ma. The logarithmic conversion method represents all numbers in fixed-point format. The logarithmic conversion method comprises the following steps. Specifying an exact number of bits k required by the mantissa Ma. And establishing a plurality of parameter tables by using the base number b, wherein the number of the parameter tables is equal to the accurate digit number k. The mth of the plurality of parameter tables is a value of the mth bit of the supply and demand mantissa Ma which is equal to or less than the decimal point. The characteristic In is calculated. And sequentially searching a plurality of parameter tables to obtain the values of the 1 st to k th bits of the mantissa Ma below the decimal point.

Description

Logarithm conversion method and device thereof
Technical field
The present invention relates to a kind of logarithm conversion method and device thereof.
Background technology
Carry out digital signal processing and pending number must be transferred to logarithm (logarithm) often.General execution has following method to number conversion.One is with floating-point (floating-point) form shfft registration word, and with power series (power series) or newton-Rui Fu think of a way (Newton-Raphson method) approach the result.Also can table look-up in addition, or only calculate first number (integer) part, and ignore mantissa (mantissa).
So utilize floating-point format to represent numeral, and very complicated in the think of a way mode of approaching the result of power series or newton-Rui Fu, and expend time in and hardware resource.And use the hardware of fixed point format expensive with software emulation floating-point format computing also difficulty.Look-up table is to build up a table of logarithm earlier, if require accurate figure place height, and then must huge form and take huge memory headroom.And it is accurate inadequately only to calculate first number.Therefore need a kind of enough accurate simply again logarithm conversion method and device.
Summary of the invention
Fundamental purpose of the present invention is providing a kind of enough accurate simply again logarithm conversion method and device.The present invention looks the required accurate figure place of mantissa and sets up and the identical parameter list of required accurate figure place number, and m table can be used for asking for the m position of mantissa below radix point.The present invention is simple because of being that lookup table mode utilizes floating-point format to represent that numeral is approached result's mode again.The number of parameter list is decided according to required accurate figure place, and can be as the meaningless memory headroom that expends of lookup table mode.It is accurate to specify in addition accurate figure place also more only to calculate the mode of first number according to need.
The invention provides a kind of logarithm conversion method that is used for a digital processing element.It is a logarithm L at the end that this logarithm conversion method system is converted to pending several x with a truth of a matter b, and logarithm L comprises a first number In and a Ma of mantissa.The logarithm conversion method is represented all numerals with fixed point format.The logarithm conversion method comprises the following step.An accurate figure place k who specifies the Ma of mantissa to require.Utilize truth of a matter b to set up a plurality of parameter lists, the number of a plurality of parameter lists equals accurate figure place k.The m of a plurality of parameter lists is the value that supply and demand are got the m position of the Ma of mantissa below radix point.Calculate first number In.And search a plurality of parameter lists in regular turn, to get the value of the Ma of mantissa the 1st to k position below radix point.
Aforementioned calculation procedure can comprise following steps.Seek the y power that a digital y makes truth of a matter b and be not more than pending several x, and (y+1) power of truth of a matter b is greater than pending several x.And export number In headed by the digital y.
Aforementioned each parameter list can have 10 projects.Aforementioned establishment step can comprise the following step.Be the individual coefficient S C that determines of the m of a plurality of parameter lists mAnd the n power of truth of a matter b opened 10 mThe power radical sign multiply by coefficient S C again m, as m n project of a plurality of parameter lists, n=0 ..., 9.Coefficient S C wherein mSystem is for the spacing that widens 10 projects.Coefficient S C mCan be 2 power series (power series).
Aforementioned finding step can comprise the following step.Set m and equal 1.If m=1 removes among pending several x, the part that first number In constitutes multiply by coefficient S C again mTo get a temporary transient number Temp.Otherwise remove among pending several x, first number In and the Ma of mantissa the 1st part that constitutes to (m-1) position below radix point multiply by coefficient S C again mTemporarily count Temp to get.Seek m n project Tab of a plurality of parameter lists m[n] makes Tab m[n] is not more than temporary transient several Temp, and Tab m[n+1] is greater than temporary transient number Temp.Output n is the m position of the Ma of mantissa below radix point.M is added 1.Relatively m and accurately figure place k.And if m is not more than accurate figure place k, double counting is temporarily counted Temp to relatively m and the accurately step of figure place k.
It is a kind of to analog-to-digital conversion apparatus that the present invention also provides, and is a logarithm L at the end for pending several x are converted to a truth of a matter b.Logarithm L comprises a first number In and a Ma of mantissa.Analog-to-digital conversion apparatus is represented all numerals with fixed point format.Analog-to-digital conversion apparatus is comprised a specified device, an apparatus for establishing, a calculation element and search device.Specified device is for an accurate figure place k who specifies the Ma of mantissa to require.Apparatus for establishing is for utilizing truth of a matter b to set up a plurality of parameter lists.The number of a plurality of parameter lists equals accurate figure place k.The m of a plurality of parameter lists is that supply and demand are got the m position of the Ma of mantissa below radix point.Calculation element is for calculating first number In.Search device for searching a plurality of parameter lists in regular turn, to get 1st to the k position of the Ma of mantissa below radix point.
Aforementioned calculation element can comprise one first and seek unit and one first output unit.First seeks the unit makes the y power of truth of a matter b be not more than pending several x for seeking a digital y, and (y+1) power of truth of a matter b is greater than pending several x.First output unit is counted In headed by the digital y of output.
Aforementioned each parameter list can have 10 projects.Aforementioned apparatus for establishing can comprise a decision unit and one first arithmetic element.The decision unit is for being the individual coefficient S C that determines of the m of a plurality of parameter lists mFirst arithmetic element is for the n power of truth of a matter b is opened 10 mThe power radical sign multiply by coefficient S C again m, as m n project of a plurality of parameter lists, n=0 ..., 9.Coefficient S C wherein mBe for the spacing that widens 10 projects.Coefficient S C mCan be 2 power series.
The aforementioned device of searching can comprise a setup unit, one second arithmetic element, one second searching unit, one second output unit, an adder unit, a comparing unit and a logical block.Setup unit equals 1 for setting m.If m=1, second arithmetic element is for removing among pending several x, and the part that first number In constitutes multiply by coefficient S C again mTo get a temporary transient number Temp.Otherwise second arithmetic element is for removing among pending several x, and first number In and the Ma of mantissa the 1st part that constitutes to (m-1) position below radix point multiply by coefficient S C again mTemporarily count Temp to get.Second seeks the unit for n individual project Tab of the m that seeks a plurality of parameter lists m[n] makes Tab m[n] is not more than temporary transient several Temp, and Tab m[n+1] is greater than temporary transient number Temp.Second output unit is the m position of the Ma of mantissa below radix point for output n.Adder unit is for m is added 1.Comparing unit is for relatively m and accurately figure place k.If m is not more than accurate figure place k, logical block is sought unit, second output unit, adder unit and comparing unit for indication second arithmetic element, second and is repeated pairing action in regular turn.
The accompanying drawing summary
Fig. 1 is the process flow diagram of logarithm conversion method one embodiment of the present invention;
Fig. 2 is that the present invention is to analog-to-digital conversion apparatus one embodiment calcspar; And
Fig. 3 is parameter list one embodiment of the present invention.
The reference numeral explanation
200 pairs of analog-to-digital conversion apparatus embodiment 202 specified devices
204 apparatus for establishing, 206 decision unit
208 first arithmetic elements, 210 calculation elements
212 first seek unit 214 first output units
216 search device 218 setup units
220 second arithmetic elements 222 second are sought the unit
224 second output units, 226 adder units
228 comparing units, 230 logical blocks
Embodiment
Fig. 1 is the process flow diagram of logarithm conversion method one embodiment of the present invention.This logarithm conversion method embodiment is used for a digital processing element, is a logarithm L at the end for pending several x are converted to a truth of a matter b.Logarithm L comprises a first number In and a Ma of mantissa.The logarithm conversion method is represented all numerals with fixed point format.
This logarithm conversion method embodiment comprises the following step.An accurate figure place k (step 101) who specifies the Ma of mantissa to require.Utilize truth of a matter b to set up a plurality of parameter lists, the number of a plurality of parameter lists equals accurate figure place k.The m of a plurality of parameter lists is the value that supply and demand are got the m position of the Ma of mantissa below radix point.Each parameter list can have 10 projects.Aforementioned establishment step can comprise the following step.Be the individual coefficient S C that determines of the m of a plurality of parameter lists m(step 103).The coefficient of each parameter list can be different.Coefficient S C mBe for widening the spacing of 10 projects, if spacing is enough, but also SC m=1.Coefficient S C mCan be 2 power series, the computing in the time of so can making things convenient for numeral to represent with 2 carries.Then the n power of truth of a matter b is opened 10 mThe power radical sign multiply by coefficient S C again m, as m n project of a plurality of parameter lists, n=0 ..., 9 (steps 105).
Other calculates first number In.This calculation procedure can comprise following steps.Seek the y power that a digital y makes truth of a matter b and be not more than pending several x, and (y+1) power of truth of a matter b is greater than pending several x (step 107).And export number In (step 109) headed by the digital y.
Then search a plurality of parameter lists in regular turn, to get the value of the Ma of mantissa the 1st to k position below radix point.This finding step can comprise the following step.Set m and equal 1 (step 111).If m=1 removes among pending several x, the part that first number In constitutes multiply by coefficient S C again mTo get a temporary transient number Temp.Otherwise remove among pending several x, first number In and the Ma of mantissa the 1st part that constitutes to (m-1) position below radix point multiply by coefficient S C again mTemporarily count Temp (step 113) to get.Seek m n project Tab of a plurality of parameter lists m[n] makes Tab m[n] is not more than temporary transient several Temp, and Tab m[n+1] is greater than temporary transient number Temp (step 115).Output n is the m position (step 117) of the Ma of mantissa below radix point.M is added 1 (step 119).Relatively m and accurately figure place k (step 121).If m is not more than accurate figure place k, double counting is temporarily counted Temp to relatively m and the accurately step (step 113-121) of figure place k.If m is greater than k, then exportable before the figure place (step 123) that below radix point, requires of the Ma of gained mantissa.Aforementioned searching Tab mThe step (step 115) of [n] can have many modes, for example begins the comparison size by the 0th project, or begins the comparison size by the 4th or the 5th project.
Though aforementioned establishment step (step 103-105) is prior to calculation procedure (step 107-109), but so also calculation procedure (step 107-109) is prior to establishment step (step 103-105), or both carry out simultaneously.
Fig. 2 is the calcspar of the present invention to analog-to-digital conversion apparatus one embodiment 200.Is a logarithm L at the end to analog-to-digital conversion apparatus embodiment 200 for pending several x are converted to a truth of a matter b.Logarithm L comprises a first number In and a Ma of mantissa.This embodiment 200 represents all numerals with fixed point format.This embodiment 200 comprises a specified device 202, an apparatus for establishing 204, a calculation element 210 and and searches device 216.
Specified device 202 is for an accurate figure place k who specifies the Ma of mantissa to require.Apparatus for establishing 204 is for utilizing truth of a matter b to set up a plurality of parameter lists.The number of a plurality of parameter lists equals accurate figure place k.The m of a plurality of parameter lists is that supply and demand are got the m position of the Ma of mantissa below radix point.Aforementioned each parameter list can have 10 projects.Apparatus for establishing 204 comprises a decision unit 206 and one first arithmetic element 208.Decision unit 206 is for being the individual coefficient S C that determines of the m of a plurality of parameter lists mThe coefficient of each parameter list can be different.Coefficient S C mBe for widening the spacing of 10 projects, if spacing is enough, but also SC m=1.Coefficient S C mCan be 2 power series, the computing in the time of so can making things convenient for numeral to represent with 2 carries.First arithmetic element 208 is for the n power of truth of a matter b is opened 10 mThe power radical sign multiply by coefficient S C again m, as m n project of a plurality of parameter lists, n=0 ..., 9.
Calculation element 210 is for calculating first number In.Calculation element 210 can comprise one first and seek unit 212 and one first output unit 214.First seeks unit 212 makes the y power of truth of a matter b be not more than pending several x for seeking a digital y, and (y+1) power of truth of a matter b is greater than pending several x.First output unit 214 is counted In headed by the digital y of output.
Search device 216 for searching a plurality of parameter lists in regular turn, to get 1st to the k position of the Ma of mantissa below radix point.Search device 216 and can comprise a setup unit 218, one second arithmetic element 220, one second searching unit 222, one second output unit 224, an adder unit 226, a comparing unit 228 and a logical block 230.Setup unit 218 equals 1 for setting m.If m=1, second arithmetic element 220 is for removing among pending several x, and the part that first number In constitutes multiply by coefficient S C again mTo get a temporary transient number Temp.Otherwise second arithmetic element 220 is for removing among pending several x, and first number In and the Ma of mantissa the 1st part that constitutes to (m-1) position below radix point multiply by coefficient S C again mTemporarily count Temp to get.Second seeks unit 222 for n individual project Tab of the m that seeks a plurality of parameter lists m[n] makes Tab m[n] is not more than temporary transient several Temp, and Tab m[n+1] is greater than temporary transient number Temp.Second output unit 224 is the m position of the Ma of mantissa below radix point for output n.Adder unit 226 is for m is added 1.Comparing unit 228 is for relatively m and accurately figure place k.If m is not more than accurate figure place k, logical block 230 is sought unit 222, second output unit 224, adder unit 226 and comparing unit 228 for indication second arithmetic element 220, second and is repeated pairing action in regular turn.Aforementioned second seeks unit 222 seeks Tab m[n] can have many modes, for example begins the comparison size by the 0th project, or begins the comparison size by the 4th or the 5th project.
Below illustrate the running of logarithm conversion method of the present invention and device.Suppose that pending several x equal 135, truth of a matter b equals 10.The accurate figure place k that at first specifies the Ma of mantissa to require equals 3.Next can set up parameter list simultaneously and calculate first number In, or set up parameter list earlier and calculate first number In again, otherwise or.Hypothesis is set up parameter list earlier herein.Please refer to Fig. 3, Fig. 3 is a parameter list embodiment.Owing to require accurate figure place k to equal 3, so set up 3 parameter lists.The 1st parameter list supply and demand are got the Ma of mantissa below radix point the 1st, and the rest may be inferred by analogy.Each parameter list all has 10 projects.Coefficient S C for these 3 parameter list decisions 1-SC 3All be 4096.0 power of the truth of a matter 10 is opened 10 1Radical sign is taken advantage of SC again 1, promptly 10 0.0* 4096, as the 0th project Tab of the 1st parameter list 1[0]; 1 power of the truth of a matter 10 is opened 10 1Radical sign is taken advantage of SC again 1, promptly 10 0.1* 4096, as the 1st project Tab of the 1st parameter list 1[1], the rest may be inferred by analogy.
Then calculate first number In.We can find a digital y to equal 2, make the y power of truth of a matter b (=10) be not more than pending several x (=135), and (y+1) power of truth of a matter b is greater than pending several x, and promptly 10 2≤ 135<10 (2+1), then first number In equals 2.
Then search parameter list to ask for the Ma of mantissa.
* set m=1
* m=1 then removes among the x (=135), and the part that In (=2) constitutes multiply by SC again 1(=4096) are to get Temp; Temp=135 * 4096/10 then 2=5529.6
* search Tab 1, find n=1 to make Tab 1[1]≤Temp<Tab 1[2], promptly 5157≤5529.6<6492
* exporting n (=1) is Ma[1], i.e. Ma[1]=1
* with m+1, i.e. m=2
* compare m (=2) and k (=3)
* m≤k, promptly 2≤3, then repeat to ask for Temp to the relatively action of m and k
* m=2 then removes among the x (=135) In (=2) and Ma[1] part that (=1) constitutes, multiply by SC again 2(=4096) are to get Temp; Temp=135 * 4096/10 then 2.1 4392
* search Tab 2, find n=3 to make Tab 2[3]≤Temp<Tab 2[4], promptly 4389≤4392<4491
* exporting n (=3) is Ma[2], i.e. Ma[2]=3
* with m+1, i.e. m=3
* compare m (=3) and k (=3)
* m≤k, promptly 3≤3, then repeat to ask for Temp to the relatively action of m and k
* m=3 then removes among the x (=135) In (=2), Ma[1] (=1) and Ma[2] part that (=3) constitute, multiply by SC again 3(=4096) are to get Temp; Temp=135 * 4096/10 then 2.13 4099
* search Tab 3, find n=0 to make Tab 3[0]≤Temp<Tab 3[1], promptly 4096≤4099<4105
* exporting n (=0) is Ma[3], i.e. Ma[3]=0
* with m+1, i.e. m=4
* compare m (=4) and k (=3)
* m>k, promptly 4>3, tenth skill then, the Ma=0.130 of mantissa
Then obtaining first number In at last is 2, and the Ma of mantissa is 0.130, and then logarithm L is 2.130, i.e. log 10X=log 10135 2.130.
Above-mentioned explanation is not the restriction to category of the present invention, and the arrangement of above-mentioned explanation and various change and isotropism is all in the category that the present patent application claim is intended to protect.

Claims (12)

1.一种用于一数字处理单元的对数转换方法,是将一待处理数x转换为以一底数b为底的一对数L,该对数L包含一首数In及一尾数Ma,该对数转换方法以定点格式表示所有数字,该对数转换方法包含下列步骤:1. A logarithm conversion method for a digital processing unit is to convert a number x to be processed into a logarithm L with a base b as the base, and the logarithm L includes an initial number In and a mantissa Ma , the logarithmic transformation method to represent all numbers in fixed-point format, the logarithmic transformation method consists of the following steps: 指定该尾数Ma要求的一精确位数k;Specify an exact number of digits k required by the mantissa Ma; 利用该底数b建立多个参数表,该多个参数表的个数等于该精确位数k,该多个参数表的第m个是供求取该尾数Ma在小数点以下的第m位的值;Utilize this base number b to set up a plurality of parameter lists, the number of this plurality of parameter lists is equal to this exact digit k, and the mth of these multiple parameter lists is the value of the mth place of the mantissa Ma below the decimal point for supply and demand; 计算该首数In;以及Compute the integer In; and 依序查找该多个参数表,以得该尾数Ma于小数点以下第1至k位的值。The plurality of parameter tables are searched in order to obtain the value of the mantissa Ma at the 1st to k digits below the decimal point. 2.如权利要求1所述的对数转换方法,其中,该计算步骤包含:2. logarithmic conversion method as claimed in claim 1, wherein, this computing step comprises: 寻找一数字y使该底数b的y次方不大于该待处理数x,且该底数b的(y+1)次方大于该待处理数x;以及Find a number y such that the yth power of the base b is not greater than the number x to be processed, and the (y+1) power of the base b is greater than the number x to be processed; and 输出该数字y为该首数In。Output the number y as the initial number In. 3.如权利要求1所述的对数转换方法,其中,每一该参数表具有10个项目,该建立步骤包含:3. The logarithmic transformation method as claimed in claim 1, wherein each of the parameter tables has 10 items, and the establishing step comprises: 为该多个参数表的第m个决定一系数SCm;以及determining a coefficient SC m for the mth of the plurality of parameter tables; and 将该底数b的n次方开10m次方根号,再乘以该系数SCm,作为该多个参数表的第m个的第n个项目,n=0,...,9;The nth power of the base number b is opened to the root of the 10 mth power, and then multiplied by the coefficient SC m as the nth item of the mth of the plurality of parameter tables, n=0,...,9; 其中,该系数SCm是供拉大该10个项目的间距。Wherein, the coefficient SC m is used to increase the distance between the 10 items. 4.如权利要求3所述的对数转换方法,其中,该系数SCm为2的幂级数。4. The logarithmic transformation method according to claim 3, wherein the coefficient SC m is a power series of 2. 5.如权利要求3所述的对数转换方法,其中,该查找步骤包含:5. logarithm conversion method as claimed in claim 3, wherein, this searching step comprises: 除去该待处理数x中,该首数In与该尾数Ma在小数点以下的第1至(m-1)位构成的部分,再乘以该系数SCm以得一暂时数Temp;remove the number x to be processed, the part formed by the first number In and the mantissa Ma from the 1st to (m-1) digits below the decimal point, and multiply by the coefficient SC m to obtain a temporary number Temp; 寻找该多个参数表的第m个的第n个项目Tabm[n],使Tabm[n]不大于该暂时数Temp,且Tabm[n+1]大于该暂时数Temp;以及Find the mth nth item Tab m [n] of the plurality of parameter tables, so that Tab m [n] is not greater than the temporary number Temp, and Tab m [n+1] is greater than the temporary number Temp; and 输出n为该尾数Ma在小数点以下的第m位。Output n is the mth digit of the mantissa Ma below the decimal point. 6.如权利要求3所述的对数转换方法,其中,该查找步骤包含:6. logarithmic conversion method as claimed in claim 3, wherein, this searching step comprises: (a)设定m等于1;(a) Set m equal to 1; (b)若m=1,除去该待处理数x中,该首数In构成的部分,再乘以该系数SCm以得一暂时数Temp;否则除去该待处理数x中,该首数In与该尾数Ma在小数点以下的第1至(m-1)位构成的部分,再乘以该系数SCm以得该暂时数Temp;(b) If m=1, remove the part formed by the initial number In in the number x to be processed, and then multiply the coefficient SC m to obtain a temporary number Temp; otherwise, remove the initial number In from the number x to be processed The part formed by In and the mantissa Ma in the first to (m-1) digits below the decimal point is multiplied by the coefficient SC m to obtain the temporary number Temp; (c)寻找该多个参数表的第m个的第n个项目Tabm[n],使Tabm[n]不大于该暂时数Temp,且Tabm[n+1]大于该暂时数Temp;(c) Find the nth item Tab m [n] of the mth of the multiple parameter tables, so that Tab m [n] is not greater than the temporary number Temp, and Tab m [n+1] is greater than the temporary number Temp ; (d)输出n为该尾数Ma在小数点以下的第m位;(d) Output n is the mth place of the mantissa Ma below the decimal point; (e)将m加1;(e) add 1 to m; (f)比较m与该精确位数k;以及(f) compare m with the exact number of bits k; and (g)若m不大于该精确位数k,重复该步骤(b)至(f)。(g) If m is not greater than the exact number of digits k, repeat steps (b) to (f). 7.一种对数转换装置,供将一待处理数x转换为以一底数b为底的一对数L,该对数L包含一首数In及一尾数Ma,该对数转换装置以定点格式表示所有数字,该对数转换装置包含:7. A logarithmic conversion device, for converting a number x to be processed into a logarithm L based on a base number b, the logarithm L includes a first number In and a mantissa Ma, and the logarithmic conversion device uses For all numbers represented in fixed-point format, the logarithmic transformation means include: 一指定装置,供指定该尾数Ma要求的一精确位数k;a specifying means for specifying an exact number k of digits required for the mantissa Ma; 一建立装置,供利用该底数b建立多个参数表,该多个参数表的个数等于该精确位数k,该多个参数表的第m个是供求取该尾数Ma在小数点以下的第m位;A building device, for using the base number b to create multiple parameter tables, the number of the multiple parameter tables is equal to the precise number of digits k, the mth of the multiple parameter tables is to obtain the number of the mantissa Ma below the decimal point m bit; 一计算装置,供计算该首数In;以及a computing device for computing the initial number In; and 一查找装置,供依序查找该多个参数表,以得该尾数Ma在小数点以下的第1至k位。A searching device for sequentially searching the plurality of parameter tables to obtain the first to k digits of the mantissa Ma below the decimal point. 8.如权利要求7所述的对数转换装置,其中,该计算装置包含:8. The logarithmic conversion device as claimed in claim 7, wherein the computing device comprises: 一第一寻找单元,供寻找一数字y使该底数b的y次方不大于该待处理数x,且该底数b的(y+1)次方大于该待处理数x;以及A first search unit, for finding a number y so that the yth power of the base b is not greater than the number x to be processed, and the (y+1) power of the base b is greater than the number x to be processed; and 一第一输出单元,供输出该数字y为该首数In。A first output unit for outputting the number y as the initial number In. 9.如权利要求7所述的对数转换装置,其中,每一该参数表具有10个项目,该建立装置包含:9. The logarithmic conversion device as claimed in claim 7, wherein each of the parameter tables has 10 items, and the establishing means comprises: 一决定单元,供为该多个参数表的第m个决定一系数SCm;以及a determination unit for determining a coefficient SC m for the mth of the plurality of parameter tables; and 一第一运算单元,供将该底数b的n次方开10m次方根号,再乘以该系数SCm,作为该多个参数表的第m个的第n个项目,n=0,...,9;A first computing unit, for taking the root of the nth power of the base number b to the root of 10m and multiplying it by the coefficient SC m as the nth item of the mth of the plurality of parameter tables, n=0 ,...,9; 其中,该系数SCm是供拉大该10个项目的间距。Wherein, the coefficient SC m is used to increase the distance between the 10 items. 10.如权利要求9所述是对数转换装置,其中,该系数SCm为2的幂级数。10. The logarithmic conversion device as claimed in claim 9, wherein the coefficient SC m is a power series of 2. 11.如权利要求9所述的对数转换装置,其中,该查找装置包含:11. The logarithmic conversion device as claimed in claim 9, wherein the search device comprises: 一第二运算单元,供除去该待处理数x中,该首数In与该尾数Ma在小数点以下的第1至(m-1)位构成的部分,再乘以该系数SCm以得一暂时数Temp;A second computing unit, for removing the number x to be processed, the first number In and the mantissa Ma in the first to (m-1) digits below the decimal point, and then multiply the coefficient SC m to obtain a Temporary number Temp; 一第二寻找单元,供寻找该多个参数表的第m个的第n个项目Tabm[n],使Tabm[n]不大于该暂时数Temp,且Tabm[n+1]大于该暂时数Temp;以及A second search unit, for searching for the nth item Tab m [n] of the mth of the plurality of parameter tables, so that Tab m [n] is not greater than the temporary number Temp, and Tab m [n+1] is greater than the temporary number Temp; and 一第二输出单元,供输出n为该尾数Ma在小数点以下的第m位。A second output unit for outputting n being the mth digit of the mantissa Ma below the decimal point. 12.如权利要求9所述的对数转换装置,其中,该查找装置包含:12. The logarithmic conversion device as claimed in claim 9, wherein the search device comprises: 一设定单元,供设定m等于1;A setting unit for setting m equal to 1; 一第二运算单元,若m=1,该第二运算单元供除去该待处理数x中,该首数In构成的部分,再乘以该系数SCm以得一暂时数Temp;否则该第二运算单元供除去该待处理数x中,该首数In与该尾数Ma在小数点以下的第1至(m-1)位构成的部分,再乘以该系数SCm以得该暂时数Temp;A second operation unit, if m=1, the second operation unit is used to remove the part formed by the initial number In in the number x to be processed, and then multiplied by the coefficient SC m to obtain a temporary number Temp; otherwise, the first operation unit The second operation unit is used to remove the first number In and the mantissa Ma in the first to (m-1) digits below the decimal point in the number x to be processed, and then multiply the coefficient SC m to obtain the temporary number Temp ; 一第二寻找单元,供寻找该多个参数表的第m个的第n个项目Tabm[n],使Tabm[n]不大于该暂时数Temp,且Tabm[n+1]大于该暂时数Temp;A second search unit, for searching for the nth item Tab m [n] of the mth of the plurality of parameter tables, so that Tab m [n] is not greater than the temporary number Temp, and Tab m [n+1] is greater than The temporary number Temp; 一第二输出单元,供输出n为该尾数Ma在小数点以下的第m位;A second output unit for outputting n as the mth digit of the mantissa Ma below the decimal point; 一加法单元,供将m加1;An addition unit for adding 1 to m; 一比较单元,供比较m与该精确位数k;以及a comparing unit for comparing m with the exact number k; and 一逻辑单元,若m不大于该精确位数k,该逻辑单元供指示该第二运算单元、该第二寻找单元、该第二输出单元、该加法单元及该比较单元依序重复执行所对应的动作。A logic unit, if m is not greater than the exact number of bits k, the logic unit is used to instruct the second operation unit, the second search unit, the second output unit, the addition unit and the comparison unit to perform sequentially and repeatedly the corresponding Actions.
CNB2004100333383A 2004-04-02 2004-04-02 Logarithmic Transformation Method and Device Expired - Fee Related CN100340940C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100333383A CN100340940C (en) 2004-04-02 2004-04-02 Logarithmic Transformation Method and Device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100333383A CN100340940C (en) 2004-04-02 2004-04-02 Logarithmic Transformation Method and Device

Publications (2)

Publication Number Publication Date
CN1677308A true CN1677308A (en) 2005-10-05
CN100340940C CN100340940C (en) 2007-10-03

Family

ID=35049851

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100333383A Expired - Fee Related CN100340940C (en) 2004-04-02 2004-04-02 Logarithmic Transformation Method and Device

Country Status (1)

Country Link
CN (1) CN100340940C (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436365A (en) * 2010-12-20 2012-05-02 中国电子科技集团公司第四十一研究所 Method and device for converting high-speed linear spectrum data into logarithmic data
CN103455302A (en) * 2012-05-31 2013-12-18 上海华虹集成电路有限责任公司 Circuit for realizing logarithm operation by using hardware

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4626825A (en) * 1985-07-02 1986-12-02 Vlsi Technology, Inc. Logarithmic conversion apparatus
SE470542B (en) * 1992-12-07 1994-07-25 Foersvarets Forskningsanstalt Device for converting a binary floating point into a 2 logarithm in binary form or vice versa
US5604691A (en) * 1995-01-31 1997-02-18 Motorola, Inc. Logarithm/inverse-logarithm converter utilizing a truncated Taylor series and method of use thereof
US5703801A (en) * 1995-01-31 1997-12-30 Motorola, Inc. Logarithm/inverse-logarithm converter utilizing second-order term and method of using same
JP3110288B2 (en) * 1995-07-21 2000-11-20 日本電気株式会社 Exponential logarithmic conversion circuit
US6182100B1 (en) * 1998-06-30 2001-01-30 International Business Machines Corporation Method and system for performing a logarithmic estimation within a data processing system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436365A (en) * 2010-12-20 2012-05-02 中国电子科技集团公司第四十一研究所 Method and device for converting high-speed linear spectrum data into logarithmic data
CN102436365B (en) * 2010-12-20 2014-04-09 中国电子科技集团公司第四十一研究所 Method and device for transforming high-speed linear spectrum data to logarithm data
CN103455302A (en) * 2012-05-31 2013-12-18 上海华虹集成电路有限责任公司 Circuit for realizing logarithm operation by using hardware

Also Published As

Publication number Publication date
CN100340940C (en) 2007-10-03

Similar Documents

Publication Publication Date Title
TWI783295B (en) Multiplier and multiplication method
CN1503938A (en) Multiplication logic circuit
CN1215862A (en) Computing method and computing device
CN1431594A (en) Method for parallel computing code of CRC in multiple channels and multiple bits
CN112434801B (en) A Convolution Operation Acceleration Method for Weight Splitting According to Bit Accuracy
CN1949184A (en) Method and system of chip checking
CN109144473A (en) A kind of decimal system 3:2 compressor configuration based on redundancy ODDS number
CN1677308A (en) Logarithmic Transformation Method and Device
Yan et al. A novel scheme for real-time max/min-set-selection sorters on FPGA
US6298368B1 (en) Method and apparatus for efficient calculation of an approximate square of a fixed-precision number
CN102253822A (en) A Modular (2n-3) Multiplier
CN1265281C (en) Logarithm operation method and device for floating point numbers
CN1261860C (en) Exponential calculation method and device for floating point numbers
CN113378109A (en) Mixed base fast Fourier transform calculation circuit based on memory calculation
Mohan et al. Evaluation of Mixed-Radix Digit Computation Techniques for the Three Moduli RNS {2 n− 1, 2 n, 2 n+ 1− 1}
CN1164988C (en) 32-bit adder circuit structure
CN1862520A (en) Data processing device and set-up method thereof
CN1290002C (en) High speed adder
CN1122024A (en) Multiplying operation method for optional word length and accuracy and multiplier thereby
CN1567175A (en) Method for simplifying concurrent continuous adding operation of binary number and circuit of continuous adder
CN1641564A (en) Method for operating general multi-level-system coding adder
CN1545652A (en) multiplier circuit
CN1133948C (en) Bindary data counter, area information extractor and Huffman converter
CN1629798A (en) two's complement circuit
CN1096035C (en) Systems, methods and program products for representing binary word as two binary words having fewer binary ones

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C19 Lapse of patent right due to non-payment of the annual fee
CF01 Termination of patent right due to non-payment of annual fee