Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

# Computing Integer Exponents on Superscalar Computers

IP.com Disclosure Number: IPCOM000103663D
Original Publication Date: 1993-Jan-01
Included in the Prior Art Database: 2005-Mar-18
Document File: 2 page(s) / 58K

IBM

## Related People

Alpern, B: AUTHOR [+3]

## Abstract

This article discloses a technique for efficiently raising a floating-point number to an integral power. This technique implements the well-known Repeated Squaring method for exponentiating numbers in about 3 log N cycles on a IBM RISC System/6000* computer. (Image Omitted)

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 68% of the total text.

Computing Integer Exponents on Superscalar Computers

raising a floating-point number to an integral power.  This technique
implements the well-known Repeated Squaring method for exponentiating
numbers in about 3 log N cycles on a IBM RISC System/6000* computer.

(Image Omitted)

The Repeated Squaring method computes the sequence: ***** SEE
ORIGINAL FOR MATHEMATICAL EQUATIONS IN DOCUMENT *****

At the same time a running product is maintained. A term of the
sequence is multiplied into the running product whenever the
corresponding bit of the exponent N is a 1.

The figure gives a fast implementation of Repeated Squaring.
Each iteration of the loop computes one term of the  sequence and
updates the running product to include (or not) the preceding term.
If the bit b corresponding to a term x is 0, then 0 times the
running product r is added to r, leaving the running product
unchanged.  If b is 1, then x-1 times r is added to r, updating the
running product to xr.  The multiplications are staggered so that the
result of a multiply is not needed until at least two cycles later.

Comparisons (to determine bit values) are avoided by using each
individual bit of N as an index into an array of two floating-point