Re: [q-lang-users] improvement to Q
Brought to you by:
agraef
From: <ed...@ri...> - 2007-06-27 20:22:27
|
<p><br />Oops!</p><p>Should be </p><p>public (^^) X N @ (^);<br />=0D X^^0 =3D 1;<br />=0D X^^1 =3D X if (issym X) or (X 0);<br />=0D =3D _FAIL_ otherwise;<br />=0D X^^N:Int <br />=0D if N>1:<br />=0D =3D W*W where W =3D X^^(N div 2) if N mod 2 =3D 0;<br />=0D =3D X*(X^^(N-1)) if N mod 2 =3D 1;<br />=0D otherwise:<br />=0D =3D 1%(X^^(-N));</p><p><p>to handle cases like X^^3.</p><p> I hope the= not equals operator shows up after the "X^^1 =3D" pattern. The e= mail program I have to use sux! It is suppose to turn the HTML crap off but= won't <strong>:~/</strong></p></p><p>Eddie </p><BR>= |