Multiple Precision

            A multi-precision number X is represented by

                   

The term IB is a base, typically 214 in brent\Welcome.doc .htm and a real 2.24 in bailey\Welcome.doc .htm.  The exponent JX is the beginning power of B.  Both Bailey and Brent put the sign of X in the first element of IX(I), the exponent in the second and make all other IX(I) values positive.  The multiple precision work designed for nlfit. Bob\Welcome.doc .htm, puts the exponent in IX(1) and includes the sign of X in IX(I) for I greater than 1.  If all operations on IB and IX(I) are exact, the Multi-Precision number is exact to all digits through IB-IT.  These IX(I)’s must range over at least IB values in order to be able to represent all values of X.

 

Sums are of the form

      

Double precision numbers can be converted to multi-precsion numbers with ITD = 4-5 depending on the exact size of the double precision exponent.  These truncate at the accuracy level of the double precision number.

                      

D represented in IEEE fashion contains a sign bit at 1, followed by an 11 bit  exponent, followed by an implied 1 and then 52 bits for the rest of the mantissa.  A series of left and right shifts can easily find a set 0<ID£IB.

Sum of D and X

The sum of X and D is of the form

Assume JX>JD and IT > ITD+JX-JD

   

Where

            This involves ITD ~ 4-5 sums no matter what the size of IT. 

If the ID’s are < IB = 214 as originally found, sums and differences can sum to 232-1 before overflowing four byte integers.

This allows the sum to include 218-1, 262143 terms before it needs renormalization.

X´Y

Products are of the form

     

              This allows sums over approximately 232-13=219=524288-1 terms before renormalizing in the worst cases. 

The maximum number of terms with K=I+J at any value as a function of IT is IT.  Thus for 0£IX<IB, the sum in is less than

.  This limits IT to 24 = 16.  For –IB/2£IX<IB/2, the limit is increased by a factor of four so that IT is limited to 64 or to leave 1 for the exponent 63.  This is 32 digits/(52 bits) * 62[1] * 14 bits = which is approximately 530 decimal digits.  A renormalization is required before and after each multiple-precision multiplication.

 



[1] The first IX is not counted, since it ranges from 1 digit to 214 depending on the exponent.