 <p>You'd have to cast to decimal for smaller numbers</p> <pre><code> select cast(power(cast(101 as float),50) as decimal(38,0)) % 221 </code></pre> <p>or</p> <pre><code> select power(cast(101 as decimal(38,0)),50) % 221 </code></pre> <p>This fails though with such a large number</p> <p>But then it makes no sense anyway for larger numbers.</p> <ul> <li>float is accurate to 15 signficant figures.</li> <li>101 ^ 50 = 1.64463182184388E+100</li> <li>the margin of error (float approximation) is about 82 orders of magnitude (1E+82) higher than your modulo 221</li> </ul> <p>Any answer from the modulo is utter rubbish</p> <p>Edit:</p> <p>Decimal goes to around 10^38</p> <p>Take a float number at 10^39, or 1E+39, then you are accurate to around 1E24 (15 signficant figures).</p> <p>Your modulo is 221 = 2.2E+2</p> <p>You margin of error ie 1E+24/2.2E+2 = 4.4E+21</p> <p>Just to be 100% clear, your accuracy is 4,400,000,000,000,000,000,000,000 times greater than your modulo.</p> <p>It isn't even approximate: it's <strong>rubbish</strong></p>