Please rid me of this goto

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 23 11:59:07 PDT 2016


On 23.06.2016 19:22, Andrei Alexandrescu wrote:
> So I was looking for an efficient exponentiation implementation, and
> http://www.stepanovpapers.com/PAM.pdf has a nice discussion starting at
> page 54. Stepanov's solution, however, duplicates code, so I eliminated it:
>
> https://dpaste.dzfl.pl/e53acb41885a
>
> The cost is the use of one goto. Can the code be restructured to not
> need it?
>
>
> Thanks,
>
> Andrei

Unrelated comment: 0^^0 should not overflow.


More information about the Digitalmars-d mailing list