Please rid me of this goto

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 23 10:40:45 PDT 2016


     // Loop invariant: r * (b ^^ e) is the actual result
     for (;;)
     {
         if (e % 2 != 0)
         {
             r = mul(r, b, overflow);
             if (e == 1) return r;
         }
         b = mul(b, b, overflow);
         e /= 2;
     }
?


More information about the Digitalmars-d mailing list