*This message was sent using a trial version of CommuniGate(tm) UUCPGate* On Sun, Nov 5, 1995, 6:47:12 PM GMT Andrew Warren wrote: Try shifting the number, this works only for powers fo 2. 2^2 = 4 2<<1 = 4 2<<4 = 16 >*This message was received using a trial version of CommuniGate(tm) UUCPGate*E >Gerry Smith wrote: > >>How can I calculate the exponent of a number? (eg. 2^2=4) Any help will >>be greatly appreciated. > >Depends, Gerry... Will you always be squaring the number, or raising 2 to >some power, or do you need a way to do generalized x^y calculations? What's >the range of your x's and y's? > >-Andy > >-- >Andrew Warren - fastfwd@ix.netcom.com >Fast Forward Engineering, Vista, California >