Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: why is there not a ipow version of pow? Date: Wed, 19 Aug 2026 18:25:36 -0700 Organization: A noiseless patient Spider Lines: 20 Message-ID: <86a4qh1t2n.fsf@linuxsc.com> References: <115eks4$3pn1s$1@dont-email.me> <115facm$1659$3@dont-email.me> <115favq$2ckl$1@raubtier-asyl.eternal-september.org> <115fe3u$1659$5@dont-email.me> <115feje$3nf1$1@raubtier-asyl.eternal-september.org> <115ffag$1659$9@dont-email.me> <115g94d$2pb62$1@paganini.bofh.team> <115h9mb$kpdk$1@dont-email.me> <115hjka$o7k2$1@kst.eternal-september.org> <20260812224333.000065c4@yahoo.com> <115im0c$136js$1@kst.eternal-september.org> <20260813002409.00003f1d@yahoo.com> <115ippl$15jbt$1@dont-email.me> <86lda740ix.fsf@linuxsc.com> <20260815231716.00002b94@yahoo.com> <868q643ccm.fsf@linuxsc.com> <20260818003501.00002080@yahoo.com> <86zeyj1lrw.fsf@linuxsc.com> <20260818221740.00002511@yahoo.com> <86v797124x.fsf@linuxsc.com> <20260819215556.000030ed@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Thu, 20 Aug 2026 01:25:37 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3271992"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Nv76ajGPD/0qrMLEqQtfazjXO/VzGdEU="; posting-host="c420cdc7e69e3a804a94ab7d605930fe" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:DmWnBnBx+tnTijdtwl0KVLQbm5o= sha1:H/JNcyhKR3Ndm9xYzQ5JWsoTHWI= sha256:0jWcOUZywZTnTDAun3H5OudVXRG3NftwvAKsjiUYsUk= sha1:pFewpH36FbhD8J7/Ezjz/1+zfv0= sha256:0K1HY7syBs+75aLtOYIu8MNLZ8U8ziUH1dLFuA1B1xg= Xref: csiph.com comp.lang.c:401344 Michael S writes: > On Tue, 18 Aug 2026 15:42:54 -0700 > Tim Rentsch wrote: > >> That isn't surprising, considering that the recursive call >> is not tail recursive. > > As mentioned above, the presented pseudo-code serves for illustration. > The actual code executed the same multiplications in the same order but > was writen in iterative style. Right. Even though transformed into an iterative function body, the pseudocode being a non-tail-recursive formulation might induce a bad result in the resulting iterative code. General recursion can easily produce bad structure relative to a more linear method. It might be interesting to see the iterative code that you actually ran, assuming of course there isn't too much clutter from how the multiplications were done, etc.