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: Fri, 21 Aug 2026 07:31:16 -0700
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <86ld9zzgsr.fsf@linuxsc.com>
References: <115eks4$3pn1s$1@dont-email.me> <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> <86a4qh1t2n.fsf@linuxsc.com> <20260820220349.000038b2@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Fri, 21 Aug 2026 14:31:17 +0000 (UTC)
Injection-Info: dont-email.me; logging-data="421242"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19S7NnbrgQRx6/L2kdF08PtxHw8SvkCbHY="; posting-host="d35962107532262a9ae9519d5c53ecd4"
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:8bSl/MHX3xj5oxmU1s+FnmIHNQQ= sha1:Y9RnFZYo2+SQVQYtCwBLaOAZL6M= sha256:cpoqcCRJXZjuwF/nBErDS3bCz4PIrZDcXfQD3Ag0pLw= sha1:/AV6AGcOWO1nFk7qYTtsMmsDA8A= sha256:U9WxFX9HGpFRXG8lugl6j6scqPSXzXoXVNWiGazvEPQ=
Xref: csiph.com comp.lang.c:401401
Michael S writes:
> On Wed, 19 Aug 2026 18:25:36 -0700
> Tim Rentsch wrote:
>
>> 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.
>
> It was 8 years ago.
> I didn't preserve intermediate variants that did not make it into
> final solution.
Oh, too bad. Thank you for letting me know.