The first sum can be rapidly evaluated by means of the binary
algorithm for exponentiation, where each operation is performed modulo
the integer 8k + 1. These calculations can be done with either
integer or floating-point arithmetic, provided the format being used
has enough accuracy to exactly represent the integer . Once an
individual exponentiation operation is complete, the resulting integer
value is divided by 8 k + 1, using floating-point arithmetic, and
added to the sum modulo 1. Only a few terms are required of the
second, since the terms rapidly become smaller than the ``machine
epsilon'' of the floating-point arithmetic system being used. The
resulting fractional value, when expressed in base 16 notation, gives
the hexadecimal digits of beginning at position d + 1.