<p dir="ltr">On 24 Apr 2013 10:42, "Shannon Severance" <<a href="mailto:srs@s53.me">srs@s53.me</a>> wrote:<br>
> (define sqrt-n (inexact->exact (ceiling(sqrt n))))</p>
<p dir="ltr">Racket has integer-sqrt, which saves you defining sqrt-n every time.<br>
Also worth noting is sqr, which covers the occasions you want (* x x) or<br>
(expt x 2)</p>
<p dir="ltr">Customer testimonial:<br>
> I have used integer-sqrt in lots of Project Euler problems. It has never let me down!<br>
> - Tim, Epsom</p>
<p dir="ltr">--<br>
sent from my phone<br>
consider yourself lucky if you get<br>
all the right letters in the right order</p>