Publication number  US7644115 B2 
Publication type  Grant 
Application number  US 11/031,749 
Publication date  Jan 5, 2010 
Filing date  Jan 7, 2005 
Priority date  Jan 7, 2005 
Fee status  Paid 
Also published as  US20060155796 
Publication number  031749, 11031749, US 7644115 B2, US 7644115B2, USB27644115, US7644115 B2, US7644115B2 
Inventors  Gregory O. Granger 
Original Assignee  Sas Institute Inc. 
Export Citation  BiBTeX, EndNote, RefMan 
Patent Citations (12), Referenced by (2), Classifications (5), Legal Events (3)  
External Links: USPTO, USPTO Assignment, Espacenet  
This document relates generally to the field of computer arithmetic, and more specifically, to methods and systems for performing largeradix numeric operations.
Since most modern digital computers are transistor based, binary numbers have been traditionally used for internal computer processing. The binary number system, also known as radix2, consists of just two unique numbers, 0 and 1, which conveniently represent the “off” and “on” states of a transistor element. In contrast, humans generally use decimal number system, also know as radix10, which consists of numbers 0 through 9 coinciding with 10 fingers of two hands. To interact with a computer, decimalbased input data is converted to binary for computer processing. Thus, for example, when a calculation involves integers, a decimal number is represented as powers of 2 (i.e., 2^{n}, . . . 2^{4}, 2^{3}, 2^{2}, 2^{1}, 2^{0}), whereby decimal 23 corresponds to binary 10111. When these calculations involve fractional numbers, the results are represented as sums of inverse powers of 2 (i.e., ½, ¼, ⅛, 1/16 . . . ½^{n}), whereby one tenth ( 1/10) corresponds to a repeating binary fraction 0.00011
Due to design limitations, most modern computers cannot effectively represent repeating binary fractions. In particular, a typical computer system recognizes several native data types, including integer, singleprecision floating point, doubleprecision floating point and character. One of the differences between these data types is the amount of memory allocated by the system to each data type. On a typical 32bit system, characters are often stored in 8 bits, a short data type is 16 bits, integer and singleprecision floating point numbers are 32 bits, and doubleprecision floating point numbers are 64 bits. As a result, due to the limited memory provided by a typical computer system for representation of data, a repeating binary fraction may be truncated and rounded off to fit into the available memory. This can lead to rounding errors that cause results calculated in radix10 and those calculated in radix2 to be different. The differences can easily escalate when many of such roundedoff numbers are multiplied or added resulting in significant discrepancies between the decimal and binary representations. This can be problematic in many applications, especially those dealing with monetary and monetary exchange calculations.
Some of these problems can be avoided if calculations are done by the computer in a radix10 based number system. The two most popular approaches to the radix10 computer arithmetic are large binary integers and small decimal digits techniques. The large binary integer solution requires writing software functions that allow calculation of large integers (e.g., 256 bit integers). Calculations can be done rapidly, but it can be very difficult to determine decimal point placement for addition and subtraction, because the number is in binary, but the decimal point needs to be placed between decimal digits. Therefore this approach is generally used for fixed point calculations (e.g., calculations where the decimal point is in a fixed location in the numbers to be processed). This approach ignores the decimal point in the calculation and simply implies it in the result. The only place where the decimal point is acknowledged is when a number needs to be displayed. This also requires that all calculations be done at the same precision in order to avoid the problem of aligning two binary numbers for a decimal operation, like addition.
Another approach is the small decimal digit approach which generally uses onehalf to one byte (8 bits) to store a decimal digit. Thus, each decimal digit (09) is encoded by a corresponding fourbit binary number, so that a sequence of decimal digits can then be represented by concatenating the fourbit binary numbers. This makes placing the decimal point easier, but the calculation is much slower because each decimal digit is handled separately. In addition, there is a significant loss of storage efficiency because four bits can store decimal numbers 015 but are used in this approach to store only numbers 09. Furthermore, similar to the large binary integer approach, implementation details for the small decimal digit method differ significantly from processortoprocessor. This makes creating a platformindependent solution difficult.
In accordance with the teachings provided herein, methods and systems for performing largeradix computer arithmetic are disclosed. In one example, a method provides for one or more input decimal numbers (e.g., radix10 numbers) to be segmented into one or more largeradix segments. The radix of each segment may be greater than the radix of a decimal number (i.e., 10). As an illustration, the radix of a segment may be a multiple of 10, such as 100, 1000, 10,000, 100,000, 1,000,000, etc. If the decimal number has a fractional part, the number may be segmented so that the decimal point is placed between two adjacent largeradix segments. Once the decimal number is segmented, various numeric operations may be performed on the largeradix segments of the decimal number. Such operations may include, but are not limited to, unary, arithmetic, logic, or character string conversion operations. Finally, the result of the numeric operation on the largeradix segments of the decimal number may be outputted in decimal form.
As another example, a computer system for largeradix arithmetic may comprise a processor and a memory. The processor may be configured to segment a decimal input number into segments having a radix greater than the radix of the decimal number. If the decimal number has a fractional part, the processor is configured to identify the decimal point and segment the decimal number so that the decimal point is placed between two adjacent largeradix segments. Each largeradix segment may be represented by any data type supported by the computer system (e.g., integer, singleprecision floating point, doubleprecision floating point and character data types). Furthermore, largeradix segments may be stored in the system memory in one or more data structures, such as an array, a linked list, etc. A processor may then perform one or more numeric operations on the largeradix segments. As described above, the operations may include unary, arithmetic, logic, character string conversion operations, etc. The result of the numeric operation may then be outputted as a decimal number.
In another example, a system may be further configured to receive a second decimal number and segment it into one or more largeradix segments, having the same radix as the first decimal number. The largeradix segments of the second number may also be stored in a data structure, such as an array, a linked list, etc. The processor may then perform one or more numeric operations on the largeradix segments on the first and second decimal numbers. If one or both decimal numbers have a fractional part, the numeric operations of the largeradix segments of the first and second numbers are performed on the respective segments in the integral and fractional parts on the decimal numbers. Thus, for example, to perform largeradix addition, two segmented decimal numbers are aligned at the respective decimal points and added segment by segment, with a carry added (if needed) to the next segment pair. In the event the carry exceeds the available number of segments, an additional data element may be added to store the carry as a new largeradix segment. Finally, the result of the numeric operation may be outputted as a decimal number.
In another example, a computerusable medium having computerreadable program code embodied thereon for programming one or more disparate processorbased computing systems to perform numeric operations is disclosed. The program code may comprise instructions for accepting an input decimal number from a user and segmenting the input decimal number into largeradix segments, wherein the radix of a segment is greater than the radix of the decimal number. The program code may further comprise instructions for identifying presence of a decimal point, and segmenting the decimal number so that the decimal point is placed between two adjacent largeradix segments. The program code may further comprise instructions for performing one or more numeric operations on the largeradix segments of the decimal number and instructions for outputting the result of the numeric operations as a decimal number. The program code may further comprise instructions for storing the largeradix segments of the decimal number into one or more data structures, including an array, a linked list, etc.
In yet another example, a method for implementing largeradix computer arithmetic is disclosed. First, a developer may determine a computing platform on which the largeradix arithmetic will be implemented. A computing platform may include at least a processor, a memory and an operating system. Depending on the hardware and software constraints of the computing platform, as well as the application requirements, a developer may select a radix for a largeradix segment. To select a radix, the developer may consider data types provided by the platform and cost of computation of one or more native operations on each data type. As an illustration, in a computing platform optimized for floatingpoint arithmetic, an operation performed on two floatingpoint numbers may be less costly, e.g., with respect to system time and resource consumption, than the same operation performed on two integer numbers. Based upon one or more of these considerations, instructions code for largeradix numeric operations may be written.
Processor 150 may include an arithmetic logic unit 160, a plurality of registers 170 and a control unit 180. The ALU 160 is used for performing arithmetic operations, such addition and multiplication, and comparison operations. A collection of registers 170 may be used to store temporary values of internal operations, such as the address of the instruction being executed and the data being processed. Registers 170 may hold 32bit or 64bit registers, etc. Control unit 180 controls operation of the processor 150 by analyzing and executing program instructions. The instruction set architecture of the processor 150 may be implemented on different platforms, such as: a general purpose RISC architecture (e.g., MIPS, PowerPC, Precision Architecture, and SPARC), an embedded RISC architecture (e.g., ARM, Hitachi SH, MIPS 16, and Thumb), a nonRISC architecture (e.g., Intel 80×86, IBM 360/370, and VAX), etc.
System memory 110 may include an operating system 120, highspeed main memory 130 in the form of a medium such as random access memory (RAM) and read only memory (ROM), and secondary storage 140 in the form of long term storage mediums such as floppy disks, hard disks, tape, CDROM, flash memory, etc. and other devices that store data using electrical, magnetic, optical or other recording media. The system memory 110 may also include video display memory for displaying information through a display device. The system memory 110 can comprise a variety of alternative components having a variety of storage capacities.
System memory 110 may also contain an operating system 120. The operating system 120 can include a set of software instructions which control the operation and the resource allocation of computing platform 100. The operating system 120 may perform basic tasks, such as recognizing input from the input device 190, sending output to the output device 195, keeping track of files and directories on the main memory 130 and secondary storage 140, and controlling various peripheral devices. Furthermore, operating system 120 can provide a software platform on top of which other programs and applications can run. Examples of operating system 120 include DOS, Windows, Mac OS, Unix, Linux, etc.
Finally, the input and output devices 190 and 195 allow users to interact with the computing platform 100. In particular, the input device 190 can comprise a keyboard, a mouse, a physical transducer (e.g., a microphone), or the like. The output device 195 can comprise a display, a printer, a transducer (e.g., a speaker), or the like. Various other communication devices, such as a network card or a modem, can be used as input and/or output as well.
As shown in
A system for largeradix arithmetic is described next with reference to
The user input instructions 310 may be used for accepting input from a user. The input may comprise a numeric, characterbased or alphanumeric data. An example of a numeric input is number “749741693472770462348.0261983465”. An example of a characterbased input is string “United States Patent and Trademark Office is an Agency of the United States Department of Commerce.” An example of alphanumeric input is the string “the U.S. national debt as of 16 Oct. 2004 at 08:28:18 PM GMT is $7,343,942,183,508.57.”
The numeric input data may be in a variety of numeric formats. In one example, the numeric input data is in a decimal form. For convenience, the subsequent examples of the systems and methods for largeradix arithmetic will be described with reference to decimal input data format, unless noted otherwise. It should be understood, however, that user input instructions may be written to accept and to perform largeradix arithmetic on any other data format, such as binary, hexadecimal, character strings, etc. Furthermore, inputs and outputs disclosed herein may be with other than a user, such as with a computer program.
The user input instructions 310 may be executed on a computing platform 100. The user input instructions 310 may be stored in memory 110 in the main memory 130 or secondary storage 140. Once stored, the user input instructions 310 may be executed by processor 150 either directly or by means of a platformspecific compiler (not shown). During, execution, the instructions 310 may request the operating system 120 to accept user input from the input device 190. In one example, the user input instructions 310 may then request operating system 120 to store user input in one or more data files in main memory 130 for further processing.
The system for largeradix arithmetic in
Thus, if the radix of the largerradix segment is one thousand (1000), which corresponds to numbers 0 through 999, the abovereferenced decimal number may be segmented into a plurality of threedigit segments as follows: 749 741 693 472 770 462 348. If the radix of the largeradix segment is one million (1,000,000), which correspond to numbers 0 through 999999, the above decimal number may be segmented into a plurality of sixdigit segments as follows: 749 741693 472770 462348. To achieve uniformity, the most significant largeradix segment, 749, may be represented as 000749 without loss of precision, so that each largeradix segment comprises six decimal digits.
If the input is a fractional number, such as 749741693472770462348.0261983465, the segmentation instructions 320 may instruct the processor 150 to segment the integral part and fractional part separately. Thus, in radixone million (1,000,000) segmentation, for example, the integral part of the above number may be segmented as follows 749 741693 472770 462348, while the fractional part may be segmented as 026198 3465. In addition, the most significant largeradix segment of the integral part, 749, may be represented as 000749, while the least significant largeradix segment of the fractional part, 3465, may be represented as 346500. As a result, the largeradix segments can comprise six decimal digits.
Next, the segmentation instructions 320 may request operating system 120 to store the largeradix segments in one or more data structures in memory 130. Example data structures include arrays, dynamic arrays, linked lists, stacks, queues etc. The number of the elements in the data structure may depend on the number of largeradix segments. Furthermore, two or more data structures may be used to separately store segments associated with integral and fractional parts of the input number. Alternatively, segments associated with both the integral and fractional parts of the input number may be stored in a single data structure, and the segments of integral part may be distinguished from the segments of the fractional part. In one example, such distinction may be made by assigning a pointer to identify location of the radix point, which separates segments associated with integral and fractional parts of the input number.
The segmentation instructions 320 may also indicate a data type to the elements of the data structure, e.g., largeradix segments. A data type classifies a particular type of information. A data type usually depends on the programming language in which instructions 300 are written and the data types supported by the computing platform. Data types supported by most programming languages and recognized by most computing platforms are integer, single precision floatingpoint, double precision floating point and character. Differences between these data types include the amount of memory allocated by the computing platform to an element of each data type and the manner in which data of different data types is organized in the system memory allocated to that element.
For example, most current computer systems use 64bit double precision floating point data elements and only 32bit integer type data elements. An integer data type uses all of the available 32 bits to store value of the number. A double precision floating point data type uses a part of the number of the allocated 64 bits to store the value of the number in a largeinteger format with the remainder of the 64 bits being used to store the value of the exponent of the number. Because an integer data type uses all of its available 32 bits to store a value of the number, segments having a large radix can be stored as a 32 bit integer. As another example, a double precision floating point data type can potentially store segments with a much larger radix than the integer data type, however, because the double precision floating point data type uses only a fraction of the available 64 bits to store the value of the segment, the remainder of the bits used for the exponent are not used because each segment is a whole number with exponent of 1. Thus, an integer data type may be more memory efficient than the double precision data type.
Once the input numbers are segmented by the segmentation instructions 320 and the largeradix segments are stored in one or more data structures in system memory 110, the process flow proceeds to numeric operation instructions 330. The numeric operations instructions 330 may be used to perform various numeric operations on the largeradix segments on the input numbers.
As shown in
As an example, numeric operations may be performed on largeradix segments of the input number on a segmentbysegment basis. Thus for example, let the large radix value=1,000,000, let largeradix segment a=999991 and largeradix segment b=999992. Accordingly, a multiplication of a by b yields: 999991*999992=999983000072. In this example, a single precision floating point data type may be used to hold each largeradix segment and a double precision floating point data type may be used to hold the result. The result may then be split into two singleprecision floating point data segments, with the least significant largeradix segment holding 000072 and the most significant largeradix segment holding 999983. The segments may then be stored in a results data structure. If the operands have more largeradix segments, the most significant large radix segment of the result, 999983, may be added as a carry to the product of other segments.
Once the numeric operations have been performed on the input number(s), the process flow proceeds to the user output instructions 340. The user output instructions 340 facilitate conversion of the largeradix numbers into decimal format or character format for such uses as display of the result of the numeric operation to the user or for other use by a computer program. As indicated above, the results of the numeric operation on input number(s) are stored in binary format in one or more data structures as largeradix segments. To display the results to the user, the output instructions 340 may, for example, command the processor 150 to convert the binary data stored as largeradix segments into decimal digits and then to concatenate all largeradix segments into a single character string of a decimal number. This character string can then be displayed to the user using output device 195. An example of conversion of largeradix segments to character string is provided below with reference to
Next in step 420, the character string(s) containing a user input number may be parsed to determine presence of a radix point. If the user input is a whole number (e.g., it does not have a fractional part), the number may be segmented in step 430 starting from the least significant digits toward the most significant digits. Thus for example, the input number 749741693472770462348 stored as a string of characters may be segmented into four radixmillion segments: 749, 741693, 472770, and 462348. If the user input is a real number (i.e., it has a fractional part), each part of the number may be segmented in step 430. The integral part can be segmented starting from the least significant digits toward the most significant digits, as shown above. The fractional part in turn can be segmented in the opposite direction, starting from the most significant digits toward the least significant digits. Thus for example, in the number 749741693472770462348.0261983465, the fractional part 0261983465 may be segmented into two radixmillion segments: 026198 and 3465. Furthermore, the least significant segment of the fractional part may be padded with zeros so that it comprises six decimal digits, 346500.
Next in step 440, the one or more largeradix segments may be stored in a data structure of a numeric data type. Example data structures include arrays, dynamic arrays, linked lists, stacks, queues and the like. Example data types include shorts, integers, single precision floating point, and double precision floating point and the like. The number of the elements in the data structure may depend on the number of largeradix segments in each input number. Furthermore, two or more data structures may be used to separately store segments associated with integral and fractional parts of the input number(s). Alternatively, segments associated with both the integral and fractional parts of the input number may be stored in a single data structure, and the segments of integral part may be distinguished from the segments of the fractional part using pointers for example.
Next in step 450, various numeric operations on the largeradix segments of the user input number(s) may be performed. The numeric operations may include arithmetic operations, logic operations and character operations. In turn, the arithmetic operations may include addition, subtraction, multiplication and division operations on two or more operands. They may also include unary operations such as negation, inversion and exponentiation on a single operand. Logic operations may, for example, include comparison, AND, OR, XOR, and the like. Characterbased operations may include various character string conversions. In one example, the results of the largeradix operation on one or more numbers may be stored into a results data structure, which could be of the same or different data type as the original data structure(s) that is used to hold the operands.
Finally in step 460, the output of a numeric operation may be outputted (or displayed) in a user readable format. Thus, the largeradix segment(s) of the result of the numeric operation may be converted into decimal format and/or character format for display of the results to the user. Alternatively, the results may be used to perform additional largeradix operations of the largeradix segments. An example method for conversion of largeradix segments to characters for display to the user will be described below with reference to
It should be understood, that similar to the other processing flows described herein, the steps and the order of the steps in the flowchart may be altered, modified and/or augmented and still achieve the desired outcome.
An example method for implementing largeradix arithmetic is described next with reference to
In step 520, a cost of computation of numeric operation(s) on different data types supported by each selected computing platform may be estimated. Such an estimation may facilitate determination of data types to be used in storing largeradix segments.
Next in step 530, once the cost of computation has been determined and the programming language, computing platform and operation set have been chosen, the developer may then select a data type and data structure to be used to hold largeradix segments. For example, the developer may choose the data type whose mathematical operators produce the largest number of decimal digits in the shortest amount of time. In addition, several different data types may be used to hold different data segments. Furthermore, different data types may be used on different computing platforms. If the code is optimized for only a single computing platform, then certain data types may be better to use due to features available on that platform. For example, certain IA32 processes have SIMD instructions that could greatly speed up calculations.
Once the developer has chosen the characteristics of the numbers, the developer may wish to design an appropriate data structure. Different programming languages provide different data structures. In addition, there are available template libraries of various data structures. Data structures can include arrays, dynamic arrays, linked lists, queues, etc. Alternatively, a developer may design a separate data structure to hold largeradix digits. In general, a largeradix data structure may contain a collection of largeradix segments, a sign indicator, and a decimal point location. The developer may also keep the current number of largeradix segments in use and an indicator to mark the number as invalid (e.g., for results of an operation that have no valid interpretation, such as dividing a number by zero). The developer may also use two or more data structures to separately store largeradix segments associated with integral and fractional parts of the number.
In step 540, the developer may select a radix to be used in largeradix arithmetic. The radix may be selected based on one or more factors, including the type of the processor architecture (e.g., the size of processor registers, such as 32 bit or 64 bit), the memory allocated by the computing platform to the available data types (e.g., 16 bits, 32 bits, 64 bits), the aforementioned cost of computation of numeric operation(s) on different data types supported by each selected computing platform, data types supported by the selected programming language, as well as application details in which the largeradix arithmetic will be used. The radix may be greater than 10, which is the radix of a decimal number. In one example, the radix of a segment may be a multiple of 10, such as 100, 1000, 10,000, 100,000, 1,000,000, etc; however, any value of radix can be chosen.
In step 550, the developer may write the instructions code for one or more numeric operations (e.g., addition, subtraction, multiplication, division and character string conversion operations). The instructions may be written to support positive and negative numbers that contain a floating decimal point. The developer may decide whether the implementation will support only a fixed number of decimal digits or an arbitrary number of decimal digits. A fixed number of digits may offer better resource control and more opportunities for optimization. If the developer decides to implement support for arbitrary precision, the developer may wish to address a potential runaway precision situation. For example, one divided by three will generate an infinite number of digits if not somehow constrained. In one example, the developer may allocate a large number of segments to the fractional part of the number to improve precision of the result and thus control the runaway precision. Several exemplary algorithms for largeradix addition, subtraction, multiplication, division and character string conversion will be described with reference to
At step 560, the numeric operations instructions code may be tested. Numeric operations may contain subtle errors that only show up a few times in the range of the operations. To overcome an error, a developer may write a test program that generates random large decimal numbers and a random operation (+ − * /) and test the instructions code against a large number of randomly generated numbers and operations.
Addition and subtraction operations may be similar if both operands have the same sign. When the signs differ, appropriate sign changes may be made and the opposing operation may be invoked. For example: −1+2 can be rewritten as 2−1. In this example of addition, a developer could align the decimal points of the two numbers. Under this method, decimal points could be allowed between largeradix segments. One approach is to determine which of the two operands have the most digits to the right of the decimal point. This operand's lowest order largeradix segment is copied into the result variable, until the location of the lowest order segment of the other operand is reached. At this point a sum (with carry) is computed for each largeradix segment pair.
Below is an illustration of addition for an arbitrary number of digits using this method. Given two numbers:
a=42335793867023.2415134590875645 and
b=39756893578230459872.36049873
Let these numbers be segmented into largeradix segments as follows (radix=1,000,000 in this example):
a=000042 335793 867023.241513 459087 564500
b=000039 756893 578230 459872.360498 730000
Note that this effectively breaks the two numbers down into a series of six digit segments centered around their respective radix points. Now a and b can be added (with carry) as follows:
carry:  1 1111 1 11 1 1111  
a:  000042 335793 867023 . 241513 459087 564500  
b:  000039 756893 578230 459872 . 360498 730000  
  
c:  000039 756935 914024 326895 . 602012 189087 564500  
An example flow chart diagram for implementing largeradix addition on two numbers is shown in
The diagram uses the following functions:
With reference to
Below is an example of largeradix subtraction for two fractional numbers. Given two numbers:
a=39756893578230459872.36049873 and
b=42335793867023.2415134590875645
Let these numbers be segmented into largeradix segments as follows (radix=1000000 in this example):
a=000039 756893 578230 459872.360498 730000
b=000042 335793 867023.241513 459087 564500
Numbers a and b may be subtracted as follows:

An exemplary flow chart diagram for implementing largeradix subtraction of two fractional numbers is shown in
The diagram uses the following functions:
With reference to
Below is an example of largeradix multiplication of two fractional numbers. Given two numbers: a=578230459872.360493 and b=867023.24151. The number are segmented into a plurality largeradix segments (radix=1000000 in this example):
a=578230 459872.360493
b=867023.241510
Numbers a and b may be multiplied as follows:
a:  578230 459872 . 360493  
b:  867023 . 241510  
  
Carry 1:  139648 111063 87062  
Partial 1:  327300 686720 664430  
Carry 2:  501338 398719 312555  
Partial 2:  709290 601056 722339 0  
=====================================================  
1 1 1  
501338 247657 351974 496121 664430  
c:  501339 247658 351975 496121 . 664430  
An example flow chart diagram for implementing largeradix multiplication of two fractional numbers is shown in
The diagram uses the following functions:
With reference to
In another example, largeradix multiplication can also be done by generating partial products and summing them together. This optimization technique can be seen in example C code shown in
A consideration in the largeradix division is the placement of radix point. Placement of the radix point can be based on the difference between the segment count of the dividend and the divisor relative to their respective segment points. A divisor that is less than one will push the radix point to the right of its position in the dividend. In contrast, a divisor being greater than one will push the radix point to the left.
Below is an example of largeradix division for two fractional numbers. Given two numbers: a=578230459872.360493 and b=867023.24151. Let these numbers be segmented into largeradix segments as follows (radix=1000000 in this example):
a=578230 459872.360493
b=867023.241510
Now divide a by b (with the decimal point being ignored):
(a) 578230 459872 360493/(b) 867023 241510
Partial Quotient 1: 666914
Remainder=521783 960353
Partial Quotient 2: 601810
Remainder=703379.866900
This process is repeated until a remainder is equal to zero or until the desired precision is reached. The result of a division operation might be an infinite series of digits. Therefore there may be a maximum precision limit placed on the division operation.
An example flow chart diagram for implementing largeradix division of two fractional numbers is shown in
The diagram uses the following functions:
With reference to
If at the decision step 1004 it has been determined that the number of largeradix segments in the divisor b is equal to one, the process flow proceeds to step 1044, at which point variables aa and c may be created to hold maximum number of largeradix segments. Next, at step 1046, value of a may be aligned in variable aa so that the most significant largeradix segment of a starts at aa_{MP}. At step 1048, variable i is initialized to the maximum number of largeradix segments; variable rm is initialized to 0, and variable b1 is initialized to the most significant largeradix segment of divisor b. At step 1050, variable t is initialized to the sum of aa_{i }and a product of the value of rm and the base; variable c_{i }is initialized to the largest whole number that is less than or equal the ratio of t and b1; variable rm is initialized to the difference of value of t and product of c_{i }and b1; and variable i is decremented by 1. Next, at step 1052, if value of variable i greater than 0, the processing step 1050 is repeated. Otherwise, the process flow proceeds to step 1054, at which value of variable c_{MP }is compared to zero. If c_{MP }is not equal to zero, the division operation ends. If c_{MP }is equal to zero, the process flow proceed to step 1056 which adds an extra segment of precision when the most significant segment of the result is zero. More specifically in this example, the largeradix segments of variable aa are shifted to the left by one segment; variable c_{1 }is assigned the value of the largest whole number that is less than or equal to the ratio of the product of rm and radix and value of b1; location of the radix point in the result of the division is shifted left by one largeradix segment; and the division operation example ends.
Yet another largeradix operation example could be a character string conversion. If the largeradix is a whole positive power of ten, no explicit radix conversion is required when numbers are moved to and from character strings. Most programming languages have facilities to convert basic numeric types to and from string types. These can be used to convert each largeradix segment. In a language like C, for example, the library “printf” function can be used to directly convert each largeradix segment into a string representation of that segment. Since the base is a whole positive power of ten these strings can be concatenated (as in the “strcat” library function) together with the decimal point into a complete representation of the number. Alternatively, lookup tables can be used to do largeradix segment conversions. Converting from a character string to a number can be done in a similar fashion, either by calling a library function native to the implementation language (e.g., “scanf” in C) or by doing a reverse table look up.
An example method for largeradix character string conversion using a lookup table of
The abovedescribed systems and methods for largeradix arithmetic may be implemented on various types of computer architectures, such as for example on a single general purpose computer or workstation, or on a networked system, or in a clientserver configuration, or in an application service provider configuration. In multiple computer systems, data signals may be conveyed via networks (e.g., local area network, wide area network, internet, etc.), fiber optic medium, carrier waves, wireless networks, etc. for communication among multiple computers or computing devices.
The systems' and methods' data (e.g., associations, mappings, etc.) may be stored and implemented in one or more different types of computerimplemented ways, such as different types of storage devices and programming constructs (e.g., data stores, RAM, ROM, Flash memory, flat files, databases, programming data structures, programming variables, IFTHEN (or similar type) statement constructs, etc.). It is noted that data structures describe formats for use in organizing and storing data in databases, programs, memory, or other computerreadable media for use by a computer program.
The systems and methods may be provided on many different types of computerreadable media including computer storage mechanisms (e.g., CDROM, diskette, RAM, flash memory, computer's hard drive, etc.) that contain instructions for use in execution by a processor to perform the methods' operations and implement the systems described herein.
The computer components, software modules, functions, data stores and data structures described herein may be connected directly or indirectly to each other in order to allow the flow of data needed for their operations. It is also noted that a module or processor includes but is not limited to a unit of code that performs a software operation, and can be implemented for example as a subroutine unit of code, or as a software function unit of code, or as an object (as in an objectoriented paradigm), or as an applet, or in a computer script language, or as another type of computer code. The software components and/or functionality may be located on a single computer or distributed across multiple computers depending upon the situation at hand.
As another example of the wide scope of the systems and methods disclosed herein, a system and a method can be configured for the rapid calculations of decimal based floating point numbers in a platformindependent hardware environment, wherein a fixed or arbitrary number of digits can be calculated in a time efficient manner using the instructions available in all modern hardware, while retaining the decimal (base_{10}) integrity of the calculation. This can be done by using either the floating point or integer units of a processor to calculate decimal numbers. A representation based on large radix segments is used. When a decimal point is needed it will fall on a boundary between two such large radix segments. This approach would work also for other bases.
Cited Patent  Filing date  Publication date  Applicant  Title 

US3943350 *  Oct 18, 1974  Mar 9, 1976  Sperry Rand Corporation  Radix converter utilizing automata 
US5408425 *  May 25, 1993  Apr 18, 1995  The Aerospace Corporation  Splitradix discrete cosine transform 
US6437715  Aug 17, 2001  Aug 20, 2002  International Business Machines Corporation  Decimal to binary coder/decoder 
US6525679  May 20, 2002  Feb 25, 2003  International Business Machines Corporation  Binary to decimal coder/decoder 
US6546411  Dec 3, 1999  Apr 8, 2003  International Business Machines Corporation  Highspeed radix 100 parallel adder 
US6792441 *  Mar 10, 2001  Sep 14, 2004  Jaber Associates Llc  Parallel multiprocessing for the fast fourier transform with pipeline architecture 
US7318080 *  Nov 6, 2003  Jan 8, 2008  Telefonaktiebolaget L M Ericsson (Publ)  Split radix multiplication 
US20020188647 *  Jun 12, 2001  Dec 12, 2002  Dovi Mark A.  Method and apparatus for optimizing data transfers between processes 
US20040236810 *  Feb 25, 2004  Nov 25, 2004  Hitachi, Ltd.  Parallel fast fourier transformation method of concealedcommunication type 
US20050050119 *  Aug 26, 2003  Mar 3, 2005  Vandanapu Naveen Kumar  Method for reducing data dependency in codebook searches for multiALU DSP architectures 
US20050055389 *  Sep 8, 2003  Mar 10, 2005  Gopalan Ramanujam  Method, apparatus and instructions for parallel data conversions 
US20060095487 *  Oct 28, 2004  May 4, 2006  HewlettPackard Development Company, L.P.  Binary representation of number based on processor word size 
Citing Patent  Filing date  Publication date  Applicant  Title 

US8645350 *  Jul 11, 2008  Feb 4, 2014  Adobe Systems Incorporated  Dictionary compilations 
US20100011016 *  Jul 11, 2008  Jan 14, 2010  Adobe Systems Incorporated  Dictionary compilations 
U.S. Classification  708/204 
International Classification  G06F7/00 
Cooperative Classification  G06F2207/3896, G06F7/491 
European Classification  G06F7/491 
Date  Code  Event  Description 

Jan 7, 2005  AS  Assignment  Owner name: SAS INSTITUTE INC., NORTH CAROLINA Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:GRANGER, GREGORY O.;REEL/FRAME:016163/0465 Effective date: 20050106 
Jun 5, 2013  FPAY  Fee payment  Year of fee payment: 4 
Jun 15, 2017  FPAY  Fee payment  Year of fee payment: 8 