Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!uw-beaver!cornell!rochester!ur-tut!sunybcs!boulder!hao!ames!umd5!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Power operator? Message-ID: <7011@brl-smoke.ARPA> Date: 9 Jan 88 09:44:39 GMT References: <47000029@uxe.cso.uiuc.edu> <10063@mimsy.UUCP> <646@l.cc.purdue.edu> <3312@ihlpf.ATT.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 8 In article <3312@ihlpf.ATT.COM> nevin1@ihlpf.UUCP (00704A-Liber,N.) writes: >(BTW, I really don't understand your 'use the >binary implementation of z ...' remark.) A fast way to implement a general integer-to-the-integer-power routine is to "think binary" about the exponent. If you can't figure out how this would work, I think it's shown in Gries' "The Science of Computer Programming".