CN107977193A - A kind of high-resolution method under the framework based on B/S - Google Patents

A kind of high-resolution method under the framework based on B/S Download PDF

Info

Publication number
CN107977193A
CN107977193A CN201711318462.8A CN201711318462A CN107977193A CN 107977193 A CN107977193 A CN 107977193A CN 201711318462 A CN201711318462 A CN 201711318462A CN 107977193 A CN107977193 A CN 107977193A
Authority
CN
China
Prior art keywords
max
result
array
length
converted
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.)
Pending
Application number
CN201711318462.8A
Other languages
Chinese (zh)
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.)
Jinling Institute of Technology
Original Assignee
Jinling Institute of Technology
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 Jinling Institute of Technology filed Critical Jinling Institute of Technology
Priority to CN201711318462.8A priority Critical patent/CN107977193A/en
Publication of CN107977193A publication Critical patent/CN107977193A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/57Arithmetic logic units [ALU], i.e. arrangements or devices for performing two or more of the operations covered by groups G06F7/483 – G06F7/556 or for performing logical operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses the high precision computation under a kind of framework based on B/S, it is related to field of computer technology;The high precision computation refers to the number for participating in computing, and scope is far beyond standard data type, long, full mold etc., the computing for the scope that can be represented.Present invention design is including adding, subtracting, the algorithm of multiplication and division computing.And the advantages of accessing internet, make use of B/S frameworks the computer (server) for running the height computational algorithm, user only need to open a network address, input data to be calculated, you can obtain corresponding result of calculation.The present invention can realize the advantages that addition subtraction multiplication and division of thousands digit evidence calculates, and arithmetic speed is fast, operational precision is high.

Description

A kind of high-resolution method under the framework based on B/S
Technical field
The present invention relates to the high precision computation side under a kind of high-resolution method, more particularly to a kind of framework based on B/S Method.
Background technology:
In general scientific algorithm, hundreds of or more can be often calculated after decimal point, is also likely to be thousands of certainly Hundred millionth, hundreds of hundred million big numeral.Since Computing is that have modular arithmetic, the expression of data area has certain limitations, such as integer (int) it is (- 2 to express scope31~231- 1), signless integer (unsigned long) is (0~232- 1) tens, be may each be about Hundred million.If using Real-valued, then can preserve the double types of maximum at most can only also provide effective digital within 20, i.e., The number of energy accurate expression millions of hundred million.For very huge numeral, we term it the high-precision number of degrees, it can not be in a computer Normal storage.When calculating number of the digit more than more than ten, existing type cannot be used to carry out common calculating, need separately to seek out Road.Multiprecision arithmetic is exactly to be added with a kind of simulation of the computer for super large data, subtracts, multiplies, removes, power, factorial, the fortune such as evolution Calculate.It represents the high-precision number of degrees using character string or character array, is handling the calculating between the high-precision number of degrees and the high-precision number of degrees When, array is split and is calculated, calculating is finished and then is combined, and result is exported with character string forms.For a character string For, the high-precision number of degrees are converted into character string and are calculated, add up again up to more than one hundred million by character that it is stored, so Realize and be no less than 101000000The calculating of the order of magnitude.Used in order to facilitate user, this experiment is new real by the way of B/S frameworks It is existing, B/S structures, that is, browser and server structure.It is with the rise of Internet technologies, and one kind of C/S structures is changed Or improved structure.Under this configuration, user job interface is realized by WWW browser, and few partial transaction is patrolled Collect and realized at front end (Browser), but major affairs logic is realized in server end (Server), forms so-called three layers of 3- Tier structures.B/S structures are a kind of network structure patterns after WEB rises, and web browser is that the most important application of client is soft Part.This pattern has unified client, and the core that systemic-function is realized is focused on server, simplifies opening for system Hair, safeguard and use.As long as installing a browser (Browser) in client computer, such as Netscape Navigator or Internet Explorer, server installation high precision computation software.Most logic is all performed in server end, is browsed Device carries out data interaction by Web Server with server-side.Client computer load is thus enormously simplify, alleviates and is System safeguards the cost and workload with upgrading, reduces the overall cost (TCO) of user, possess it is easy to operate, it is easy to use etc. Advantage.
The content of the invention
In view of the above-mentioned problems, the technical problem to be solved in the present invention is the input, storage, computational methods of data, (carry, borrow Position), the output of data;The present invention is using based under B/S frameworks, i.e., computer is accessed internet by client, by clear Device of looking at inputs high accuracy data to be calculated, and high accuracy data is transmitted to server-side by computer by http protocol.Server-side After calculating finishes, result of calculation is back to client by http protocol.
The present invention uses character string forms input data, and is translated into integer storage of array data, whole with one Type variable records the physical length of data.During character string input data, a high position for data is stored in the low level of character string, conversion During into integer, the low level " reduction " of the high-precision number of degrees is arrived a high position for array, so easy to follow-up computing.Specific Jie of the invention Continued add, subtract, four kinds of algorithms of multiplication and division.And the computer (server) for running the height computational algorithm is accessed into internet, The advantages of make use of B/S frameworks, user only need to open a network address, input data to be calculated, you can obtain corresponding meter Calculate result.The present invention can realize the advantages that addition subtraction multiplication and division of thousands digit evidence calculates, and arithmetic speed is fast, operational precision is high.(1) Its specific technical solution is that 1. for high accuracy plus computing:For adding computing, its algorithm idea class be translated into it is vertical Add operation, before add operation is carried out, compares the length of a [] and b [], on the basis of longest array length, length is short An array high position with 0 polishing, i.e., since a position, directly a [i] is added with b [i], is as a result stored in c [i], c [i]=a [i] + b [i], i=0,1,2 ..., it is necessary to handle carry after computing finishes, for c [] array, since low level, handle by turn, One's own department or unit mould 10, to a high carry, i.e. c [i+1] +=c [i]/10, c [i]=c [i] %10, i=0,1 ... has handled carry Afterwards, by array c [] from a high position to low level order, it is translated into character string (result) output.2. subtract fortune for high accuracy Calculate:Compare the size of minuend and subtrahend first, so that definitive result is positive number or negative., will be by if result is negative Subtrahend and subtrahend data interchange, then subtraction is performed, negative sign is added before result when finally exporting result.Its calculating process Similar to add operation, the difference is that add operation is needed to high-order " carry ", subtraction needs its to high-order " borrowing " to subtract Method calculating process is as follows.3. high-precision multiplication, multiplication calculating is different from above-mentioned signed magnitude arithmetic(al), belongs to double and follows Ring, computing key is c [i+j]=c [i+j]+a [i] * b [j], after computing, to c [] carry out carry operation c [i+1]= C [i+1]+c [i]/10, c [i]=c [i] %10;Finally obtain result.4. high-precision division arithmetic:Due to divisor and dividend It is the high-precision number of degrees to be likely to, and conventional division calculation can not be performed by computer, is grasped here by above-mentioned subtraction Realize.Its basic thought is to do subtraction repeatedly, and divisor is subtracted with dividend, untill when remainder is less than divisor, is subtracted The final number of method is business.It is larger for dividend, when divisor is smaller, it is clear that calculation times are especially more, and computational efficiency is low, For this when doing subtraction, the n powers that subtrahend (i.e. divisor) is amplified to 10 carry out subtraction again, reduce computing time Number, improves computational efficiency.
Figure of description
Fig. 1 is based on system structure diagram under B/S frameworks;
The vertical add operation schematic diagrames of Fig. 2.
Embodiment
It is specific below by what is shown in attached drawing to make the object, technical solutions and advantages of the present invention of greater clarity Embodiment describes the present invention.However, it should be understood that these descriptions are merely illustrative, and it is not intended to limit the model of the present invention Enclose.In addition, in the following description, the description to known features and technology is eliminated, to avoid unnecessarily obscuring the present invention's Concept.
System construction drawing is as shown in Figure 1, of the invention using based under B/S frameworks, i.e., client accesses computer Internet, high accuracy data to be calculated is inputted by browser, and high accuracy data is transmitted to by computer by http protocol Server-side.After server-side calculating finishes, result of calculation is back to client by http protocol.
In server end, deployment IIS services .NET services, tomcat services etc., with specific reference to algorithm developing instrument and It is fixed.If developing instrument is ASP.NET, server-side then disposes IIS services and .NET services;If developing instrument is JSP, then portion is needed Affix one's name to tomcat services.Use ASP.NET tool design softwares in the present invention, when deployment needs to dispose IIS services and .NET clothes Business, then disposes high precision computation software (website).
After deployment, client answers domain address by browser, the input phase, into high precision computation interface, input The high-precision number of degrees, selection calculate type, and server-side is calculated after obtaining data, and returns the result to client.
The technical problem to be solved in the present invention includes:The inputs of data, storage, computational methods (including:Carry, borrow), The output of data;Computational methods therein are that emphasis of the present invention will be discussed.
First, high precision computation is carried out on computer (server), should just there are accurate data to input, computer High accuracy data is received and stored using character, before high accuracy data is received, pre- first to file character buffer is used for High accuracy data to be calculated input by user is stored, since each in character string is a character, it is impossible to directly participate in Carry out computing, it is necessary to first convert it to numerical value and carry out computing again;It is very inconvenient during computing, use character for this present invention String form input data, and it is translated into integer storage of array data.During storage, by the order of character string from left to right one The taking-up of one, changes into integer (0~9) deposit array, the order of integer array from low to high be successively position, ten, hundred Position ..., and so on.In the present invention, integer array a [] and b [] is respectively adopted and is used to store data character string input by user, Operation result is stored with array c [].
Computing be divided into add, subtract, multiplication and division arithmetic rule:
(1) for adding computing, its algorithm idea class is to be translated into vertical add operation, is illustrated in fig. 2 shown below.
Before add operation is carried out, the length of a [] and b [] will be compared, on the basis of longest array length, length A [i] that is, since a position, is directly added, is as a result stored in c [i], c [i]=a with 0 polishing by a short array high position with b [i] [i]+b [i], i=0,1,2 ..., it is necessary to handle carry after computing finishes, for c [] array, since low level, locate by turn Reason, one's own department or unit mould 10, to a high carry, i.e. c [i+1] +=c [i]/10, c [i]=c [i] %10, i=0,1 ... handled into After position, by array c [] from a high position to low level order, character string (result) output is translated into, the step of its add operation It is as follows:
(1) parameter is read:Reading two addend character strings respectively, (it is S to make it respectivelya, Sb), obtain Sa、SbLength, makes its length Respectively la, lb
(2) array is initialized:Compare la, lbSize, is that a [] and b [] applies for spatial cache, space size is max (la,lb) (max(la,lb) represent la, lbIn larger number), apply for spatial cache for c [], size is max (la,lb)+1, and make a [], b [], c [] initial value are 0;
(3) assignment:By SaIt is converted into array a [], transformation rule a [i]=F (Sa[la- 1-i]), i=0,1 ... max (la,lb)- 1, wherein F () is that the numeral in bracket is converted into integer, Sa[i] represents SaI-th (from left to right order, counted since 0 Number) character;Same method is by SbIt is converted into array b [].Such as SaFor " 12345 ", after being converted into array, the data of a [] are a [0]=5, a [1]=4, a [2]=3, a [3]=2, a [4]=1;
(4) computing:Operation rule is c [i]=a [i]+b [i], i=0,1 ... max (la,lb)-1;
(5) carry:Carry rules are c [i+1] +=c [i]/10;C [i]=c [i] %10;Wherein i=0,1 ... max (la,lb);
(6) result is exported:According to i=max (la,lb) -1 ... 2,1,0 order, since c [i] first is for 0 numeral, By c [i] composition result character string outputs.
(2) high accuracy subtracts computing, compares the size of minuend and subtrahend first, so that definitive result is positive number or is born Number.If result is negative, by minuend and subtrahend data interchange, then subtraction is performed, in result when finally exporting result Above add negative sign.Its calculating process is similar to add operation, the difference is that add operation is needed to high-order " carry ", subtraction fortune It is as follows to high-order " borrowing " its subtraction process to calculate needs.
(1) parameter is read:(it is S to make it respectively for reading minuend and subtrahend character string respectivelya, Sb), obtain Sa、SbLength, makes it Length is respectively la, lb
(2) array is initialized:Compare la, lbSize, is that a [] and b [] applies for spatial cache, space size is max (la,lb) (max(la,lb) represent la, lbIn larger number), apply for spatial cache for c [], size is max (la,lb), and make a [], b [], c [] initial value are 0;
(3) assignment:By SaIt is converted into array a [], transformation rule a [i]=F (Sa[la- 1-i]), i=0,1 ... max (la,lb), Wherein F () is that the numeral in bracket is converted into integer, Sa[i] represents SaI-th (from left to right order, counted since 0 Number) character;Same method will be by SbIt is converted into array b [].Such as SaFor " 12345 ", after being converted into array, the data of a [] are a [0]=5, a [1]=4, a [2]=3, a [3]=2, a [4]=1;
(4) judging result (poor) is positive and negative:According to i=max (la,lb) -1 ... 2,1,0 order, when a [i]-b [i] first not For 0 when, if a [i]-b [i] be more than 0, (poor) result is positive number;If less than 0, for negative.
(5) computing:According in step 4, if it is positive number that result is (poor), operation rule is c [i]=a [i]-b [i], i=0,1 ... max(la,lb);If (poor) result is negative, operation rule is c [i]=b [i]-a [i], i=0,1 ... max (la,lb)
(6) borrow:It is c if [i] < 0, c [i]=c [i]+10, c [i+1]=c [i+1] -1, wherein i=0,1 ... to borrow rule max(la,lb)-2;
(7) result is exported:According to i=max (la,lb) -1 ... 2,1,0 order, since c [i] first is for 0 numeral, By c [i] composition result character string outputs.
(3) high-precision multiplication, multiplication calculating is different from above-mentioned signed magnitude arithmetic(al), belongs to two and recirculates, and computing is crucial It is c [i+j]=c [i+j]+a [i] * b [j], after computing, carry operation is carried out to c [];Its calculating process and step are such as Shown in lower.
(2) parameter is read:Reading two multiplier character strings respectively, (it is S to make it respectivelya, Sb), obtain Sa、SbLength, makes its length Respectively la, lb
(3) array is initialized:Apply for spatial cache for a [], b [], c [], a [] space size is la, b [] space size is lb, c [] application spatial caches, size la+lb+ 1, and it is 0 to make a [], b [], c [] initial value;
(4) assignment:By SaIt is converted into array a [], transformation rule a [i]=F (Sa[la- 1-i]), i=0,1 ... max (la,lb)- 1, wherein F () is that the numeral in bracket is converted into integer, Sa[i] represents SaI-th (from left to right order, counted since 0 Number) character;Same method is by SbIt is converted into array b [].Such as SaFor " 12345 ", after being converted into array, the data of a [] are a [0]=5, a [1]=4, a [2]=3, a [3]=2, a [4]=1;
(5) computing:Double loop computation is carried out, even i=0,1 ... (la- 1), j=0,1 ... (lb- 1) for sequentially according to formula c [i+j]=c [i+j]+a [i] * b [j] are calculated;
(6) carry:Carry rules are similar with add operation, and formula is c [i+1]=c [i+1]+c [i]/10, c [i]=c [i] % 10;Wherein i=0,1 ... (la+lb);
(7) result is exported:According to i=(la+lb) -1 ... 2,1,0 order, since c [i] first is for 0 numeral, by c The character string output of [i] composition result.
(4) high-precision division arithmetic, it is the high-precision number of degrees to be likely to due to divisor and dividend, conventional division calculation It can not be performed by computer, operate realize by above-mentioned subtraction here.Its basic thought is to do subtraction repeatedly, Divisor is subtracted with dividend, untill when remainder is less than divisor, the final number of subtraction is business.It is larger for dividend, When divisor is smaller, it is clear that calculation times are especially more, and computational efficiency is low, for this when doing subtraction, by subtrahend (i.e. divisor) The n powers for being amplified 10 carry out subtraction again, reduce operation times, improve computational efficiency.Its calculating process and step are such as Shown in lower:
(1) initiation parameter:Dividend is read respectively, (it is S to make it respectively to two character strings of divisora, Sb), obtain Sa、SbIt is long Degree, it is respectively l to make its lengtha, lb, l is defaulted as herea≥lb, and SbIt is not 0;
(2) array is initialized:Apply for spatial cache for a [], b [], c [], size is la+lb+ 1, and make a [], b [], c [] initial value is 0;
(3) by SaArray a [] is converted into, transformation rule is
A [i]=F (Sa[la- 1-i]), i=0,1 ... max (la,lb)-1;
By SbArray b [] is converted into, transformation rule is
B [i]=F (Sb[lb- 1-i]), i=0,1 ... max (la,lb)-1
Wherein F () is conversion function;
(4) divisor expands, and makes nT=la-lb, as i < nT, b [i]=0, otherwise b [i]=b [i-nT];So divisor is expanded Greatly so that dividend is identical with divisor digit;
(5) calculation formula:It is marker bit to make j, when initial, j=0;Work as j<During=nT, calculate:A [i]=a [i]-b [i] is if a Then a [i]=a [i]+10, a [the i+1]=a [i+1] -1, wherein i=1,2 ... (l of [i] < 0a-1);When result of calculation is more than 0, Update the length l of a []aAnd the corresponding positions of business are added 1, i.e. c [nT-j]=c [nT-j]+1;Until result of calculation is not more than 0;
(6) j=j+1, performs step 5;
(7) result is exported:C [] is converted into character string output.
In high-precision division arithmetic step 3, calculatingWhen be related to character string be converted into it is whole Type array, high-precision multiplication, the precision subtraction, concrete operation process refer to " high-precision multiplication " herein and " high Precision subtraction " step.
The foregoing describe basic principle, major architectural structure and the advantages of the present invention of the present invention.The technology people of the industry Member is it should be appreciated that the present invention is not limited to the above embodiments, and the above embodiments and description only describe this hair Bright principle, without departing from the spirit and scope of the present invention, the present invention also have optimization on algorithm, these changes and Improvement all fall within the protetion scope of the claimed invention.The claimed scope of the invention is by appended claims and its equivalent Thing defines.

Claims (6)

  1. A kind of 1. high-resolution method under framework based on B/S, it is characterised in that:
    The computer of client is accessed into internet, high precision computation logic unit is all carried out in server-side, in client computer only One browser is installed, high precision computation can be directly carried out under Internet environment;Inputted by browser to be calculated High accuracy data, high accuracy data is transmitted to server-side by computer by http protocol;, will after server-side calculating finishes Result of calculation is back to client by http protocol.
  2. 2. the high-resolution method under a kind of framework based on B/S according to claim 1, it is characterised in that:Can be defeated Enter the number of two number myriabit length, after server-side obtains the data of user terminal input, the two numbers can be added and subtracted respectively Multiplication and division computing.
  3. 3. the high-resolution method under a kind of framework based on B/S according to claim 2, it is characterised in that:Described Add, subtract, four kinds of computings of multiplication and division, specific algorithm step is as follows:
    1) for add operation the step of is as follows:
    A) parameter is read:It is S to read two addend character strings respectively and make it respectivelya、Sb, obtain Sa、SbLength, makes its length distinguish For la, lb
    B) array is initialized:Compare la, lbSize, is that a [] and b [] applies for spatial cache, space size is max (la,lb);max (la,lb) it is mathematical function, represent la, lbIn larger number;Apply for spatial cache for c [], size is max (la,lb)+1, and It is 0 to make a [], b [], c [] initial value;
    C) assignment:By SaIt is converted into array a [], transformation rule
    A [i]=F (Sa[la- 1-i]), i=0,1 ... max (la,lb) -1, wherein F () are conversion functions;
    D) computing:Operation rule is c [i]=a [i]+b [i], i=0,1 ... max (la,lb)-1;
    E) carry:Carry rules are c [i+1] +=c [i]/10;C [i]=c [i] %10;Wherein i=0,1 ... max (la,lb);
    F) result is exported:According to i=max (la,lb) -1 ... 2,1,0 order, will since c [i] first is for 0 numeral C [i] composition result character string outputs;
    2) for subtraction the step of is as follows:
    A) parameter is read:It is S that reading minuend and subtrahend character string make it respectively respectivelya, Sb, obtain Sa、SbLength, makes its length Respectively la, lb
    B) array is initialized:Compare la, lbSize, is that a [] and b [] applies for spatial cache, space size is max (la,lb)(max (la,lb) represent la, lbIn larger number), apply for spatial cache for c [], size is max (la,lb), and make a [], b [], c [] initial value is 0;
    C) assignment:By SaIt is converted into array a [], transformation rule
    A [i]=F (Sa[la- 1-i]), i=0,1 ... max (la,lb), wherein F () is conversion function;
    D) judging result (poor) is positive and negative:According to i=max (la,lb) -1 ... 2,1,0 order, when a [i]-b [i] is not 0 first When, if a [i]-b [i] is more than 0, (poor) result is positive number;If less than 0, for negative.
    E) computing:According in step d, if it is positive number that result is (poor), operation rule is
    C [i]=a [i]-b [i], i=0,1 ... max (la,lb);If (poor) result is negative, operation rule is
    C [i]=b [i]-a [i], i=0,1 ... max (la,lb)
    F) borrow:It is c if [i] < 0, c [i]=c [i]+10, c [i+1]=c [i+1] -1, wherein i=0,1 ... to borrow rule max(la,lb)-2;
    G) result is exported:According to i=max (la,lb) -1 ... 2,1,0 order, will since c [i] first is for 0 numeral C [i] composition result character string outputs;
    3) for multiplying the step of is as follows:
    A) parameter is read:Reading two multiplier character strings respectively, (it is S to make it respectivelya, Sb), obtain Sa、SbLength, makes its length point Wei not la, lb
    B) array is initialized:Apply for spatial cache for a [], b [], c [], a [] space size is la, b [] space size is lb, c [] applies for spatial cache, size la+lb+ 1, and it is 0 to make a [], b [], c [] initial value;
    C) assignment:By SaIt is converted into array a [], transformation rule
    A [i]=F (Sa[la- 1-i]), i=0,1 ... max (la,lb)-1;
    By SbArray b [] is converted into, transformation rule is
    B [i]=F (Sb[lb- 1-i]), i=0,1 ... max (la,lb)-1;
    Wherein F () is conversion function;
    D) computing:Double loop computation is carried out, even i=0,1 ... (la- 1), j=0,1 ... (lb- 1) for sequentially according to formula c [i + j]=c [i+j]+a [i] * b [j] calculating;
    E) carry:Carry rules are similar with add operation, and formula is c [i+1]=c [i+1]+c [i]/10, c [i]=c [i] % 10;Wherein i=0,1 ... (la+lb);
    F) result is exported:According to i=(la+lb) -1 ... 2,1,0 order, since c [i] first is for 0 numeral, by c The character string output of [i] composition result;
    4) it is as follows for the calculation step of division:
    A) initiation parameter:Two dividend, divisor character strings are read respectively:It is S to make it respectivelya, Sb;Obtain Sa、SbLength, order Its length is respectively la, lb, l is defaulted as herea≥lb, and SbIt is not 0;
    B) array is initialized:Apply for spatial cache for a [], b [], c [], size is la+lb+ 1, and make a [], b [], c [] Initial value is 0;
    C) by SaArray a [] is converted into, transformation rule is
    A [i]=F (Sa[la- 1-i]), i=0,1 ... max (la,lb)-1;
    By SbArray b [] is converted into, transformation rule is
    B [i]=F (Sb[lb- 1-i]), i=0,1 ... max (la,lb)-1;
    Wherein F () is conversion function;
    D) divisor expands, and makes nT=la-lb, as i < nT, b [i]=0, otherwise b [i]=b [i-nT];So divisor is expanded, So that dividend is identical with divisor digit;
    E) calculation formula:It is marker bit to make j, when initial, j=0;Work as j<During=nT, calculate:A [i]=a [i]-b [i] is if a Then a [i]=a [i]+10, a [the i+1]=a [i+1] -1, wherein i=1,2 ... (l of [i] < 0a-1);When result of calculation is more than 0, Update the length l of a []aAnd the corresponding positions of business are added 1, i.e. c [nT-j]=c [nT-j]+1;Until result of calculation is not more than 0;
    F) j=j+1, performs step e;
    G) result is exported:C [] is converted into character string output.
  4. 4. the high-resolution method under a kind of framework based on B/S according to claim 3, it is characterised in that:F () function Function be that the digit strings in bracket are converted into integer, and be stored in array;Specifically, Sa[i] represents SaCharacter From left to right sequentially i-th of character of string, i.e., start counting up from 0;Utilize transformation rule a [i]=F (Sa[la- 1-i]), i=0, 1…max(la,lb) -1, you can the data in character string are sequentially stored into array by realization.
  5. 5. the high-resolution method under a kind of framework based on B/S according to claim 1, it is characterised in that:High accuracy The leitungskern of calculating is concentrated in server-side, and client only needs data to be calculated can be uploaded to clothes by browser Business end, end to be serviced calculates to finish returns to result of calculation afterwards, alleviates system maintenance and upgrade cost, while also simplify visitor Family end computer load, reduces overall cost.
  6. A kind of 6. high-resolution method under framework based on B/S according to claim 1, it is characterised in that:Including high-precision Degree calculates the input of data, the way of output has paste, imports file, export, online acquisition modes.
CN201711318462.8A 2017-12-12 2017-12-12 A kind of high-resolution method under the framework based on B/S Pending CN107977193A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711318462.8A CN107977193A (en) 2017-12-12 2017-12-12 A kind of high-resolution method under the framework based on B/S

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711318462.8A CN107977193A (en) 2017-12-12 2017-12-12 A kind of high-resolution method under the framework based on B/S

Publications (1)

Publication Number Publication Date
CN107977193A true CN107977193A (en) 2018-05-01

Family

ID=62010102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711318462.8A Pending CN107977193A (en) 2017-12-12 2017-12-12 A kind of high-resolution method under the framework based on B/S

Country Status (1)

Country Link
CN (1) CN107977193A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106452723A (en) * 2016-12-13 2017-02-22 深圳市全同态科技有限公司 Fully homomorphic encryption processing method based on modular operation

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106452723A (en) * 2016-12-13 2017-02-22 深圳市全同态科技有限公司 Fully homomorphic encryption processing method based on modular operation

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
LFYZOI题解: "《高精度运算》", 《HTTPS://WWW.CNBLOGS.COM/LFYZOI/P/6737761.HTML》 *
廖旭涛: "《可扩展计算能力的在线专业计算平台设计》", 《计算机光盘软件与应用》 *
杨晓冬等: "《基于Web的人工神经网络电火花加工工艺预测》", 《哈尔滨工业大学学报》 *

Similar Documents

Publication Publication Date Title
Chen et al. A bi-layered parallel training architecture for large-scale convolutional neural networks
WO2017124645A1 (en) Apparatus for processing floating point number
CN103324724B (en) Method and device for processing data
CN108052688A (en) Calculation amount data processing method, device, storage medium and computer equipment
CN101196927A (en) Data mapping method and device thereof
CN107358238A (en) A kind of method and system for extracting image feature information
Ma et al. Interval-valued reduced-order statistical interconnect modeling
CN107977193A (en) A kind of high-resolution method under the framework based on B/S
Rashid et al. An efficient method for solving fractional Black-Scholes model with index and exponential decay kernels
Wu et al. Exploiting parallelism by data dependency elimination: A case study of circuit simulation algorithms
CN108133005A (en) A kind of environmental model analogy method, terminal device and storage medium based on memory database
Wang et al. Accelerating on-line training of LS-SVM with run-time reconfiguration
Dworzanski et al. Structural place invariants for analyzing the behavioral properties of nested petri nets
Dounas et al. A Crypto-Twin Framework for the AEC Industry-Enabling Digital Twins With Blockchain Technologies
Mian et al. The study of multimedia data model technology based on cloud computing
Chen et al. Construction of feedforward neural networks with simple architectures and approximation abilities
Yang et al. Probabilistic modeling of renewable energy source based on Spark platform with large‐scale sample data
CN109791479A (en) Decimal multiplication and shift instruction
Lee et al. Design and implementation of a data-driven simulation service system
Alirezaee et al. Trade‐offs in integer data envelopment analysis
Yang et al. A Parallel Processing CNN Accelerator on Embedded Devices Based on Optimized MobileNet
Zhang et al. Construction of educational resource metadata management platform based on service-oriented architecture
Savarimuthu et al. Square root for perfect square numbers using vedic mathematics
Gao Under the background of digital college financial problems existing in the informatization construction and solving suggestion
Zhang et al. Mesh partitioning algorithm based on parallel finite element analysis and its actualization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180501

WD01 Invention patent application deemed withdrawn after publication