Isqrt (integer square root) of X: Difference between revisions

Content added Content deleted
No edit summary
Line 3,342: Line 3,342:
print #f
print #f
function IntSqrt(x as decimal) {
function IntSqrt(x as decimal) {
double q=1, z=x, t, r
decimal q=1, z=x, t, r
do q*=4 : until (q>x)
do q*=4 : until (q>x)
while q>1
while q>1